-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching my ASP.NET Core app to netcoreapp3.0 and adding a global.json for 3.0.100-preview8-013656: all requests hang #13541
Comments
Please share your current csproj so we can see all of your dependency versions. Note mixing 2.x and 3.0 dependencies is not supported. |
Will do. The only 3.0 dependency was the EF Core Cosmos provider package. Would that be enough to mess things up? |
Maybe, that provider has 3.0 dependencies. |
Here's my .csproj. I now realise that it may be pretty useless without all of the nuget package sources (they're on a private feed). <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>.\bin\Debug\netcoreapp3.0\BeatBrain.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<None Remove="*-config.json" />
<Content Include="*-config.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" Version="3.0.0-preview8.19405.11" />
<PackageReference Include="RedRiver.SaffronCore" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Autofac" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.AspNetCore" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Auth" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.EntityFramework.AuthStore" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.EntityFramework" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.EntityFramework.Tooling" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Queues" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.RedisCore" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Redis.RegularWorker" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Redis.Queues" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Cqrs" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.AutoMapper" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Sql.EventScheduleStore" Version="2.0.1-alpha1-*" />
<PackageReference Include="RedRiver.Saffron.Azure.Email" Version="2.0.1-alpha1-*" />
</ItemGroup>
<!-- front-end files to serve -->
<ItemGroup>
<None Remove="Frontend\Content\**" />
<Content Include="Frontend\Content\**">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Format\AsyncStreams\" />
</ItemGroup>
</Project> For ref, the one with the ASP.NET Core reference: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>xxx</Description>
<VersionPrefix>2.0.1</VersionPrefix>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>RedRiver.Saffron.AspNetCore</AssemblyName>
<PackageId>RedRiver.Saffron.AspNetCore</PackageId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\RedRiver.SaffronCore\RedRiver.SaffronCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0"/>
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.2.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="4.0.1" />
</ItemGroup>
</Project> It's fine if you were to just say "you can't mix any 3.0 nuget packages we have with any non-3.0 nuget packages we have" - I'll get busy upgrading our universe to 3.0. It was just surprising - no warnings, no build errors, it "runs", just requests hang.. |
Yeah, there have been significant breaking changes between 2.2 and 3.0, there's no expectation that any new packages work with the old ones. Upgrade and we'll see how it goes. |
I'm trying to do that now - I'm hopeful. I am having some difficulties though I'm sure the resources are out there somewhere, but not forthcoming to me and I'm feeling pretty stupid - so I'd be very grateful indeed if I might bother with you with but one quick question - How do I upgrade to ASP.NET Core 3.0? This - https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30 - says "If there's no 3.0 version of a package, the package might have been deprecated in 3.0. ". So that includes my main reference, https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc/ . Indeed, #3756 says I shouldn't use it, instead adding a I worked that out (I figured the docs should probably include that?) - but get:
My Many thanks indeed - with this I hope to be able to get everything up-and-running on 3.0. |
@JunTaoLuo @davidfowl where's our guidance for 3.0 class libraries referencing Microsoft.AspNetCore.App? |
Yes, if your library depends on Microsoft.AspNetCore.App, you'll also need to update your tfm to netcoreapp3.0. |
Yep you need to target the netcoreapp3.0 tfm. |
Shouldn't it also be
instead of Microsoft.NET.Sdk? |
I dont know - is that a question for me? The migration doc didnt seem to mention it? |
No it doesn't have to use the Web SDK. Though it has a reference to Microsoft.AspNetCore.App, the project itself is a class library and not a runnable app. |
I've filed a docs issue- dotnet/AspNetCore.Docs#14245 |
Closing as it appears that this is a docs issue and that work is covered by the docs issue: dotnet/AspNetCore.Docs#14309 (cc @DamianEdwards) |
Describe the bug
I have a fairly simple ASP.NET Core app. It's been running fine, but I want to get the latest EF Core 3.0 preview, so I can use Cosmos DB. So, I switched to:
<TargetFramework>netcoreapp3.0</TargetFramework>
and added a global.json with:
{ "sdk": { "version": "3.0.100-preview8-013656" } }
(and of course installed the freshest version of 3.0 preview 8)
I'm running from VS 2019 16.2.3.
My app starts, but any requests (to the default endpoint, to swagger, to my file-serving endpoint, or another Web API endpoint) just seem to "hang" open: the browser page pauses, and
curl
sits there forever. If I break the debugger, there's no managed code runningNote that I did not update any NuGet packages at all, I only made the two changes shared above.
Removing the
<PackageReference Include="Microsoft.EntityFrameworkCore.Cosmos" Version="3.0.0-preview8.19405.11" />
dependency (and associated code) and doing back to<TargetFramework>netcoreapp2.1</TargetFramework>
, the project immediate starts running correctly as before again.To Reproduce
It's a tricky one, though it's a simple app, it uses what is currently our own proprietary internal set of nuget packages to "bootstrap" things to get started.
While I can't share the source here at the moment (though I would be happy to, with MS staff, via email), I wonder if there are any pointers that could be shared to help me track this down, diagnose, or collect appropriate info?
Expected behavior
Everything to work as it did before.
Additional context
dotnet --info
output:(Can't wait for
dotnet uninstall
or similar...)The text was updated successfully, but these errors were encountered: