dotnet/roslyn

MSBuildWorkspace fails to load metadatareferences for a project with a non-existent default configuration

Open

#5389 aperta il 22 set 2015

Vedi su GitHub
 (4 commenti) (1 reazione) (0 assegnatari)C# (4257 fork)batch import
Area-IDEBugIDE-MSBuildWorkspacehelp wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

I loaded a csproj using MSBuildWorkspace but the project.MetadataReferences was empty. The project compiles and runs fine in VS2015 and has numerous (+15) third party references. I discovered that the project had the default configuration Debug|AnyCPU, which did not exists, so i fixed it to an existing configuration and the project now loads fine.

I do not understand this behaviour, it seems like a bug to me, or that there should be some sort of exception thrown.

For more information, see: http://stackoverflow.com/questions/32634648/compilation-fails-with-roslyn-but-works-with-visual-studio/32650912?noredirect=1#comment53249254_32650912

Guida contributor