Skip to content
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

.NET 6 Preview 5 #6389

Closed
1 task
rbhanda opened this issue Jun 17, 2021 · 22 comments
Closed
1 task

.NET 6 Preview 5 #6389

rbhanda opened this issue Jun 17, 2021 · 22 comments

Comments

@rbhanda
Copy link
Contributor

rbhanda commented Jun 17, 2021

Release Notes

Please report any issues you find with .NET 6, either responding to this issue, creating a new issue or creating a new issue in one of the following repos:

Known Issues

If there are any issues with this release we will track them here and check issues off as they're resolved. See the linked issues for details on progress and resolution details.

@leecow leecow pinned this issue Jun 17, 2021
@rusuly
Copy link

rusuly commented Jun 18, 2021

Hi, I'm blocked by the JWT Handler issue which occurs after migrating from preview 4 to preview 5

@vahpetr
Copy link

vahpetr commented Jun 18, 2021

Hi. After migration from preview 4 to preview 5 builder.WebHost.UseWebRoot("wwwroot") break application.
Unhandled exception. System.ArgumentException: The path must be absolute. (Parameter 'root')

@hugocorreia90
Copy link

hugocorreia90 commented Jun 19, 2021

Hi, I'm getting this error "error NU1102: Unable to find package System.ComponentModel.Annotations with version (>= 6.0.0-preview.5.21217.1) - Found 57 version(s) in nuget.org [ Nearest version: 6.0.0-preview.4.21253.7 ]" after upgrading from preview 4 to 5.

@gdar91
Copy link

gdar91 commented Jun 20, 2021

Web API server fails to start when you have more than 3 hosted services registered. Error message: System.InvalidOperationException: Server has already started.

Steps to reproduce:

  1. Create an empty solution.
  2. Create a new Web API project inside the solution directory.
  3. Create at least 4 background services (or create a generic one and add it at least four times.)
  4. From the command prompt, go to the project directory and launch it from there (don't launch it from the root with a --project flag)
  5. The error will pop up

It will work if you launch it from the solution root and specify a --project flag. But it won't serve any Blazor content. And this can be counted as another issue I guess.

@mairaw
Copy link
Contributor

mairaw commented Jun 21, 2021

Adding @danroth27 and @LadyNaggaga to see if these issues are already being tracked

@danroth27
Copy link
Member

Hi, I'm getting this error "error NU1102: Unable to find package System.ComponentModel.Annotations with version (>= 6.0.0-preview.5.21217.1) - Found 57 version(s) in nuget.org [ Nearest version: 6.0.0-preview.4.21253.7 ]" after upgrading from preview 4 to 5.

@hmsca See dotnet/announcements#190. System.ComponentModel.Annotations is now part of the shared framework in .NET 6, so you should remove the package reference.

@danroth27
Copy link
Member

Hi. After migration from preview 4 to preview 5 builder.WebHost.UseWebRoot("wwwroot") break application.
Unhandled exception. System.ArgumentException: The path must be absolute. (Parameter 'root')

@BrennanConroy @shirhatti Was this an intentional change in behavior?

@BrennanConroy
Copy link
Member

@halter73 This looks like they're using ConfigureWebHostBuilder, anyone known issues/changes from preview4 to preview5 around this area?

@vahpetr
Copy link

vahpetr commented Jun 22, 2021

Hi again. After migration from preview 4 to preview 5 .PersistKeysToDbContext<DataProtectionDbContext>(); not work.
Npgsql.PostgresException (0x80004005): 23502: null value in column "Id" of relation "DataProtectionKeys" violates not-null constraint

@halter73
Copy link
Member

halter73 commented Jun 23, 2021

Thanks for the report @hmsca! This is being tracked by dotnet/aspnetcore#33795.

For anyone wanting a workaround, you could do something like the following to get an absolute path:

var absolutePath = Path.Combine(builder.Environment.ContentRootPath, "www");
builder.WebHost.UseWebRoot(absolutePath);

@smj0x
Copy link

smj0x commented Jun 24, 2021

.NET 6 Preview 5, Blazor Webassembly has issue's with some of the Chrome Client and Firefox which results in halting the total functionality of the web app, Here is the Console Print

dotnet.6.0.0-preview.5.21301.5.js:1 Uncaught (in promise) Error: Microsoft.JSInterop.JSException: Could not find 'Blazor._internal.endInvokeDotNetFromJS' ('endInvokeDotNetFromJS' was undefined).
Error: Could not find 'Blazor._internal.endInvokeDotNetFromJS' ('endInvokeDotNetFromJS' was undefined).
    at blazor.webassembly.js:1
    at Array.forEach (<anonymous>)
    at n.findFunction (blazor.webassembly.js:1)
    at Object.b [as findJSFunction] (blazor.webassembly.js:1)
    at Object.ct [as invokeJSFromDotNet] (blazor.webassembly.js:1)
    at _mono_wasm_invoke_js_blazor (dotnet.6.0.0-preview.5.21301.5.js:1)
    at dotnet.wasm:0x1930bb
    at dotnet.wasm:0x5972b
    at dotnet.wasm:0x4541e
    at dotnet.wasm:0x12d0c6
   at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[String,Boolean,String,Object](String , String , Boolean , String , Int64 )
   at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[String,Boolean,String,Object](String , String , Boolean , String )
  at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.EndInvokeDotNet(DotNetInvocationInfo , DotNetInvocationResult& )
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.BeginInvokeDotNet(JSRuntime , DotNetInvocationInfo , String )
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.<>c.<BeginInvokeDotNet>b__8_0(ValueTuple`2 )
   at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyCallQueue.Schedule[ValueTuple`2](ValueTuple`2 , Action`1 )
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.BeginInvokeDotNet(String , String , String , String )
    at Object._convert_exception_for_method_call (dotnet.6.0.0-preview.5.21301.5.js:1)
    at Object._handle_exception_for_call (dotnet.6.0.0-preview.5.21301.5.js:1)
    at managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_BeginInvokeDotNet (managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_BeginInvokeDotNet:20)
    at Object.beginInvokeDotNetFromJS (blazor.webassembly.js:1)
    at h (blazor.webassembly.js:1)
    at Object.e.invokeMethodAsync (blazor.webassembly.js:1)
    at blazor.webassembly.js:1
    at ie (blazor.webassembly.js:1)
    at ae (blazor.webassembly.js:1)
    at blazor.webassembly.js:1

@WeihanLi
Copy link
Contributor

WeihanLi commented Jun 24, 2021

When I upgrade .NET 6 preview 4 to preview 5, I'm using a new JsonNode API introduced in preview 4(JsonNode.Parse(responseStr)), I got an error like follows:

Error CS0234: The type or namespace name 'Node' does not exist in the namespace 'System.Text.Json' (are you missing an assembly reference?)

You can find my sample code here if needed

@hugocorreia90
Copy link

hugocorreia90 commented Jun 24, 2021

Hi, I'm getting this error "error NU1102: Unable to find package System.ComponentModel.Annotations with version (>= 6.0.0-preview.5.21217.1) - Found 57 version(s) in nuget.org [ Nearest version: 6.0.0-preview.4.21253.7 ]" after upgrading from preview 4 to 5.

@danroth27, the comment you left here https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-5/#comment-3439 solved my issue. Upgrading Microsoft.VisualStudio.Web.CodeGeneration.Design from 6.0.0-preview.5.21313.1 to 6.0.0-preview.5.21321.1 did the job! Thank you 👍

@WeihanLi
Copy link
Contributor

WeihanLi commented Jun 24, 2021

When I upgrade .NET 6 preview 4 to preview 5, I'm using a new JsonNode API introduced in preview 4(JsonNode.Parse(responseStr)), I got an error like follows:

Error CS0234: The type or namespace name 'Node' does not exist in the namespace 'System.Text.Json' (are you missing an assembly reference?)

You can find my sample code here if needed

Namespace changed from System.Text.Json.Node to System.Text.Json.Nodes

@shrinidhi111
Copy link

Does anyone know whether this comes pre-installed in Windows 11?

@danroth27
Copy link
Member

@shrinidhi111 .NET 6 is not installed with Windows 11.

@danroth27
Copy link
Member

.NET 6 Preview 5, Blazor Webassembly has issue's with some of the Chrome Client and Firefox which results in halting the total functionality of the web app

@smjltd Thanks for reporting this! Could you please open an issue in the https://github.com/dotnet/aspnetcore/issues/new with details on how to reproduce the error you're seeing?

@nbarnwell
Copy link

Just a little thing I noticed - if you use Add/Remove programs to uninstall the SDK, it actually leaves the folder behind with a zero-byte file in it in C:\Program Files\dotnet\sdk. This confuses dotnet.exe into thinking the SDK is installed, yet doesn't have a dotnet.dll in it. I deleted the folder by hand and now dotnet.exe --info lists only the real SDKs I have installed, and has started working again. Seems like the installer just needs to make sure the folder is removed.

@vahpetr
Copy link

vahpetr commented Jul 3, 2021

Appsettings do not merge.

Example:
appsettings.json { "Logging": { "LogLevel": { } } }
appsettings.Development.json { "Logging": { "LogLevel": { "Microsoft.AspNetCore.SignalR": "Trace" } } }

export ASPNETCORE_ENVIRONMENT=Development
dotnet run

Result: { "Logging": { "LogLevel": { } } }

@krwq
Copy link
Member

krwq commented Jul 6, 2021

@vahpetr this looks like separate issue, can you please create a new one?

@rbhanda rbhanda unpinned this issue Jul 14, 2021
@rbhanda
Copy link
Contributor Author

rbhanda commented Jul 14, 2021

closed in favor of #6467

@rbhanda rbhanda closed this as completed Jul 14, 2021
@smj0x
Copy link

smj0x commented Aug 8, 2021

faced same issue while updating the dotnet 6 preview 4 to preview 6.

i fixed by creating new blazor webassembly project using preview 6. and then replaced App.razor file

<Router AppAssembly="@typeof(Program).Assembly"> <Found Context="routeData"> <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> <FocusOnNavigate RouteData="@routeData" Selector="h1" /> </Found> <NotFound> <LayoutView Layout="@typeof(MainLayout)"> <p role="alert">Sorry, there's nothing at this address.</p> </LayoutView> </NotFound> </Router>

this was the change i noticed
PreferExactMatches="@true"

also removed below refrence from .csproj file
<PackageReference Include="System.Net.Http.Json" Version="6.0.0-preview.6.21352.12" />
more testing is required on different machines, but works on mine after applying above changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests