The error stuck below only occurs when a solution has more than one project that references EntityFramework. When you run "Enable-Migrations" or "Add-Migration", I got the following error:
New object: invalid value or read-only property. Change the value and then try again. In 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. the "PrivateBinPath" property could not be found on this object. Confirm this property exists and can be set. In D: \ Projetos \ Monitoramento \ packages \ EntityFramework.6.1.3 \ tools \ EntityFramework.psm1: 772 char: 9 + $ info.PrivateBinPath + = '; lib \ net45 '+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: InvalidOperation: (:) [ ], RuntimeException + FullyQualifiedErrorId: PropertyNotFound Exception throws a "LoadFrom" with an argument of "1": "The specified path, file name, or both are too long. The full file name must be less than 260 characters and the directory name must be less than 248 characters." In 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 You cannot call the method for the null value of the expression. In D: \ Projetos \ Monitoramento \ packages \ EntityFramework.6.1.3 \ Tools \ EntityFramework.psm1: 781 char: 5 + $ dispatcher = $ utilityAssembly.CreateInstance (+ ~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId: InvokeMethodOnNull Exception that raises "CreateInstanceFrom" with arguments "8": "The specified path, file name, or both are too long The full file name must be less than 260 characters and the directory name must be less than 248 characters D: \ Projetos \ Monitoramento \ packages \ EntityFramework.6.1.3 \ Tools \ EntityFramework.psm1: 809 char: 5 + $ domain.CreateInstanceFrom (+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId: PathTooLongException
Exit with EntityFramework 6.1.1:
Calling a LoadFrom exception with argument "1": "The specified path, file name, or both are too long. A fully qualified file name must be less than 260 characters and a directory name must be less than 248 characters." In the folder 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 You cannot call the method for the null value of the expression In 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 Exception that raises "CreateInstanceFrom" with arguments "8": "Y The path specified, the file name, or both are too long. The full file name must be less than 260 characters, and the directory name must be less than 248 characters. "In the folder 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
Hudson Cavazin May 4 '15 at 12:44 2015-05-04 12:44
source share