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

Multiple WASM Apps issue with renaming dlls #8

Closed
peterthorpe81 opened this issue Mar 1, 2022 · 4 comments
Closed

Multiple WASM Apps issue with renaming dlls #8

peterthorpe81 opened this issue Mar 1, 2022 · 4 comments

Comments

@peterthorpe81
Copy link

I have a hosted blazor project that hosts two WASM apps. One at root / and one at /Public this is to enable different security on each. This is based on the multiple hosting example here https://github.com/javiercn/BlazorMultipleApps updated to .NET 6.0.

Dll's in both projects get the headers changed as PublishBlazorBootStaticWebAsset is passed in for each project but renaming is only on the first _framework folder found:

var frameworkDir = Directory.GetDirectories(PublishDir, "_framework", SearchOption.AllDirectories).First();

My project will have _Framework at wwwroot/_framework and wwwroot/Public/_framework.

Changing to a foreach loop appears to fix it although I am not sure if serviceworker needs adjusting too (I don't use it) I imagine a second service worker would end up in wwwroot/Public

foreach(var frameworkDir in Directory.GetDirectories(PublishDir, "_framework", SearchOption.AllDirectories))

There may be a cleaner way to do this. I assume the PublishBlazorBootStaticWebAsset isn't available after Publish otherwise you would just loop the files with a special case for blazor.boot.json and service-worker-assets.js

@stavroskasidis
Copy link
Owner

Thank you for reporting this. I will check out the example and see how it is best to handle this.

@stavroskasidis
Copy link
Owner

Can you confirm that the 1.4.0-beta package solves the problem ?

@peterthorpe81
Copy link
Author

Fantastic! Yes all working.

@stavroskasidis
Copy link
Owner

Thank you. I will merge the PR into master now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants