当我尝试重新加载我已卸载的项目时出现此错误,如下面的屏幕截图所示:
它说这条线来自我的 Microsoft.Managed.Core.targets
失败发生在这里。我相信这是失败的线路。以下来自我的microsoft managed.core.targets
<Import Project="Microsoft.Managed.EditorConfig.targets" Condition="$(MSBuildVersion) >= 16.1.0" />
Run Code Online (Sandbox Code Playgroud)
这是来自 micrrosoft.managed.editorconfig.targets
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Default this to false until the ".editorconfig in compiler" feature is no longer experimental.
At that point this PropertyGroup can simply be deleted. -->
<DiscoverEditorConfigFiles Condition="'$(DiscoverEditorConfigFiles)' == ''">false</DiscoverEditorConfigFiles>
</PropertyGroup>
<ItemGroup>
<PotentialEditorConfigFiles Include="@(Compile->GetPathsOfAllDirectoriesAbove()->Combine('.editorconfig'))" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
<EditorConfigFiles Include="@(PotentialEditorConfigFiles->Exists())" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
这也是我遇到的错误。
在条件“$(MSBuildVersion) >= 16.1.0”下,尝试对“$(MSBuildVersion)”进行数字比较,结果为“”而不是数字。
我解决此问题的方法是检查 Visual Studio 中的更新并确保我拥有最新版本的 Visual Studio。
微软的安迪·戈克 (Andy Gocke) 在该网站上写道:
The Microsoft.Net.Compilers package requires newer versions of MSBuild as Visual Studio updates, so the 3.1.0 version requires MSBuild version 16.1.
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助!
| 归档时间: |
|
| 查看次数: |
5324 次 |
| 最近记录: |