Reputation: 697
I want to set up a hosted blazorwasm project via the dotnet cli using the following command
dotnet new blazorwasm --hosted
Say that i executed this command in a folder called test then all the projects inside this new solution will have the prefix test.
in visual studio.
I want my project to not have these prefixes so i tried just renaming the projects in vs 2022 but this results in the following error.
How do i safely remove the prefixes from these project without crashing my builds?
Upvotes: 1
Views: 38
Reputation: 3720
If you want to change names of your projects, you can search and replace project name, then change project folder and project file. It works, I do this sometimes.
Follow these Steps:
vscode
. Go to search
tab and replace all occurence of that project name e.g. test.Shared
to NewProjectName
. Make sure that you match case and whole word.test.Shared
to NewProjectName
.test.Shared.csproj
inside that folder to NewProjectName.csproj
.After that you are done, compile and run.
Upvotes: 1
Reputation: 11392
You need to edit the project solution (.sln) file:
Project("{...}") = "Server", "test\Server\test.Server.csproj", "{823DA873-9616-4245-AC45-B59535AA865B}"
EndProject
Project("{...}") = "Client", "test\Client\test.Client.csproj", "{30EBEA6F-3384-4EEF-ABCC-22954275A2AC}"
EndProject
Project("{...}") = "Shared", "test\Shared\test.Shared.csproj", "{3BEE92B9-A658-4825-B43F-10DB6850E60F}"
EndProject
Upvotes: 0