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

[NETSDKE2E] With Net9 preview 6 installed, running `dotnet razor.dll' failed after opening http://localhost:5000 via browser. #41776

Open
v-shuli1 opened this issue Jun 25, 2024 · 9 comments
Assignees
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Bug

Comments

@v-shuli1
Copy link
Member

v-shuli1 commented Jun 25, 2024

Reproduction Steps
1.install net9 preview 6 sdk(9.0.100-preview.6.24324.8) on win11.
2.dotnet new razor
3.dotnet build
4.dotnet bin\Debug\net9.0\razor.dll
5.open http://localhost:5000 via broswer

Expected Result:
The .dll profile execute successfully.
Actual Result:
The .dll profile execute failed.
image

Log:
C:\Users\v-danche\myrazor>dotnet bin\Debug\net9.0\myrazor.dll
info: Microsoft.Hosting.Lifetime[14]
Now listening on:
http://localhost:5000/
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\v-danche\myrazor
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'myrazor.styles.css.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'lib/jquery/dist/jquery.min.js.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'lib/bootstrap/dist/css/bootstrap.min.css.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'lib/bootstrap/dist/js/bootstrap.bundle.min.js.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'css/site.css.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'js/site.js.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The file 'favicon.ico.gz' could not be found.
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.get_FileInfo()
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

dotnet --info:
C:\Users\v-shuli1>dotnet --info
.NET SDK:
Version: 9.0.100-preview.6.24324.8
Commit: 9941bdf
Workload version: 9.0.100-manifests.de958006
MSBuild version: 17.11.0-preview-24318-05+4a45d5633

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100-preview.6.24324.8\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.

Host:
Version: 9.0.0-preview.6.24321.8
Architecture: x64
Commit: static

.NET SDKs installed:
9.0.100-preview.6.24324.8 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.0-preview.6.24324.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.0-preview.6.24321.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 9.0.0-preview.6.24322.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Jun 25, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@v-shuli1 v-shuli1 changed the title [NETSDKE2E] With Net9 preview 6 installed, run `dotnet razor.dll' failed when opening http://localhost:5000 via browser. [NETSDKE2E] With Net9 preview 6 installed, running `dotnet razor.dll' failed after opening http://localhost:5000 via browser. Jun 25, 2024
@v-xiaofchen
Copy link

This issue also repro on Mac OS.
image

@v-jieyan2
Copy link

This problem is also reproduced on Win ARM64.
image

@marcpopMSFT marcpopMSFT added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Jun 25, 2024
@marcpopMSFT
Copy link
Member

@dotnet/aspnet-blazor-eng to investigate

@vdanche
Copy link
Member

vdanche commented Jun 27, 2024

This issue still repro on coherent preview 6 build 9.0.100-preview.6.24325.8

@mkArtakMSFT mkArtakMSFT removed the untriaged Request triage from a team member label Jun 27, 2024
@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Jun 27, 2024

So it seems that running the project with dotnet run without the assembly works. So this doesn't seem to be a blocker.

I've asked @joperezr to check if this is a blocker for Aspire or not.

@joperezr
Copy link
Member

I only tested main CLI scenarios for aspire, but this doesn't seem to be a blocker either. Looks like Aspire AppHost launches projects using dotnet run --no-build ... and dotnet watch .... and so this seems to be non blocking for Aspire either:

https://github.com/dotnet/aspire/blob/88c5c19567a12e2957e06952bbd9ef7a1a25a20e/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs#L1049-L1067

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Jun 27, 2024

@javiercn assigning this to you to tackle when you're back for preview 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Bug
Projects
None yet
Development

No branches or pull requests

8 participants