C
C#14mo ago
mbissonn

❔ Running Blazor App from VS on Windows versus VSCode on Ubuntu

Hello, I am fairly new to C# and ASP.NET, so I'm just trying to get off the ground here. I created a Blazor WebAssembly App using Visual Studio on a machine running Windows 11 and have had no trouble working with it through VS. After uploading the project to GitHub and cloning it to my Ubuntu box, I am attempting to run it using VSCode. The project builds without any errors, but when I load the page there is no CSS or JS--just plain text HTML. What do I need to do in order for it to load the same way on both machines? Thanks, Michael
6 Replies
ZacharyPatten
ZacharyPatten14mo ago
1. please link code if open source 2. how are you running it on each system? yes you mentioend VS and VSC, but how exacle are you running it in both? command line? the UI's? etc.
mbissonn
mbissonnOP14mo ago
https://github.com/mbissonn/PortfolioWebsite I am running it through the UI in VS and I have tried both the UI and terminal in VSC
GitHub
GitHub - mbissonn/PortfolioWebsite
Contribute to mbissonn/PortfolioWebsite development by creating an account on GitHub.
ZacharyPatten
ZacharyPatten14mo ago
try updating your nuget packages you are using Version="6.0.7" the latest is Version="7.0.13" for Microsoft.AspNetCore.Components.WebAssembly and Microsoft.AspNetCore.Components.WebAssembly.DevServer ah wait you might need to update to .NET 7 to do that so... I downloaded your code and it would not run for me even inside Visual Studio
ZacharyPatten
ZacharyPatten14mo ago
No description
ZacharyPatten
ZacharyPatten14mo ago
but I made a new .NET 7 Blazor Webassembly app and copied your code into that and it works so I would recommend you update from .NET 6 to .NET 7 and update your nuget packages too that may fix your issue
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server