Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Microsoft.Common.targets was not found. Cannot open or create solutions.

$
0
0

I've been working on a method to open Excel 2013 files in VS 2010, and somehow I've managed to hose my entire VS environment. When I attempt to open an existing solution, I receive this error message:

    Loading C:\Users\Bio\Documents\Visual Studio Projects\FileSearcher\FileSearcher\FileSearcher.csproj ...
    C:\Users\Bio\Documents\Visual Studio Projects\FileSearcher\FileSearcher\FileSearcher.csproj : error  : Unable to read the project file 'FileSearcher.csproj'.
    C:\Users\Bio\Documents\Visual Studio Projects\FileSearcher\FileSearcher\FileSearcher.csproj(161,3): The imported project "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

I've tried copying the Microsoft.CSharp.targets to the v4.0.30319 directory, and it causes this error:

    C:\Users\Bio\Documents\Visual Studio Projects\FileSearcher\FileSearcher\FileSearcher.csproj : error  : Unable to read the project file 'FileSearcher.csproj'.
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(196,5): The imported project "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

I then tried copying Microsoft.Common.targets to the v4.0.30319 directory, and creating a new project. I received this error:

    Project 'WindowsFormsApplication1' could not be opened because the Microsoft Visual C# 2010 compiler could not be created. Please re-install Visual Studio.

I've uninstalled/reinstalled VS several times without success. Any thoughts?

 


Viewing all articles
Browse latest Browse all 21115

Trending Articles