2015-11-17 6 views
1

DNX Reference IssueЗастрял с DNX эталонным вопроса в ASP.NET 5/VS2015

Это ошибка, которую я получаю, и я установил с Powershell 3.0 Пожалуйста, помогите мне с решением. Не знаете, как преодолеть эту проблему. Я пытался обновить DNVM, но ничего не работает :(

PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git 
C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\dnx.exe "C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Projects\MVA\src\MVA" -s "C:\Program Files (x86)\Microsoft Web Tools\DNU" 
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified. 
File name: 'Microsoft.DNX.PackageManager' 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName) 
    at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) 
WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git 
C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\dnx.exe "C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Projects\MVA\src\MVA" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU" 
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified. 
File name: 'Microsoft.DNX.PackageManager' 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName) 
    at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) 
WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git 
C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\dnx.exe "C:\Users\Selva\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\lib\Microsoft.DNX.PackageManager\Microsoft.DNX.PackageManager.dll" restore "C:\Projects\MVA\src\MVA" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU" 
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DNX.PackageManager' or one of its dependencies. The system cannot find the file specified. 
File name: 'Microsoft.DNX.PackageManager' 
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName) 
    at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, String appBase, FrameworkName targetFramework) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext) 
    at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext) 
WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

Мой Project.Json идет, как показано ниже

{ 
    "webroot": "wwwroot", 
    "userSecretsId": "aspnet5*************************************", 
    "version": "1.0.0-*", 

    "dependencies": { 
    "EntityFramework.SqlServer": "7.0.0-beta5", 
    "EntityFramework.Commands": "7.0.0-beta5", 
    "Microsoft.AspNet.Mvc": "6.0.0-beta5", 
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta5", 
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta5", 
    "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta5", 
    "Microsoft.AspNet.Authentication.Google": "1.0.0-beta5", 
    "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta5", 
    "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta5", 
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta5", 
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta5", 
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5", 
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta5", 
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta5", 
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta5", 
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta5", 
    "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta5", 
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta5", 
    "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta5", 
    "Microsoft.Framework.Logging": "1.0.0-beta5", 
    "Microsoft.Framework.Logging.Console": "1.0.0-beta5", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta5" 
    }, 

    "commands": { 
    "web": "Microsoft.AspNet.Hosting --config hosting.ini", 
    "ef": "EntityFramework.Commands" 
    }, 

    "frameworks": { 
    "dnx451": { }, 
    "dnxcore50": { } 
    }, 

    "exclude": [ 
    "wwwroot", 
    "node_modules", 
    "bower_components" 
    ], 
    "publishExclude": [ 
    "node_modules", 
    "bower_components", 
    "**.xproj", 
    "**.user", 
    "**.vspscc" 
    ], 
    "scripts": { 
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ] 
    } 
} 
+0

Если бы вы могли добавить 'project.json', это помогло бы нам. –

ответ

1

Эта проблема, как представляется, были исправлены в новой версии программы из ASP.net, which is available here.

на основе on this discussion из GitHub

+0

Он работает 'beta8'. –

+0

Да. Я запускаю бета-версию 8. – user5555457

+1

Перейдите на бета5 - щелкните по любому проекту-> Свойства-> Приложение, выберите beta5. Использование 'dnvm use 1.0.0-beta5' вам не поможет. Между этими двумя релизами произошли изменения. – pg0xC

2

Я нахожусь под впечатлением, что у вас есть версия рассогласования (старший проект с новой версией базы).

Во-первых, убедитесь, что у вас есть beta8 tooling установлен. Затем зайдите в свои свойства проекта и не забудьте изменить целевое время выполнения на beta8.

Наконец, проверьте свои project.json, чтобы убедиться, что вы не остались с pre-beta8 пакетами.

В вашем project.json убедитесь, что убрали ссылки на beta5 и замените их на beta8. Некоторые пакеты были переименованы, а некоторые были объединены, поэтому вы, возможно, не сможете заменить все.

Если вы работаете в IIS и зависит от Microsoft.AspNet.Server.IIS, не забудьте добавить app.RunIISPipeline(); в свой метод Startup.cs/Configure().

+0

И, как уже упоминалось, у вас есть целая куча старых пакетов. Замените 'beta5' на' beta8'. Помните, что некоторые пакеты были переименованы и могут не работать. –

+0

Я не вижу каких-либо пакетов для обновления, когда я открыл свой менеджер пакетов Nuget. Все мои пакеты устарели. – user5555457

+0

System.IO.FileNotFoundException: Не удалось загрузить файл или сборку «Microsoft.DNX.PackageManager» или одну из его зависимостей. Система не может найти указанный файл. 1> Имя файла: 'Microsoft.DNX.PackageManager' – user5555457

1

Вам нужно не только установить бета-8, но и набор инструментов для Visual Studio. вы можете скачать here. В частности, вам необходимо скачать и установить WebToolsExtensionsVS14.msi