简体   繁体   English

VS2015社区ASP.NET5依赖注入和Azure在UWP更新后发布错误

[英]VS2015 Community ASP.NET5 Dependency injection and azure publish errors after UWP update

Until recently i had working asp.net 5 mvc webapi project. 直到最近,我还在工作asp.net 5 mvc webapi项目。 It worked locally and i was able to push it to azure cloud (publish option). 它在本地工作,我能够将其推送到天蓝色的云(发布选项)。 About week ago i started to work on universal windows app for rasberry pi 3 - so i installed necessary package (Visual Studio Tools for Universal Windows Apps) with couple more updates from gallery (new version for ASP.NET and Web Tools probably). 大约一周前,我开始为rasberry pi 3开发通用Windows应用程序-因此我安装了必要的软件包(适用于通用Windows应用程序的Visual Studio工具),并提供了来自库的更多更新(可能是ASP.NET和Web工具的新版本)。 When i got back to working on webapi project i've noticed warnings: 当我回到从事webapi项目的工作时,已经注意到警告:

DOTNET1015 The 'compilationOptions' option is deprecated. DOTNET1015不建议使用“ compilationOptions”选项。 Use 'buildOptions' instead. 请改用“ buildOptions”。

DOTNET1015 The 'exclude' option is deprecated. DOTNET1015不建议使用“排除”选项。 Use 'exclude' within 'compile' or 'embed' instead. 在“编译”或“嵌入”中使用“排除”。

DOTNET1015 The 'publishExclude' option is deprecated. DOTNET1015不建议使用'publishExclude'选项。 Use 'publishOptions' instead. 请改用“ publishOptions”。

in my project.json file So something must have changed after those updates. 在我的project.json文件中,因此在这些更新之后必须有所更改。 Project build passes but when i start it locally on debug and IIS Express i get: 项目构建通过,但是当我在调试和IIS Express上本地启动时,我得到:

An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Extensions.DependencyInjection.Abstractions.dll Microsoft.Extensions.DependencyInjection.Abstractions.dll中发生了类型为'System.InvalidOperationException'的未处理异常

Additional information: No service for type 'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment' has been registered. 附加信息:没有注册类型'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment'的服务。

And when i try tu push it to azure i get some errors in my language (polish) about metabase problems and wrong format of paths eg. 当我尝试将其推到蔚蓝时,我在语言(抛光)中遇到了一些有关配置数据库问题和错误路径格式的错误。 lm/w3svc//ROOT/ lm / w3svc // ROOT /

my project.json file: http://pastebin.pl/view/f823f093 我的project.json文件: http : //pastebin.pl/view/f823f093

VS info: http://pastebin.pl/view/86bae236 VS信息: http//pastebin.pl/view/86bae236

I try to clean and rebuild solution, restore packages but its probably something else. 我尝试清理和重建解决方案,还原软件包,但可能还有其他问题。 What can i do except of uninstalling VS and instaling one more time? 除了卸载VS并再安装一次外,我还能做什么?

Complete uninstall of VS 2015 Comunity and clean install of AspNet5.ENU.RC1_Update1_KB3137909 did the trick for me. 2015年VS的Comunity完全卸载干净安装的AspNet5.ENU.RC1_Update1_KB3137909奏效了我。 Problematic update probably was https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935?SRC=VSIDE 有问题的更新可能是https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935?SRC=VSIDE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM