Ho utilizzato VS2015CTP ora ho deciso di aggiornarlo a VS2015 Community RC Per ragioni sconosciute, le migrazioni sui miei progetti hanno smesso di funzionare.Le migrazioni EF6 hanno smesso di funzionare su VS 2015 RC
In Visual Studio 2015 ottengo il seguente messaggio>
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>
Se apro la soluzione in VS 2013 ed eseguire il comando sopra tutto funziona bene. Si tratta di un bug in VS, ha perso il riferimento a qualcosa? C'è un modo per attivare una sorta di registro più esteso, non mi sento davvero in debug EF.
Grazie
Edit: penso che questo abbia a che fare con il modo in cui viene gestito Nuget in Visual Studio 2015, sembra che non guarda nuget.config allo stesso modo. Ho tutti i pacchetti attraverso diverse soluzioni nella stessa cartella, per fare questo io uso un nuget.config sotto .nuget cartella con:
<config>
<add key="repositoryPath" value="G:/Projects/packages" />
</config>
per qualche ragione sembra che VS2015 non gestisce questo allo stesso modo come VS2013 perché prova a scaricare i pacchetti nei pacchetti di cartelle sotto la cartella della soluzione.
Così Microsoft ha appena tolto la funzionalità da 6.1.3. È stato carino da parte loro. Se potessero semplicemente rimuovere Windows 8 e 10, saremmo tutti felici :-) –
WTF! Qualche soluzione? – Shimmy