(让我用“是的,我见过类似的问题,但不完全是我的情况”作为问题的开头。)
我的环境是
Microsoft Visual Studio Professional 2015(版本 14.0.25431.01
更新3)
我的行动
- 我创建一个新的 C# 类库项目; (好的)
- 默认是.NET Fx 4.5.1,我在我的机器上将其更改为最新的Fx 4.7.2; (好的)
- 我构建/编译它; (好的)
- 我去
Manage NuGet Packages
菜单,
搜索EntityFramework,并尝试安装最新的;它说
我的是 EF 6.3。(好的)
- 点击安装按钮(错误 - 请参阅下面的消息)
- WTF(?)我已经使用这个 VS 2015 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
我认为正在发生的事情:
谁准备了 NuGet EF 6.3 包没有用 VS2015 测试过?请提供有关解决方案的任何想法。
这是一个EF6.3 中的错误 https://github.com/aspnet/EntityFramework6/issues/1292这是已经修好了 https://github.com/aspnet/EntityFramework6/commit/2d739c8bd1d22771d89a978282111bbafbd08cdb并包含在6.4 https://www.nuget.org/packages/EntityFramework/6.4.0.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)