首页 > 解决方案 > The imported project "\packages\Microsoft.Net.Compilers.3.3.1\tools\Microsoft.CSharp.Core.targets" was not found

问题描述

After upgrading Microsoft.Net.Compilers from 3.1.1 to 3.3.1 in VS 2019, project build fails with:

The imported project "...\packages\Microsoft.Net.Compilers.3.3.1\tools\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Sure enough, there is no "tools" folder at packages\Microsoft.Net.Compilers.3.3.1\

I have tried deleting the packages folder and restoring Nuget packages as suggested by similar questions but the folder is still not there.

标签: c#

解决方案


推荐阅读