Hud*_*zin 13 .net c# migration entity-framework-6 visual-studio-2015
仅当解决方案具有多个引用EntityFramework的项目时,才会出现粘贴的以下错误.运行"启用 - 迁移"或"添加迁移"时,我收到以下错误:
New-Object:提供的值无效,或者属性是只读的.更改值,然后重试.在D:\ Projetos\Monitoramento\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:757 char:13 + $ info = New-Object System.AppDomainSetup -Property @ {+ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:InvalidData :( :) [New-Object], Exception + FullyQualifiedErrorId:SetValueException,Microsoft.PowerShell.Commands.NewObjectCommand在此对象上找不到属性"PrivateBinPath".验证该属性是否存在且可以设置.在D:\ Projetos\Monitoramento\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:772 char:9 + $ info.PrivateBinPath + ='; lib \net45'+ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:InvalidOperation :( :) [],RuntimeException + FullyQualifiedErrorId:PropertyNotFound使用"1"调用"LoadFrom"的异常"argument(s):"指定的路径,文件名或两者都太长.完全限定的文件名必须少于260个字符,目录名必须少于248个字符.在D:\ Projetos\Monitoramento\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5 + $ utilityAssembly = [System.Reflection.Assembly] :: LoadFrom((Join-Path $ ToolsP ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:NotSpecified :( :) [],MethodInvocationException + FullyQualifiedErrorId:PathTooLongException你不能调用null值表达式的方法.在D:\ Projetos\Monitoramento\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5 + $ dispatcher = $ utilityAssembly.CreateInstance(+ ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:InvalidOperation :( :) [ ],RuntimeException + FullyQualifiedErrorId:InvokeMethodOnNull使用"8"参数调用"CreateInstanceFrom"的异常:"指定的路径,文件名或两者都太长.完全限定的文件名必须少于260个字符,并且目录名称必须少于248个字符."在D:\ Projetos\Monitoramento\pac kages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5 + $ domain.CreateInstanceFrom(+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ + CategoryInfo:NotSpecified:(:) [],MethodInvocationException + FullyQualifiedErrorId:PathTooLongException
使用EntityFramework 6.1.1输出:
使用"1"参数调用"LoadFrom"的异常:"指定的路径,文件名或两者都太长.完全限定的文件名必须少于260个字符,目录名称必须少于248个字符".在C:\ Users\Hudson\Documents\Visual Studio 2015\Projects\WpfApplication4\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:780 char:5 + $ utilityAssembly = [System.Reflection.Assembly] :: LoadFrom ((Join-Path $ ToolsP ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:NotSpecified :( :) [ ],MethodInvocationException + FullyQualifiedErrorId:PathTooLongException您无法在空值表达式上调用方法.在C:\ Users\Hudson\Documents\Visual Studio 2015\Projects\WpfApplication4\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1 :781 char:5 + $ dispatcher = $ utilityAssembly.CreateInstance(+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ + CategoryInfo:InvalidOperation:(:) [],RuntimeException + FullyQualifiedErrorId:InvokeMethodOnNull使用"8"参数调用"CreateInstanceFrom"的异常:"指定的路径,文件名或两者都太长了.完全限定的文件名必须少于260个字符 d目录名称必须小于248个字符."在C:\ Users\Hudson\Documents\Visual Studio 2015\Projects\WpfApplication4\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1:809 char:5 + $ domain.CreateInstanceFrom(+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:NotSpecified :( :) [],MethodInvocationException + FullyQualifiedErrorId:PathTooLongException
Hud*_*zin 12
其他解决方案:https://github.com/aspnet/EntityFramework/issues/1950#issuecomment-99164398
| 归档时间: |
|
| 查看次数: |
4710 次 |
| 最近记录: |