Visual Studio 2015错误.项目的默认XML名称空间必须是MSBuild XML名称空间

问题描述:

(让我以是"开头,我已经看过类似的问题,但不完全是我的情况.)

(Let me preface the question with Yes, I have seen similar questions, but not exactly my scenario.)

我的环境是

Microsoft Visual Studio Professional 2015(版本14.0.25431.01) 更新3)

Microsoft Visual Studio Professional 2015 (version 14.0.25431.01 Update 3)

我的动作

  1. 我创建一个新的C#类库项目; (好)
  2. 它默认为.NET Fx 4.5.1,我将其更改为我的机器Fx 4.7.2上的最新版本; (好)
  3. 我构建/编译它; (好)
  4. 我转到Manage NuGet Packages菜单, 搜索EntityFramework,然后尝试安装最新版本;它说 我是EF 6.3.(确定)
  5. 点击安装按钮(错误-参见下面的消息)
  6. WTF(?)我已经使用VS 2015五年了(是的,现在是2019年),为什么没有失败?
  1. I create a new C# Class Library Project; (Ok)
  2. It defaults to .NET Fx 4.5.1, I change it to the latest on my machine Fx 4.7.2; (Ok)
  3. I Build / Compile it; (Ok)
  4. I go to the Manage NuGet Packages menu, search for EntityFramework, and try to install the latest; it tells me it is EF 6.3.(Ok)
  5. Hit the install button (ERROR - see message below)
  6. WTF (?) I've used this VS 2015 for 5 years (yes it is 2019 now) without fail, why fail now?

输出窗口

Attempting to gather dependency information for package 'EntityFramework.6.3.0' with respect to project 'SqliteLayer', targeting '.NETFramework,Version=v4.7.2'
Attempting to resolve dependencies for package 'EntityFramework.6.3.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'EntityFramework.6.3.0'
Resolved actions to install package 'EntityFramework.6.3.0'
Adding package 'EntityFramework.6.3.0' to folder 'C:\PROJS\test-proj-01\packages'
Added package 'EntityFramework.6.3.0' to folder 'C:\PROJS\test-proj-01\packages'
Install failed. Rolling back...
Package 'EntityFramework.6.3.0' does not exist in project 'MyProjName'
Removing package 'EntityFramework.6.3.0' from folder 'C:\PROJS\test-proj-01\packages'
Removed package 'EntityFramework.6.3.0' from folder 'C:\PROJS\test-proj-01\packages'
Microsoft.Build.Exceptions.InvalidProjectFileException: 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 <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  C:\PROJS\test-proj-01\packages\EntityFramework.6.3.0\build\EntityFramework.props
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) ... etc etc.. etc... the rest I chopped off

我正在发生的事情:

谁准备的NuGet EF 6.3软件包尚未在VS2015中进行测试?请提供解决方案的任何想法.

Whoever prepared the NuGet EF 6.3 package has not tested it with VS2015 ? Any ideas on a solution, please.

这是一个错误EF6.3 已修复并包含在 6.4 .