简体   繁体   中英

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

Until recently i had working asp.net 5 mvc webapi project. 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). When i got back to working on webapi project i've noticed warnings:

DOTNET1015 The 'compilationOptions' option is deprecated. Use 'buildOptions' instead.

DOTNET1015 The 'exclude' option is deprecated. Use 'exclude' within 'compile' or 'embed' instead.

DOTNET1015 The 'publishExclude' option is deprecated. Use 'publishOptions' instead.

in my project.json file So something must have changed after those updates. Project build passes but when i start it locally on debug and IIS Express i get:

An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Extensions.DependencyInjection.Abstractions.dll

Additional information: No service for type 'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment' has been registered.

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/

my project.json file: http://pastebin.pl/view/f823f093

VS info: 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?

Complete uninstall of VS 2015 Comunity and clean install of AspNet5.ENU.RC1_Update1_KB3137909 did the trick for me. Problematic update probably was https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935?SRC=VSIDE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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