Closed vdanche closed 7 months ago
This problem is also reproduced on Win ARM64.
Also happens on 9.0.100-alpha.1.24066.10 SDK
Can't you point here to the test case where this is defined. The steps are wrong.
I am not able to reproduce it locally. What's likely happening is that you are invoking dotnet <<path-to-dll>>
from the solution folder instead of from inside razortest
hence why it's not able to find the wwwroot
folder.
This behavior hasn't changed.
Hi @vdanche. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@javiercn I see what you mean, we re-check our steps, I did invoke dotnet <dotnet <<path-to-dll>>
from the solution folder instead of from inside razortest, open the link http://localhost:5000/, it show as below and it's also expected?
I access to razortest, and then dotnet <<path-to-dll>>
, the issue will not happen.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.
@javiercn I see what you mean, we re-check our steps, I did invoke dotnet <> from the solution folder instead of from inside razortest. so this warning is expected, right? one more thing, if we invoke
dotnet <<path-to-dll>>
from the solution folder instead of from inside razortest, open the link http://localhost:5000/, it show as below and it's also expected?I access to razortest, and then dotnet
<<path-to-dll>>
, the issue will not happen.
@javiercn if it's expected that must invoke dotnet <
I faced the same issue with VS Code but interestingly when I upgraded Visual Studio 2022 and tried from VS2022, the sites were working fine without any issues
Is there an existing issue for this?
Describe the bug
1.warning "Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[16] The WebRootPath was not found: C:\Users\xxx\web\razorcli\wwwroot. Static files may be unavailable." displayed after running razor.dll file in CLI.![image](https://github.com/dotnet/aspnetcore/assets/65637796/f332a8e6-7c20-4b3b-abb8-0f67461defc4)
Expected Behavior
There is no any errors and warning after running *dll file. and the page( http://localhost:5000) can display well
Steps To Reproduce
Build: dotnet-sdk-8.0.200-preview.24064.2-win-x64 from https://github.com/dotnet/installer on windows11
1.mkdir web
Exceptions (if any)
8.warning "Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[16] The WebRootPath was not found: C:\Users\xxx\web\razorcli\wwwroot. Static files may be unavailable." displayed after running razor.dll file in CLI.![image](https://github.com/dotnet/aspnetcore/assets/65637796/d56f427d-a8c2-41cd-a60c-cc985456e131)
9.The page cannot display well.![image](https://github.com/dotnet/aspnetcore/assets/65637796/ae07b637-1095-46c7-a101-6735f9acd26b)
C:\Users\v-danche\web\razorcli>dotnet C:\Users\v-danche\web\razorcli\razortest\bin\Debug\net8.0\razortest.dll info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[63] User profile is available. Using 'C:\Users\v-danche\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. warn: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[16] The WebRootPath was not found: C:\Users\v-danche\web\razorcli\wwwroot. Static files may be unavailable. 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\web\razorcli info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/ - - - warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect. info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0] Executing endpoint '/Index' info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[103] Route matched with {page = "/Index"}. Executing page /Index info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[105] Executing handler method razortest.Pages.IndexModel.OnGet - ModelState is Valid info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[108] Executed handler method OnGet, returned result . info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[107] Executing an implicit handler method - ModelState is Valid info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[109] Executed an implicit handler method, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. info: Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker[104] Executed page /Index in 59.1026ms info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1] Executed endpoint '/Index' info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/ - 200 - text/html;+charset=utf-8 116.7429ms info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/lib/bootstrap/dist/css/bootstrap.min.css - - - info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/lib/bootstrap/dist/css/bootstrap.min.css - 404 0 - 2.9657ms info: Microsoft.AspNetCore.Hosting.Diagnostics[16] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET http://localhost:5000/lib/bootstrap/dist/css/bootstrap.min.css, Response status code: 404 info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/css/site.css - - - info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/razortest.styles.css - - - info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/razortest.styles.css - 404 0 - 0.4805ms info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/css/site.css - 404 0 - 1.4374ms info: Microsoft.AspNetCore.Hosting.Diagnostics[16] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET http://localhost:5000/razortest.styles.css, Response status code: 404 info: Microsoft.AspNetCore.Hosting.Diagnostics[16] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET http://localhost:5000/css/site.css, Response status code: 404 info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/lib/jquery/dist/jquery.min.js - - - info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/lib/jquery/dist/jquery.min.js - 404 0 - 0.0561ms info: Microsoft.AspNetCore.Hosting.Diagnostics[16] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET http://localhost:5000/lib/jquery/dist/jquery.min.js, Response status code: 404 info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/lib/bootstrap/dist/js/bootstrap.bundle.min.js - - - info: Microsoft.AspNetCore.Hosting.Diagnostics[2] Request finished HTTP/1.1 GET http://localhost:5000/lib/bootstrap/dist/js/bootstrap.bundle.min.js - 404 0 - 0.0735ms info: Microsoft.AspNetCore.Hosting.Diagnostics[16] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET http://localhost:5000/lib/bootstrap/dist/js/bootstrap.bundle.min.js, Response status code: 404 info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://localhost:5000/js/site.js - - -
.NET Version
.NET SDK: Version: 8.0.200-preview.24064.2 Commit: 3662b97225 Workload version: 8.0.200-manifests.9f3f18d7
Runtime Environment: OS Name: Windows OS Version: 10.0.25398 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.200-preview.24064.2\
.NET workloads installed: There are no installed workloads to display.
Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71
.NET SDKs installed: 8.0.200-preview.24064.2 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 8.0.0 [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
Anything else?
No response