RicoSuter/DNT

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

Open

#93 opened on 2021年3月24日

GitHub で見る
 (6 comments) (1 reaction) (0 assignees)C# (74 forks)github user discovery
help wanted

Repository metrics

Stars
 (470 stars)
PR merge metrics
 (30d に merged 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?

コントリビューターガイド