All Visual Studio 2013 builds now fail

Every single project that I open in Visual Studio 2013 now unexpectedly gives me the following error:

EverySingleProject.csproj: error: the default XML namespace for the project must be an MSBuild XML namespace. If the project was created in MSBuild 2003 format, add xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project was created in the old format 1.0 or 1.2, please convert it to the 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?

+4
source share
6 answers

I had it like 2 days ago.

It saved me.

Hope this helps.

EDIT:

Fortunately, the solution is simple:

  • In Windows Explorer, go to the project
  • Right-click the .cproj file, select Properties, and uncheck Read-Only
  • Open your .cproj file in Notepad
  • On line 2, change xmlns = "http://schemas.microsoft.com/developer/msbuild/2008" to xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" (notice is the only difference - we changed from 2008 to 2003).
  • Save changes
  • Visual Studio ( ) " "
  • , .
+3

, .NET Csproj VS 2017 RC Visual Studio.

:

<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>

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

VS 2017, .

+19

MSBuild, . : Microsoft.Common.CurrentVersion.targets

. : Microsoft.CSharp.CurrentVersion.targets

, Visual Studio.

, .

0

. , , (!) VS 2017, VS 2013.

:

  • - VS 2013,
  • ,
  • ,
  • .., ,
  • , , .

Really not perfect, but it was the quickest solution for a small demo project. Not sure how you will go with the big decision. Maybe someone will someday create a converter. Perhaps Microsoft can do this. [Laughs.]

0
source

Removing the corresponding * .csproj.user file helped with the same symptoms.

0
source

Fixed by adding:

<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

in the .csproj file.

-1
source

Source: https://habr.com/ru/post/1607451/


All Articles