user3297833
user3297833

Reputation: 171

How to rename a Blazor WebAssembly solution and its projects

I taken a sample vs2019 Blazor WASM (Hosted) solution and renamed the solution and its projects (Client,Server,Shared) and it runs fine but if I open the Console I see: Failed to load resource: the server responded with a status 404 (not found) on this: "oldprojectname.Client.styles.css:1" (image below) Where is the solution/project getting this "oldprojectname" from? I've scanned the entire source of the project and deleted the .vs files and still it has this "oldprojectname" What am I missing? Thanks enter image description here

Upvotes: 0

Views: 1838

Answers (3)

James Heffer
James Heffer

Reputation: 752

The best solution in my opinion to rename projects (as per the question) is the following:

You can export the project as a "Template" and Visual Studio can let you re-create the project exactly how it was when you created the template, and then you can give the project a new name. :)

enter image description here

Upvotes: 0

Mayur Ekbote
Mayur Ekbote

Reputation: 2080

Check the Head section of wwwroot/index.html of the Client project

Upvotes: 1

user3297833
user3297833

Reputation: 171

Yet another thing that I can't explain but if you experienced the above then simply switching the "applicationUrl" port number resolved my problems. This can be found in the launchSettings.json in both the Client and Server project.

Upvotes: 0

Related Questions