Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All Visual Studio 2013 builds are now failing

Every single project I open in Visual Studio 2013 is now all of a sudden giving me the following error:

EverySingleProject.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets

This is in the file:

Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"

Why is this failing?

like image 669
user3081814 Avatar asked Sep 15 '15 11:09

user3081814


People also ask

What is your review of Visual Studio 2013 build fails?

Visual Studio 2013 Build Fails – Visual Studio 2013 is an awesome IDE. I am having so much fun working with it and writing software with it. I try to learn as much as possible about each new IDE version, but it is a challenging task. Last night I added a Windows Forms Project to my solution. As a regular habit, I built the solution.

Where can I find the Visual Studio 2013 build file?

In the case of VS 2013, it is located here (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts) In the command prompt. type "MSBuild.exe C:\Path\ToYourProject /verbosity:d"

How do I fix Visual Studio 2010 debug folder not working?

Clean solution. Double check after clean that everything is deleted from debug folders. Build it in release mode. Build solution project to project until you isolate problematic project. Remove COM and comment code to see if is this the source of problem. Restart VS2010. Restart windows.

Why can't I sign in to Visual Studio 2013?

You experience performance issues, product crashes, or rendering issues in Visual Studio 2013 You cannot sign in to Visual Studio 2013 when JavaScript is disabled in Internet Explorer Find the Distributable Code for Microsoft Visual Studio 2017, including Utilities, Extensibility, and BuildServer files.


2 Answers

You also get this error if you try and open a VS 2017 RC 'simplified' .NET Core csproj file in an earlier version of Visual Studio.

These new project files look like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
  </ItemGroup>
</Project>

(From: https://blogs.msdn.microsoft.com/dotnet/2016/12/12/updating-visual-studio-2017-rc-net-core-tooling-improvements/)

You'll need to use a recent version of VS 2017 to open them.

like image 90
Chris Brook Avatar answered Oct 05 '22 22:10

Chris Brook


I've had this like 2 days ago.

This saved me.

Hope this helps.

EDIT:

Fortunately the solution is simple:

  1. In Windows Explorer navigate to the project
  2. Right Click on the .cproj file, select Properties, and un-check the "Read Only" checkbox
  3. Open up the .cproj file in Notepad
  4. On line 2 change xmlns="http://schemas.microsoft.com/developer/msbuild/2008" to xmlns="http://schemas.microsoft.com/developer/msbuild/2003" (notice this only difference is we changed 2008 to 2003)
  5. Save your changes
  6. In Visual Studio right click on the (currently unavailable) project and select "Reload Project"
  7. The project will now load normally and you can get on with your life
like image 29
Alex Avatar answered Oct 06 '22 00:10

Alex