none
Visual Studio will not allow me to start a new C# project. Help!

    Question

  • Every time i try to start a new C# console application visual studio gives me the following error:

    The imported project"C:\Program Files(x86)\MSBuild\14.0\bin\Microsoft.CSharp.targets" was not found. Confirm that the path in the <import> declaration is correct, and that the file exists on disk.

    C:\Users\Jordan\AppData\Local\Temp\1qbcewiu.ust\Temp\ConsoleApplication6.csproj

    Please help! I would really like to be able to use Visual Studio again sometime soon, as there is some script i would like to write in Unity.. Thank you!

    Wednesday, February 24, 2016 6:49 PM

Answers

  • Hi,

    Thanks for your post.

    Could you please tell me what's the version of your Visual Studio?

    And when did you get the error? Creating a new C# console application? Or open a exist C# console application?

    Please check this directory C:\Program Files(x86)\MSBuild\14.0\bin and make sure there exist Microsoft.CSharp.targets.

    In addition. Please try to create a new C# console application, if still give the same error message.

    I suppose there is something wrong with C# Template. In this case, I suggest you could restore the template of your Visual Studio with the following steps:

    1. Delete the ItemTemplatesCache, ProjectTemplatesCache folder (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)
    2. In the command prompt, navigate to the location of devenv.exe. This file is located in <Visual Studio Installation Path>\Common7\IDE.
    3. Type "devenv /installvstemplates" and press Enter.

    If above suggestions still no help. I think there is something wrong with your VS. Please repair it or install the latest update. For example, VS2015 Update1.

    Best Regards,

    Lake Xiao

    Thursday, February 25, 2016 5:28 AM
    Moderator