Base solution for your next web application
Open Closed

Issues with Database migration #445


User avatar
0
TomLeonard created

I am having difficulties in using package manager database migration.
I am using VS20015 RC1 , SQL Express Any help is appreciated. I will try to create the db first and then try again.

  1. in non verbose mode , I see this error 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 C:\inetpub\wwwroot\PerfectBI\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5
  • $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-P ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : PathTooLongException

You cannot call a method on a null-valued expression. At C:\inetpub\wwwroot\PerfectBI\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 C:\inetpub\wwwroot\PerfectBI\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5

  • $domain.CreateInstanceFrom(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : PathTooLongException
  1. In verbose mode, I see this....

PM> Update-Database -ConnectionString "Server=DEV04\SQLEXPRESS; Database=PerfectBI; User=sa;Password=*****" -ConnectionProviderName "System.Data.SqlClient" -Verbose -ProjectName "PerfectBI.EntityFramework" Using StartUp project 'PerfectBI.Tests'. 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 C:\inetpub\wwwroot\PerfectBI\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5

  • $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-P ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : PathTooLongException

You cannot call a method on a null-valued expression. At C:\inetpub\wwwroot\PerfectBI\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 C:\inetpub\wwwroot\PerfectBI\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5

  • $domain.CreateInstanceFrom(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : PathTooLongException

1 Answer(s)
  • User Avatar
    0
    TomLeonard created

    Ignore this issue please. I went over to another dev machine and it worked fine. Issue resolved, problem with that VS instance. Thanks !