项目的默认XML名称空间必须是MSBuild XML名称空间 [英] The default XML namespace of the project must be the MSBuild XML namespace

查看:7027
本文介绍了项目的默认XML名称空间必须是MSBuild XML名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地克隆了 ASP.NET Core SignalR存储库,并尝试从以下内容中打开解决方案环境.

I cloned the ASP.NET Core SignalR Repo locally, and try opening the solution from within the following environment.

IDE

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

DOT NET CLI

λ dotnet --info
.NET Command Line Tools (1.0.0-preview2-1-003177)

Product Information:
 Version:            1.0.0-preview2-1-003177
 Commit SHA-1 hash:  a2df9c2576

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

我最终看到很多这类错误消息:

I end up seeing a lot of these kinds of error messages:

..\Repos\SignalR\src\Microsoft.AspNetCore.SignalR\Microsoft.AspNetCore.SignalR.csproj :错误:项目的默认XML命名空间必须为 MSBuild XML名称空间.如果项目是在MSBuild 2003中编写的 格式,请添加 xmlns="http://schemas.microsoft.com/developer/msbuild/2003"到 元素.如果项目是在旧版本1.0中编写的,则 1.2格式,请将其转换为MSBuild 2003格式. ..\Repos\SignalR\src\Microsoft.AspNetCore.SignalR\Microsoft.AspNetCore.SignalR.csproj

..\Repos\SignalR\src\Microsoft.AspNetCore.SignalR\Microsoft.AspNetCore.SignalR.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. ..\Repos\SignalR\src\Microsoft.AspNetCore.SignalR\Microsoft.AspNetCore.SignalR.csproj

我想知道如何解决此问题的正确方法.

I want to know how to fix this the correct way.

推荐答案

您要打开的项目为新的.NET Core csproj格式.这意味着您需要使用支持这种新格式的Visual Studio 2017.

The projects you are trying to open are in the new .NET Core csproj format. This means you need to use Visual Studio 2017 which supports this new format.

回顾一下历史,最初.NET Core使用project.json而不是*.csproj.但是,经过Microsoft的大量内部审议之后,他们决定返回csproj,但使用了更加整洁和更新的格式.但是,此新格式仅在VS2017中受支持.

For a little bit of history, initially .NET Core used project.json instead of *.csproj. However, after some considerable internal deliberation at Microsoft, they decided to go back to csproj but with a much cleaner and updated format. However, this new format is only supported in VS2017.

如果您想打开项目但不想等到3月7日正式发布VS2017,可以使用Visual Studio Code.

If you want to open the projects but don't want to wait until March 7th for the official VS2017 release, you could use Visual Studio Code instead.

这篇关于项目的默认XML名称空间必须是MSBuild XML名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆