更新 .Net Framework 版本(4.6.2 到 4.7.2)后无法评估 GetPathsOfAllDirect

GetPathsOfAllDirectoriesAbove() cannot be evaluated after updating .Net Framework version (4.6.2 to 4.7.2)(更新 .Net Framework 版本(4.6.2 到 4.7.2)后无法评估 GetPathsOfAllDirectoriesAbove())
本文介绍了更新 .Net Framework 版本(4.6.2 到 4.7.2)后无法评估 GetPathsOfAllDirectoriesAbove()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我一直在从事的一个项目已从 .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()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

MSBuild cannot find a reference(MSBuild 找不到参考)
The reference assemblies for framework .NETCore, Version=v5.0 were not found(未找到框架 .NETCore,Version=v5.0 的参考程序集)
quot;File has a different computed hash than specified in manifestquot; error when signing the EXE(“文件的计算哈希值与清单中指定的不同签署EXE时出错)
Good-practices: How to reuse .csproj and .sln files to create your MSBuild script for CI?(良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 MSBuild 脚本?)
Run an MSBuild target only if project is actually built(仅在实际构建项目时运行 MSBuild 目标)
MS-Build BeforeBuild not firing(MS-Build BeforeBuild 未触发)