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

Provide a simple built-in way to change the file extension used for .NET assemblies in Blazor WebAssembly apps #21489

Closed
danroth27 opened this issue May 5, 2020 · 10 comments
Labels
affected-few This issue impacts only small number of customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-deployment Issues related to deploying Blazor feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. severity-minor This label is used by an internal tool
Milestone

Comments

@danroth27
Copy link
Member

We documented how you can script changing the file extension used for .NET assemblies in a Blazor WebAssembly app. But it would be nice to have a simple built-in way to do this.

Suggestion from @stavroskasidis:

Hopefully one day this could all be handled by the framework with a flag in the csproj, e.g.

<BlazorBinariesExtension>.bin</BlazorBinariesExtension>
@danroth27 danroth27 added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly enhancement This issue represents an ask for new feature or an enhancement to an existing one labels May 5, 2020
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone May 5, 2020
@mihaimyh
Copy link

mihaimyh commented May 5, 2020

From what I can see the rename from .dll to .bin must be done also in wwwroot/service-worker-assets.js and remove or re-compress wwwroot/service-worker-assets.js.br and wwwroot/service-worker-assets.js.gz, otherwise there are integrity issues in browser's console.

@danroth27
Copy link
Member Author

From what I can see the rename from .dll to .bin must be done also in wwwroot/service-worker-assets.js and remove or re-compress wwwroot/service-worker-assets.js.br and wwwroot/service-worker-assets.js.gz, otherwise there are integrity issues in browser's console.

@guardrex @SteveSandersonMS Do you need to update the docs on this to account for this?

@guardrex
Copy link
Contributor

guardrex commented May 5, 2020

The current doc does NOT address service-worker-assets.js; so if that's an issue, we'll need the doc to reflect it.

After I hear back that it should be called out, I'll open an doc issue to address it. 👂

@SteveSandersonMS
Copy link
Member

Yes, the same filename replacements would need to be made in the service worker assets manifest too.

@darcythomas
Copy link

I wonder if there is a risk some AV scanners may inspect files looking for dll magic strings.?! So it would be nice if there were some way of obfuscating the files. Say by a simple XOR encryption with a random key that is included in the blazor.boot.json Or if you want to be fancy using CryptoJS.AES

Thoughts?

@smartprogrammer93
Copy link

I believe this should get more love since dotnet/AspNetCore.Docs#18551
and cases like #21996 might happen more often with dll file ending

@guardrex
Copy link
Contributor

@smartprogrammer93 asked about guidance for compression. Today, we just say that it's up to the dev to deal with recompressing blazor.boot.json. Should I seek to expand the doc scripts to handle compression? I'd rather not if the framework is going to get something built in. I'm 🏃 on a lot of high priority work for the next few months.

@SteveSandersonMS SteveSandersonMS added affected-few This issue impacts only small number of customers severity-minor This label is used by an internal tool labels Oct 6, 2020 — with ASP.NET Core Issue Ranking
@javiercn javiercn added the feature-blazor-deployment Issues related to deploying Blazor label Apr 19, 2021
@pranavkm
Copy link
Contributor

@javiercn I imagine your work to enable custom deployments - https://devblogs.microsoft.com/aspnet/custom-deployment-layout-for-blazor-webassembly-apps/ - tackles this issue. Do you think there's any additional work to be done here?

@pranavkm pranavkm added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Oct 19, 2021
@javiercn
Copy link
Member

@pranavkm yes.

@SteveSandersonMS
Copy link
Member

@pranavkm That'll teach you to ask more than one question. Loving the ambiguity :)

@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-few This issue impacts only small number of customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-deployment Issues related to deploying Blazor feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. severity-minor This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

9 participants