vs-sourcetrail
vs-sourcetrail copied to clipboard
Unable to generate compilation database for project without solution
CreateCompilationDatabase(...) throws a System.ArgumentException: 'The path is not of a legal form.' when trying to generate the compilation database from a VS project. I'm neither a C# nor a VS developer, but I'm looking into the issue. Someone else can likely do a better job, however.
Looking at the trace, dte.Solution.FullName is empty, which clearly is a problem. This is happening when I open a VS project, not a solution file, so is that a problem? Does this extension only support generating compilation databases from full solutions? This is my first time using Visual Studio, so I'm not entirely clear on why that would be a problem.
The exception is thrown in SourcetrailExtension/SourcetrailExtensionPackage.cs, line 605
Thanks!
So, I just tried opening the project, and then saving the generated VS solution for that project, and Sourcetrail now seems to be working. However, My companies source is laid out as a bunch of project files without a top level solution which get built from build-scripts that compile each project for us, so I'd love it if Sourcetrail could work on project files instead of solutions. Is that possible?
Even if you load a project (instead of a solution) in VS, VS will create a solution automatically, as you mentioned. Let me rephrase the title of this issue.
For your personal use case, I would recommend that you create a solution on your own machine that contains all the VS projects that you are interested in. With that you can then use the VS extension to generate a compilation database for everything at once, which also may come in handy later, when things change and you want to update the generated compilation database.