【发布时间】:2015-05-03 22:44:54
【问题描述】:
我一直在使用 VS2015CTP,现在我决定将其升级到 VS2015 Community RC 由于某些未知原因,我的项目迁移停止工作。
在 Visual Studio 2015 中,我收到以下消息>
PM> update-database
Exception calling "LoadFrom" with "1" argument(s): "The specified path, file name, or both are too long. The fully qualified file name must be less
than 260 characters, and the directory name must be less than 248 characters."
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsP ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException
You cannot call a method on a null-valued expression.
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5
+ $dispatcher = $utilityAssembly.CreateInstance(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "CreateInstanceFrom" with "8" argument(s): "The specified path, file name, or both are too long. The fully qualified file name
must be less than 260 characters, and the directory name must be less than 248 characters."
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5
+ $domain.CreateInstanceFrom(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException
PM>
如果我在 VS 2013 中打开解决方案并运行上述命令,一切正常。 这是VS中的一些错误,它是否失去了对某些东西的引用? 有没有办法激活某种更广泛的日志,我真的不喜欢调试 EF。
谢谢
编辑: 我认为这与 Visual Studio 2015 中处理 Nuget 的方式有关,它似乎并没有以同样的方式看待 nuget.config。 我在同一个文件夹中拥有跨多个解决方案的所有包,为此我使用 .nuget 文件夹下的 nuget.config:
<config>
<add key="repositoryPath" value="G:/Projects/packages" />
</config>
由于某种原因,VS2015 的处理方式似乎与 VS2013 不同,因为它尝试将包下载到解决方案文件夹下的文件夹 packages。
【问题讨论】:
标签: entity-framework-6 visual-studio-2015