I'm trying to enable migrations in MVC4, Entity Framework 5.00, however when I input the command it throws the following error:
Cannot determine a valid start-up project. Using project 'EFMigrations' instead. Your configuration file and working directory may not be set as expected. Use the -StartUpProjectName parameter to set one explicitly. Use the -Verbose switch for more information.
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file://\\s01\data\Documents\Visual Studio 2010\Projects\EFMigrations\packages\EntityFramework.5.0.0\tool
s\EntityFramework.PowerShell.Utility.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)"
At \\s01\data\Documents\Visual Studio 2010\Projects\EFMigrations\packages\EntityFramework.6.0.0-beta1\tools\EntityFramework.psm1:669 char:62
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom <<<< ((Join-Path $ToolsPath EntityFramework.PowerShell.Utility.dll))
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
You cannot call a method on a null-valued expression.
At \\s01\data\Documents\Visual Studio 2010\Projects\EFMigrations\packages\EntityFramework.6.0.0-beta1\tools\EntityFramework.psm1:670 char:50
+ $dispatcher = $utilityAssembly.CreateInstance <<<< (
+ CategoryInfo : InvalidOperation: (CreateInstance:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load file or assembly 'file://\\s01\data\Documents\Visual Studio 2010\Projects\EFMigrations\packages\EntityFramework.
5.0.0\tools\EntityFramework.PowerShell.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)"
At \\s01\data\Documents\Visual Studio 2010\Projects\EFMigrations\packages\EntityFramework.6.0.0-beta1\tools\EntityFramework.psm1:698 char:31
+ $domain.CreateInstanceFrom <<<< (
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
any and all help would be appreciated.
Running migrations from a network path is unsupported.
EF Team Triage: The migrations commands require full trust to run. Because you are running from a network share it looks like you are running in a lower trust level. In the past we have made the decision that the migrations commands would require full trust because it reduces the complexity of the implementation.
http://entityframework.codeplex.com/workitem/856
This means you have to put your project on a local drive, then you'll be able to run migrations.
It turns out that #Stijn's answer is indeed correct, However it doesn't provide a solution to the problem, the solution is to simple copy and paste the entire project into your Hard Drive and the command will work
Related
I've been getting this error and I haven't been able to figure out how to solve it. I can't find any online info on this. I had Malwarebyte installed, and I think it quarantined some files that I might have deleted without realizing it.
This error loads each time I start up my PC.
Barring having to reinstall windows does anyone have any idea how to correct this error? I can't recall what software may have installed this. THanks.
Exception calling "ReadAllBytes" with "1" argument(s): "Could not find a part of the path
'C:\Users\janly\AppData\Roaming\Browser Extension\BrowserExtension.dll'."
At line:1 char:39
... Extension/';[Reflection.Assembly]::Load([System.IO.File]::ReadAllByte ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : DirectoryNotFoundException
Unable to find type [WebCompanion.BrowserExtension.S].
At line:1 char:126
... $w+'BrowserExtension.dll'));[WebCompanion.BrowserExtension.S]::Start( ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (WebCompanion.BrowserExtension.S:TypeName) [], RuntimeException
FullyQualifiedErrorId : TypeNotFound
[process exited with code 1 (0x00000001)]
I have done the following on Windows 7 for running Cassandra:
Installed Python.
Downloaded a zip of Cassandra from the original site.
While executing cassandra batch getting following messages:
Exception calling "Start" with "0" argument(s): "The system cannot find the file
specified" At E:\apache-cassandra-3.11.2\conf\cassandra-env.ps1:212 char:5
+ $p.Start() | Out-Null
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception
You may want to check out https://kimola.com/cassandrows. I am in the same situation of wanting to install Cassandra on Windows. But I do not want to be left behind with version 3.9.0.
I'm trying to package SCOM Console 2016 using Thinapp 5.2. The customer wants to use the PowerShell part of SCOM as well. But whenever i start SCOM Shell, it gives me a bunch of errors telling me that it can't find certain .dll files and more.
I have already tried installing it on a VM before but it gives me the same error messages, so Thinapp is not causing the errors.
Does anyone know where i should look?
Import-Module : Cannot load Windows PowerShell snap-in C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OM10.CoreCommands\Microsoft.EnterpriseManagement.Core.Cmdlets.dll because of the following error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Loader Exceptions:
Could not load file or assembly Microsoft.EnterpriseManagement.Core, Version=7.0.5000.
, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies.
The system cannot find the file specified.
At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1261 char:14
+ Import-Module <<<< $psScriptRoot\OM10.CoreCommands\OM10.CoreCommands.psd1
+ CategoryInfo : ResourceUnavailable: (:) [Import-Module], PSSnapInException
+ FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : Could not load file or assembly file:///C:\Program Files (x86)\Systemcenter Operations Manager 2016\Powershell\OperationsManager\OM10.Commands\Microsoft.SystemCenter.OperationsManagerV10.Commands.dll or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1262 char:14
+ Import-Module <<<< $psScriptRoot\OM10.Commands\OM10.Commands.psd1
+ CategoryInfo : NotSpecified: (:) [Import-Module], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand
Add-Type : Could not load file or assembly file:///C:\Program Files (x86)\System Center Operations Manager 2016\Console\Microsoft.Mom.Common.dll or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1311 char:15
+ Add-Type <<<< -Path $consoleMomCommon
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand
Problem solved, it turned out we were using an old version of Windows Management Framework. After updating to version 5.1 all the errors were gone. I installed this update: KB3191566
I have a solution having 1 project.
Open Package Manager Console, run Install-Package MSBuildTasks
But it gave me an error below:
Install-Package : The current environment doesn't have a solution open.
At line:1 char:16
+ Install-Package <<<< MSBuildTasks
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationExcep
tion
+ FullyQualifiedErrorId : NuGetNoActiveSolution,NuGet.PowerShell.Commands.InstallPackage
Command
I don't understand why it comes. Kindly suggest me waiting for reply. Thanks
I usually get this error because I created or opened a project (.csproj or other) that doesn't have a saved solution (.sln) associated with it.
If you go to File->Save All it should offer to save the solution somewhere. Save it and that makes the error go away for me.
I have a solution that uses NuGet to manage packages, and I also use the Package Manager Console for Entity Framework Migrations. Everything has worked fine for around a year.
This morning I removed a few projects from the solution as part of a reorganization. Now when I open the Package Manager Console, I am greeted with the error message
Set-DefaultScaffolder : Object reference not set to an instance of an object.
At E:\Dev\survey\packages\T4Scaffolding.Core.1.0.0\tools\init.ps1:50 char:9
+ Set-DefaultScaffolder -Name CustomTemplate -Scaffolder
T4Scaffolding.Cus ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], NullR
eferenceException
+ FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
What is causing this, and how can I fix it?
I installed Visual Studio 2012 SP2 a day or so after posting this issue, and it resolved itself.
Unsure whether SP2 fixed the underlying issue or just reset something, but either way the problem is resolved.