Properly renaming Umb13 cloud project?
# help-with-umbraco
m
I have a new Umbraco Cloud project running 13.0.3. I clone the project locally and follow the "Renaming the Project Files and Folder" step at https://docs.umbraco.com/umbraco-cloud/set-up/working-locally but when I build and run the project breaks on the first line of the program.cs file because it can't find the namespace "UmbracoProject" I and a Find All for UmbracoProject and VS says it found nothing. I know with .net 8 it stops wrapping things in namespace declarations. Can anyone tell me what I missed to I can make sure the entire project is correctly updated to the new namespace?
s
My colleague Tony made a handy little command line tool to help with this, it will ask you questions along the way about the namespace you want etc, I can recommend it! https://www.nuget.org/packages/umbracocloud/#readme-body-tab
m
That package does not seem to work. I gave it the new comamnd and passed the git url as the instructiosn say. The first question I said no to so I could change the namespace and then it errors out saying "Could not find the directory UmbracoProject, try using a new Umbraco Cloud project, this dotnet new template is not meant for existing projects that have been modified already." The cloud project I am using is a freshly created one I have not touched yet. (I removed the old cloud project and delted the local copy then created a new cloud project in the portal but did not touch it after that)
s
Yes, make sure you run it in an empty directory, it doesn't work if you already cloned the site
m
It was an empty directory with a fresh cloud project I had not cloned down yet
s
I think you might not have git installed globally, what happens if you type
git -v
?
m
ngit is not a reconized as na internal or external command operable program or batch file. I do have VS 2022 community installed and git works fine through there
s
Yeah VS has it's own copy of git - make sure to install it from https://git-scm.com/downloads
m
Ok, now it is working. Thank you very much
s
Yay! 🙌
m
Now to figure out how to get the project tied to bot the cloud repositor and a source control repositor. 🙂
13 Views