Search code examples
blazorgithub-pagesblazor-webassembly

Deploying Blazor .NET 6 WASM to GitHub Pages


I am trying to get Blazor WASM working in GitHub pages. I've followed this video: https://www.youtube.com/watch?v=nNxII6jvPvQ.

I deployed it to here: Extenso GH Pages

Source here: GH Pages Source

I am getting this error:

enter image description here

According to this page, it could be due to GitHub changing the files.. After seeing this, I realized that I forgot a step in that video, where he said to use a .gitattributes file to prevent GitHub messing with the binary files.

So I only added the .gitattributes file later. Is it possible that GitHub has in fact changed my files somehow? If so, how can I fix it?


Solution

  • I figured it out.. I just deleted my code locally, pulled again from GitHub, then overwrote all files with those from the published project again and pushed it.. this reverted the line endings that had been changed by GitHub in the initial checkin (obviously you need to have the .gitattributes file present though, as I mentioned).