dotnet/roslyn

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

開放

#5,389 建立於 2015年9月22日

 (4 則留言) (1 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-IDEBugIDE-MSBuildWorkspacehelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

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

貢獻者指南