When I deploy, the app fails to start with a 500.30 error, and the stdout log is:
Unhandled exception. System.IO.DirectoryNotFoundException: C:\Users\Rob\.nuget\packages\umbraco.cms.staticassets\12.0.1\staticwebassets\
at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__1_0(String contentRoot)
at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory)
at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest)
at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration)
at Microsoft.Extensions.Hosting.HostBuilder.InitializeAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Umbraco.Cms.Web.Common.Hosting.UmbracoHostBuilderDecorator.Build()
at MyApp.Program.Main(String[] args) in X:\Src\MS.NET\MyApp\MyApp\Program.cs:line 11
I installed Umbraco using the command line tools and it all worked fine, but I need to extend it, so built the solution and in VS and now it won't start.
Having researched UseStaticWebAssets it seems it's only of use in development and I think I just don't need it for my build and deployment process. Everything works anyway.
I am having kind of the same problem when trying to create a docker image. However, commenting out webBuilder.UseStaticAssets does not work for me. I do not have this file either: MyApp.staticwebassets.runtime.json. Where should I look these static assets? Thanks
For me, I noticed that the Publish process was throwing an error in the output window and then reporting a successful publish. When in fact the publish was not successful. The error was "unable to remove directory \obj\Release\net7.0\PubTmp\Out\". I went in and manually removed that folder and re-published the site and that did the trick. Hope this helps someone else.
umbraco.cms.staticassets issue
Okay, I'm really stuck on this one.
I have a project for an Umbraco 12 site, which I am building then deploying to a web server.
However, every build it generates a
MyApp.staticwebassets.runtime.json
file containing the current local user:"ContentRoots":["C:\\Users\\Rob\\.nuget\\packages\\umbraco.cms.staticassets\\12.0.1\\staticwebassets\\"]
When I deploy, the app fails to start with a 500.30 error, and the stdout log is:
I installed Umbraco using the command line tools and it all worked fine, but I need to extend it, so built the solution and in VS and now it won't start.
What am I doing wrong?!
If I comment out
webBuilder.UseStaticWebAssets();
from Program.cs it works but ... that must be there for a reason right?Having researched UseStaticWebAssets it seems it's only of use in development and I think I just don't need it for my build and deployment process. Everything works anyway.
I am having kind of the same problem when trying to create a docker image. However, commenting out webBuilder.UseStaticAssets does not work for me. I do not have this file either: MyApp.staticwebassets.runtime.json. Where should I look these static assets? Thanks
I had this same error on a v11.2 site.
For me, I noticed that the Publish process was throwing an error in the output window and then reporting a successful publish. When in fact the publish was not successful. The error was "unable to remove directory \obj\Release\net7.0\PubTmp\Out\". I went in and manually removed that folder and re-published the site and that did the trick. Hope this helps someone else.
is working on a reply...