The Wayback Machine - https://web.archive.org/web/20220127053823/https://github.com/dotnet/aspnetcore/issues/39799
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

JS Isolation not working on .net 5 blazor server app / 404 #39799

Open
1 task done
sipi41 opened this issue Jan 27, 2022 · 0 comments
Open
1 task done

JS Isolation not working on .net 5 blazor server app / 404 #39799

sipi41 opened this issue Jan 27, 2022 · 0 comments

Comments

@sipi41
Copy link

@sipi41 sipi41 commented Jan 27, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

According to the MS documentation: (https://docs.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-5.0#javascript-isolation-in-javascript-modules) I should be able to do javascript isolation on my blazor app... for some reason is not working and is returning a 404 instead of the actual js file.

My application is using .net 5 / Blazor Server and is very simple, basically its a page that when loads, after renders it will try to load a companion .js file, in this case as you can see below, the page is called Test2.razor and the js is called Test2.razor.js

image

The problem is that is always reporting that it can't load the js file (js isolation) because the resource not found.

I even marked my JS file as "copy always" in the properties but nothing seems to work... I have checked my syntax, compared to other examples, and can't get it done. Please help.

PD. This is happening on my work computer with .net 5 and my computer with .net 6, the project was made on .net 5 (just to try reproducing the bug)

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

5

Anything else?

No response

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

Successfully merging a pull request may close this issue.

None yet
2 participants