2015-05-06 3 views
1

Я только что закончил обновление до бета4. Мой код успешно компилируется без ошибок/предупреждений, но я не могу запустить свой веб-api, размещенный в IIS Express (нажав F5). Я получаю следующее сообщение об ошибке:Не удалось определить подходящую версию времени выполнения для запуска

Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303

[HttpException (0x80004005): Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9940016 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.57.0

Вот выход из dnvm list:

C:\src\web-api-skeleton [master]> dnvm list

Active Version Runtime Architecture Location Alias


  • 1.0.0-beta4 clr x64 C:\Users\dpeden.dnx\runtimes default
    1.0.0-beta4 clr x86 C:\Users\dpeden.dnx\runtimes
    1.0.0-beta4 coreclr x64 C:\Users\dpeden.dnx\runtimes
    1.0.0-beta4 coreclr x86 C:\Users\dpeden.dnx\runtimes
    1.0.0-beta4-11566 clr x86 C:\Users\dpeden.dnx\runtimes

Я также попытался явно устанавливая выполнения (Use Specific Runtime на вкладке Debug свойств проекта), который не появляется имеют какой-либо эффект.

У меня не было этой проблемы до перехода на VS 2015 RC и beta4 из VS 2015 CTP 6 и beta3.

Как его разрешить?

Спасибо.

Cross reference on ASP.NET Forums

ответ

0

Оказывается, что это была простая задача. Прочитав https://github.com/aspnet/Announcements/issues/3, я понял, что изменил aspnet50 на dnx46, тогда как это должно было быть dnx451. Сделав это изменение во всех моих файлах project.json, моя проблема была решена.

Отрывок:

"рамки": { "dnx451": {}} ,