dnx . ef command returns System.InvalidOperationException

633 views Asked by At

I'm running Visual Studio 2015 on Windows 10 Tech Preview.

This is what I have for dnvm list:

Active Version Runtime Architecture Location
Alias
------ ------- ------- ------------ -------- -----
1.0.0-beta4 clr x64 C:\Users\Jonas.dnx\runtimes
1.0.0-beta4 clr x86 C:\Users\Jonas.dnx\runtimes default 1.0.0-beta4 coreclr x64 C:\Users\Jonas.dnx\runtimes * 1.0.0-beta4 coreclr x86 C:\Users\Jonas.dnx\runtimes
1.0.0-beta5-12021 clr x86 C:\Users\Jonas.dnx\runtimes
1.0.0-beta5-12087 coreclr x86 C:\Users\Jonas.dnx\runtimes

This is the error I'm getting with dnx . ef:

dnx : System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNXCore,Version=v5.0': At line:1 char:1 + dnx . ef + ~~~~~~~~ + CategoryInfo : NotSpecified: (System.InvalidO...,Version=v5.0'::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError

EntityFramework.Commands 7.0.0-beta4 EntityFramework.SqlServer 7.0.0-beta4 Microsoft.AspNet.Authentication.Cookies 1.0.0 -beta4 Microsoft.AspNet.Authentication.Facebook 1.0.0-beta4 Microsoft.AspNet.Authentication.Google 1.0.0-beta4
Microsoft.AspNet.Authentication.MicrosoftAccount 1.0.0-beta4
Microsoft.AspNet.Authentication.Twitter 1.0.0-beta4
Microsoft.AspNet.Diagnostics 1.0.0-beta4
Microsoft.AspNet.Diagnostics.Entity 7.0.0-beta4
Microsoft.AspNet.Identity.EntityFramework 3.0.0-beta4
Microsoft.AspNet.Mvc 6.0.0-beta4 Microsoft.AspNet.Mvc.TagHelpers 6.0.0-beta4 Microsoft.AspNet.Server.IIS 1.0.0-beta4 Microsoft.AspNet.Server.WebListener 1.0.0-beta4
Microsoft.AspNet.StaticFiles 1.0.0-beta4
Microsoft.AspNet.Tooling.Razor 1.0.0-beta4 Microsoft.CSharp 4.0.0-beta-22816 Microsoft.Framework.CodeGenerators.Mvc 1.0.0-beta4 Microsoft.Framework.ConfigurationModel.Json 1.0.0-beta4
Microsoft.Framework.ConfigurationModel.UserSecrets 1.0.0-beta4
Microsoft.Framework.Logging 1.0.0-beta4
Microsoft.Framework.Logging.Console 1.0.0-beta4 Microsoft.Net.Http 2.2.29 Microsoft.Owin.Security.Facebook 3.0.1 Microsoft.VisualStudio.Web.BrowserLink.Loader 14.0.0-beta4
Microsoft.WindowsAzure.ConfigurationManager 3.1.0
System.Collections 4.0.10-beta-22816 System.Linq 4.0.0-beta-22816
System.Threading 4.0.10-beta-22816 WindowsAzure.Storage 4.4.1-preview

Searched Locations: C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects{name}\project.json C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\src{name}\project.json
C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\test{name}\project.json

Try running 'dnu restore'.

at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint(String applicationName) at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args) at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)

dnu restore returns these kinds of errors:

dnu : npm ERR! install Couldn't read dependencies At line:1 char:1 + dnu restore + ~~~~~~~~~~~ + CategoryInfo : NotSpecified: (npm ERR! instal...ad dependencies:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError npm ERR! Windows_NT 6.3.9600

npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"

npm ERR! node v0.12.4

npm ERR! npm v2.10.1

npm ERR!

npm debug log file has this:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose readDependencies loading dependencies from C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\package.json
5 error install Couldn't read dependencies
6 verbose stack Error: ENOENT, open 'C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\package.json'
6 verbose stack     at Error (native)
7 verbose cwd C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\artifacts\bin\TestSite\Debug\app
8 error Windows_NT 6.3.9600
9 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
10 error node v0.12.4
11 error npm  v2.10.1
12 error path C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\package.json
13 error code ENOPACKAGEJSON
14 error errno -4058
15 error package.json ENOENT, open 'C:\Users\Jonas\Dropbox\Visual Studio 2015 Projects\TestSite\package.json'
15 error package.json This is most likely not a problem with npm itself.
15 error package.json npm can't find a package.json file in your current directory.
16 verbose exit [ -4058, true ]

I don't know where to start to fix the errors. I haven't found a suggestion that worked.

Thanks for your help.


UPDATE

I resolved it by installing bower and gulp. I don't know why I had to do it now as I never needed it in previous ef migrations on the same project.

0

There are 0 answers