-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
CSB Javascript Not Found #24
Comments
I can confirm that upgrading to Blazor Preview7 requires manual add on script tag to function properly. |
@netclectic - Is this still the case with v2.0.7? |
The problem is resolved with v2.0.7. Thanks! |
Great stuff. I’m going to go ahead and close the issue as things seem to be working as expected now. |
I'm still receiving this issue in the browser and updated the _Host file to:
Running the the latest LocalStorage - 2.0.11 Running core preview8 in docker image - core/sdk:3.0.100-preview8-disco I get a 404 for the js file in the browser. Thanks! |
@joshhubers Have you tried a clean/re-build/clear of browser cache. I've had a lot of people have this issue and one of those sorts it out. There are some issues with the new Razor Class Library right now. So it might be best to just manually copy the JS file from this repo into your solution. |
I have a blazorwasm app but served by a webapi. In order to get Blazored.LocalStorage working I had to add this to Blazored.LocalStorage.csproj.
This will copy all embedded resources to bin/Debug/netstandard2.0/dist/_content/Blazored.LocalStorage/* so Kestrel can serve. I create a pull request #29. |
@thild This code is now legacy and not the way class libraries need to work going forward. As of right now the situation is this. Both JS and CSS in Razor Class libraries gets included in host projects correctly at development time. If you're not seeing this then see my comment above explaining the steps to go through to get things working. However, both for client-side Blazor and server-side Blazor there is an issue with publishing which stop static assets being included correctly, this is going to be fixed in Preview 9 (I hope!). |
@chrissainty Thanks for clarification. Investigating further I found that is a known Blazor issue dotnet/aspnetcore#13122. The workaround mentioned there is run the project in development environment.
However, you might consider keeping the EmbeddedResource workaround in |
I've now pushed a new version of the package which no longer needs a JavaScript file. This should completely remove the issue. Please give it a go and let me know if you have any issues. |
I tried the new version. Removed reference to js and everything is working. Nice solution. Thanks. |
After updating my CSB app to v2.0.6 for Preview 7 I started seeing an issue on startup...
Adding the script tag to my index.html, re the instructions for SSB, resolved the issue.
The text was updated successfully, but these errors were encountered: