How can I resolve all references with Roslyn's OpenSolutionAsync?

久未见 提交于 2019-11-30 21:24:35

You only need to add the façade references if the project is targeting the "full" .NET framework. So if you look at the existing references first, if there are any references that come from Reference Assemblies\Microsoft.NETPortable\v4.5\Profile\... then you shouldn't need to add them.

Kevin Pilch

I'm looking at fixing this in the MSBuild targets, but in the meantime, the following workaround should address the issue. Instead of using:

MSBuildWorkspace.Create();

use:

MSBuildWorkspace.Create(new Dictionary<string, string> { { "CheckForSystemRuntimeDependency", "true" } });
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!