The imported project “C:\Microsoft.CSharp.targets” was not found

后端 未结 16 2002
挽巷
挽巷 2020-11-29 21:46

I got this error today when trying to open a Visual Studio 2008 project in Visual Studio 2005:

The imported project \"C:\\Microsoft.C

16条回答
  •  囚心锁ツ
    2020-11-29 22:42

    If you are to encounter the error that says Microsoft.CSharp.Core.targets not found, these are the steps I took to correct mine:

    1. Open any previous working projects folder and navigate to the link showed in the error, that is Projects/(working project name)/packages/Microsoft.Net.Compilers.1.3.2/tools/ and search for Microsoft.CSharp.Core.targets file.

    2. Copy this file and put it in the non-working project tools folder (that is, navigating to the tools folder in the non-working project as shown above)

    3. Now close your project (if it was open) and reopen it.

    It should be working now.

    Also, to make sure everything is working properly in your now open Visual Studio Project, Go to Tools > NuGetPackage Manager > Manage NuGet Packages For Solution. Here, you might find an error that says, CodeAnalysis.dll is being used by another application.

    Again, go to the tools folder, find the specified file and delete it. Come back to Manage NuGet Packages For Solution. You will find a link that will ask you to Reload, click it and everything gets re-installed.

    Your project should be working properly now.

提交回复
热议问题