Visual studio 2015 Visual Studio 2015错误。项目的默认XML命名空间必须是MSBuild XML命名空间

Visual studio 2015 Visual Studio 2015错误。项目的默认XML命名空间必须是MSBuild XML命名空间,visual-studio-2015,entity-framework-6,nuget-package,Visual Studio 2015,Entity Framework 6,Nuget Package,(让我以是作为问题的序言,我见过类似的问题,但不完全是我的设想。) 我的环境是 Microsoft Visual Studio Professional 2015(版本14.0.25431.01 更新(3) 我的行动 我创建了一个新的C#类库项目;(好的) 它默认为.NET Fx 4.5.1,我在我的机器Fx 4.7.2上将其更改为最新版本;(好的) 我构建/编译它;(好的) 我进入管理NuGet软件包菜单, 搜索EntityFramework,并尝试安装最新版本;它告诉我们 告诉我这是EF6.

(让我以是作为问题的序言,我见过类似的问题,但不完全是我的设想。)

我的环境是

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

我的行动

  • 我创建了一个新的C#类库项目;(好的)
  • 它默认为.NET Fx 4.5.1,我在我的机器Fx 4.7.2上将其更改为最新版本;(好的)
  • 我构建/编译它;(好的)
  • 我进入
    管理NuGet软件包
    菜单, 搜索EntityFramework,并尝试安装最新版本;它告诉我们 告诉我这是EF6.3。(好的)
  • 点击安装按钮(错误-请参阅下面的消息)
  • WTF(?)我已经用了5年(是的,现在是2019年)没有失败,为什么现在失败
  • 输出窗口

    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
    
    正在尝试收集程序包“EntityFramework.6.3.0”与项目“SqliteLayer”相关的依赖项信息,目标为“.NETFramework,版本=v4.7.2”
    正在尝试解析DependencyBehavior为“最低”的包“EntityFramework.6.3.0”的依赖关系
    解决安装程序包“EntityFramework.6.3.0”的操作
    已解决安装程序包“EntityFramework.6.3.0”的操作
    正在将包“EntityFramework.6.3.0”添加到文件夹“C:\PROJS\test-proj-01\packages”
    将包“EntityFramework.6.3.0”添加到文件夹“C:\PROJS\test-proj-01\packages”
    安装失败。正在回滚。。。
    项目“MyProjName”中不存在包“EntityFramework.6.3.0”
    正在从文件夹“C:\PROJS\test-proj-01\packages”中删除程序包“EntityFramework.6.3.0”
    已从文件夹“C:\PROJS\test-proj-01\packages”中删除程序包“EntityFramework.6.3.0”
    Microsoft.Build.Exceptions.InvalidProjectFileException:项目的默认XML命名空间必须是MSBuild XML命名空间。如果项目是以MSBuild 2003格式编写的,请添加xmlns=”http://schemas.microsoft.com/developer/msbuild/2003“到元素。如果项目是以旧的1.0或1.2格式编写的,请将其转换为MSBuild 2003格式。C:\PROJS\test-proj-01\packages\EntityFramework.6.3.0\build\EntityFramework.props
    在Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String ErrorSubcategory resourceName,IElementLocation elementLocation,String resourceName,Object[]args)。。。等等。。等剩下的我砍掉了
    
    我认为正在发生的事情:


    准备NuGet EF 6.3软件包的人没有使用VS2015进行测试吗?这是我的解决方案,我创建了一个新项目,选择了.netframework 2.0或3.0,然后安装entityframework及其作品更新。目前的解决方案是降级到EF 6.2.0,它就像一个魅力。除非有人提出更好的解决方案,否则我将提供这一自我回答(在适当的时间过后)。您是否尝试过最新的每日修复程序?@magicandre1981还没有,我已降级到6.2解决方案我应该在哪里添加Nuget.Config,通过VisualStudio还是直接在文件系统上,以及在哪个级别?我的解决方案目前有两个项目,我是在soln级别添加还是添加到使用EF6的项目中?在sln文件旁边添加nuget.config。nuget上还有一个6.4 preview1,其中应该包括修复程序。因此,请启用预发布版本的复选框。您能看看我的问题吗?这与Azure类似,但它在Azure上失败了:此解决方案更适合于评论部分和作为回复帖子