我在Windows 10 Tech Preview上运行Visual Studio 2015。
这就是我对dnvm列表所拥有的:
活动版运行时架构位置
别名
------ ------- ------- ------------ -------- -----
1.0.0-beta4 clr x64 C:\ Users \ Jonas.dnx \ runtimes
1.0.0-beta4 clr x86 C:\ Users \ Jonas.dnx \ runtimes默认值 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
这是我在使用dnx时遇到的错误。 EF:
dnx:System.InvalidOperationException:无法解析目标框架的以下依赖项 ' DNXCore,版本= v5.0':在行:1字符: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预览搜索位置: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 项目\测试网站\ {测试名} \ project.json尝试运行' 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返回这些错误:
dnu:npm ERR!安装无法读取依赖关系在行:1 char:1 + dnu恢复 + ~~~~~~~~~~~ + CategoryInfo:未指定:(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" "安装"
npm ERR!节点v0.12.4
npm ERR! npm v2.10.1
npm ERR!
npm调试日志文件包含:
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 npm@2.10.1
3 info using node@v0.12.4
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 ]
我不知道从哪里开始修复错误。我还没有找到一个有效的建议。
感谢您的帮助。
更新
我通过安装bower和gulp解决了这个问题。我不知道为什么我现在必须这样做,因为在以前的同一项目的ef迁移中我从未需要它。