RicoSuter/DNT

NPM version of switch-to-packages and -projects broken after latest VS update

开放

#93 创建于 2021年3月24日

 (6 条评论) (1 个反应) (0 位负责人)C# (75 个派生)github user discovery
help wanted

仓库指标

星标
 (472 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

I am using the NPM version due to having full .NET framework projects in my solution. After updating to the latest version of Visual Studio (16.9.2) all projects are failing to switch with the following error:

The project '{pathTo/myProj.csproj}' could not be loaded: System.InvalidOperationException: Not a project: {pathTo/myProj.csproj} ---> Microsoft.Build.Exceptions.InvalidProjectFileException: Invalid static method invocation syntax: "[MSBuild]::AreFeaturesEnabled('16.8')". Method '[MSBuild]::AreFeaturesEnabled' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)). Check that all parameters are defined, are of the correct type, and are specified in the right order. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets {stack trace}

This is fixed if I delete the offending "AreFeaturesEnabled" PropertyGroup in Microsoft.Common.CurrentVersion.targets, any ideas why this problem is occurring?

贡献者指南