更新.Net Framework版本(4.6.2至4.7.2)后,无法评估GetPathsOfAllDirectoriesAbove() [英] GetPathsOfAllDirectoriesAbove() cannot be evaluated after updating .Net Framework version (4.6.2 to 4.7.2)
问题描述
我一直在从事的项目已从.NET Framework 4.6.2升级到4.7.2. 在构建时,在不是我的代码的文件中,出现以下错误:
A project I have been working on was upgraded from .NET Framework 4.6.2 to 4.7.2. On build, in a file that is not my code, I get the following error:
在项目属性的构建"选项卡中,我也看到相同的错误.
I also see the same error in the build tab of my project properties.
我不知所措-我已寻找错误,但很快就空了.以前有没有人遇到和/或解决过这个问题?
I'm at a loss- I've searched for the error and am coming up empty. Has anyone encountered and/or resolved this before?
推荐答案
升级后的构建工具看起来像从MSBUILD更改为Roslyn. Microsoft.Managed.Core.targets 是Roslyn的目标文件.
Looks like after upgrading your build tool is changed from MSBUILD to Roslyn. Microsoft.Managed.Core.targets is Roslyn target file.
如果已安装以下Nuget软件包:
if you have following Nuget packages installed:
-
Microsoft.CodeDom.Providers.DotNetCompilerPlatform
Microsoft.CodeDom.Providers.DotNetCompilerPlatform
Microsoft.Net.Compilers
Microsoft.Net.Compilers
然后可能是造成问题的原因.将Microsoft.CodeDom.Providers.DotNetCompilerPlatform
升级到2.x,然后删除第二个.那应该解决问题.
Then possibly it's causing the issue. Upgrade the Microsoft.CodeDom.Providers.DotNetCompilerPlatform
to 2.x and remove the second one. That should fix the issue.
这篇关于更新.Net Framework版本(4.6.2至4.7.2)后,无法评估GetPathsOfAllDirectoriesAbove()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!