Blazor server side: dotnet run fails with InvalidOperationException on MacOS
See original GitHub issueDescribe the bug
dotnet run
fails with the follwing exception on MacOS for blazorserverside projects
System.InvalidOperationException: Could not load the embedded file manifest 'Microsoft.Extensions.FileProviders.Embedded.Manifest.xml' for assembly 'Microsoft.AspNetCore.Components.Server'.
at Microsoft.Extensions.FileProviders.Embedded.Manifest.ManifestParser.Parse(Assembly assembly, String name)
at Microsoft.Extensions.FileProviders.ManifestEmbeddedFileProvider..ctor(Assembly assembly)
at Microsoft.AspNetCore.Components.Server.ConfigureStaticFilesOptions.PostConfigure(String name, StaticFileOptions options)
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware..ctor(RequestDelegate next, IWebHostEnvironment hostingEnv, IOptions`1 options, ILoggerFactory loggerFactory)
--- End of stack trace from previous location where exception was thrown ---
To Reproduce
Steps to reproduce the behavior:
- Get the latest preview4 sdk from core-sdk
- dotnet new blazorserverside
- dotnet run
Expected behavior
The app runs successfully
Additional context
Note: This doesn't happen for client-side blazor projects.
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview4-011216
Commit: 19c844a865
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/3.0.100-preview4-011216/
Host (useful for support):
Version: 3.0.0-preview4-27613-07
Commit: 5c329c85ae
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Blazor server side: dotnet run fails with ...
Describe the bug dotnet run fails with the follwing exception on MacOS for blazorserverside projects System.InvalidOperationException: Could ...
Read more >c# - Blazor Server - System.InvalidOperationException is ...
I'm developing a application on Blazor Server (.NET 6). This exception occur a lot of times. But this exception occur in each page...
Read more >Blazor server app won't run reliably from Mac Visual Studio
I have a Blazor server app in Mac Visual Studio 2019. ... If it doesn't work with dotnet run, then there is an...
Read more >Blazor FAQ - Troubleshooting
While upgrading Blazor applications, you many encounter these issues. You have to do the following changes to properly run the application: Update all...
Read more >Handle errors in ASP.NET Core Blazor apps
This article describes how Blazor manages unhandled exceptions and how to develop apps that detect and handle errors.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@guardrex it will be released with preview 5, but you can try out a nightly build.
Daniel Roth
Same problem in linux
Is there any workaround?