Blazor CSS Isolation doesn't work with docker

0

I created a new server-side blazor project with docker support.
This works fine with or without docker.

Now I add a blazor library project with it's own isolated css files.
This doesn't work with docker, but is fine outside the container.

It throws:

System.IO.DirectoryNotFoundException
  HResult=0x80070003
  Message=C:\_work\MyLib\obj\Debug\net5.0\scopedcss\projectbundle\
  Source=Microsoft.Extensions.FileProviders.Physical
  StackTrace:
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs:line 64
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) in /_/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalFileProvider.cs:line 45
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsFileProvider..ctor(String pathPrefix, String contentRoot) in /_/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsFileProvider.cs:line 37
   at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__2_0(ContentRootMapping cr) in /_/src/Hosting/Hosting/src/StaticWebAssets/StaticWebAssetsLoader.cs:line 40

Blazor seems to be referencing my dev files (C:\_work\...) rather than the docker container files (c:\app\...)

docker
blazor
asked on Stack Overflow Mar 23, 2021 by Ray

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0