Reputation: 1459
I have a Web Api application targeting NET Core 2.1. When I upgrade the Microsoft.AspNetCore.All nuget package to v2.1.1, the application stops running.
My dotnet:
$ dotnet --version
2.1.300
In my Windows Application event viewer, I first see this warning:
The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\myproj.Logs.HostedApi AppPool is invalid. Static compression is being disabled.
And then I have two of this error:
Log Name: Application
Source: IIS Express AspNetCore Module
Date: 6/21/2018 4:15:11 PM
Event ID: 1000
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CarbonVic
Description:
Application 'MACHINE/WEBROOT/APPHOST/MYPROJ.LOGS.HOSTEDAPI' with physical root 'C:\myproj\Code\myproj-moonshot\apps\myproj.Logs\myproj.Logs.HostedApi\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\me\AppData\Local\Temp\tmp27D2.tmp"', ErrorCode = '0x80004005 : 0.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="IIS Express AspNetCore Module" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2018-06-21T20:15:11.470607900Z" />
<EventRecordID>9844</EventRecordID>
<Channel>Application</Channel>
<Computer>machinename</Computer>
<Security />
</System>
<EventData>
<Data>Application 'MACHINE/WEBROOT/APPHOST/myproj.LOGS.HOSTEDAPI' with physical root 'C:\myproj\Code\myproj-moonshot\apps\myproj.Logs\myproj.Logs.HostedApi\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\me\AppData\Local\Temp\tmp27D2.tmp"', ErrorCode = '0x80004005 : 0.</Data>
</EventData>
</Event>
Every machine in my shop has this issue. We had to revert back to Microsoft.AspNetCore.All v2.0.8 to make it work again.
Funny thing is: there is no c:\inetpub on any of our machines and there never has been.
Also, I tried to run it on both IISExpress and self-hosted; it will not start with either profile.
Am I missing something here? Anyone know if there's a fix for this?
Help is appreciated always.
V
Upvotes: 4
Views: 2737
Reputation: 2313
Well, the good news is that .NET Core 2.1.1 is released now, so you can go and install the new SDK version (2.1.301) from https://dot.net. :)
Now about the issue you had: The meta packages work by referencing the shared framework, which gets installed by the SDK. Since the SDK for 2.1.1 was not installed (2.1.301) your application blew up.
You also mentioned that in the NuGet window the updated packages where already visible. That's true. The individual packages were already released. They just couldn't be resolved because the Microsoft.AspNetCore.All metapackage version 2.1.1 wasn't installed.
On a sidenote: It's recommended to target Microsoft.AspNetCore.App instead of .All . Also the version number can be inferred from the SDK, so you can remove that too. See: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/metapackage?view=aspnetcore-2.1#migrate
Upvotes: 1
Reputation: 46631
The 2.1.1 release is still in progress. You should use the 2.1.0 packages until it's complete: https://twitter.com/DamianEdwards/status/1009873842662043648.
Upvotes: 0