However, everytime I rebuild the solution in VS, the umbraco folder returns, although the pathing now goes through the new path, I am wondering why rebuilding the solution recreates the umbraco folder and many files within it and if this should be this way?
but yes, I think if Nuget tries to restore the Umbraco package, then it might recreate those folders?
The targets file I think is saying 'include these folders' when you deploy, so you don't have to include them in the Visual Studio project,
In the past there has always been lots of things that rely on the /umbraco folder from being present - particulary 3rd party packages - it's got much better recently, but I still tend not to rename the Umbraco folder but use IIS rewrite rules to protect its existence from the outside world...
Change Umbraco Path vs. Rebuilding the Solution
Hi!
I have successfully changed the umbraco path by renaming the umbraco folder and changing the web.config entries:
However, everytime I rebuild the solution in VS, the umbraco folder returns, although the pathing now goes through the new path, I am wondering why rebuilding the solution recreates the umbraco folder and many files within it and if this should be this way?
Am I missing any additional things and changes?
Thanks
Dee
Hi Dee
Did you install Umbraco with Nuget? and do you have 'restore Nuget Packages' on build option enabled in Visual Studio.
The Nuget package won't know about your decision to change the folder name, and so I think would see the /Umbraco folder as missing and restore?
regards
Marc
Hey Marc,
thanks for your response.
It is an Umbraco Cloud solution, but I did a Nuget downgrade after the last upgrade from 8.8 back to 8.7, because of some bugs in 8.8.
So it should be now a nuget installation.
Regarding the "restore Nuget Packages" on build options, where do I find this?
Do you mean the file UmbracoCms.targets in ~\packages\UmbracoCms.8.7.0\build?
There I found this entry:
is this causing the issue?
Hi Dee
I was thinking of this setting:
https://docs.microsoft.com/en-us/nuget/consume-packages/media/restore-01-autorestoreoptions.png
but yes, I think if Nuget tries to restore the Umbraco package, then it might recreate those folders?
The targets file I think is saying 'include these folders' when you deploy, so you don't have to include them in the Visual Studio project,
In the past there has always been lots of things that rely on the /umbraco folder from being present - particulary 3rd party packages - it's got much better recently, but I still tend not to rename the Umbraco folder but use IIS rewrite rules to protect its existence from the outside world...
https://our.umbraco.com/documentation/reference/security/Security-hardening/#lock-down-access-to-your-umbraco-folders
There is some suggestion in the Umbraco Documentation that changing the Umbraco folder on Umbraco Cloud is unsupported - https://our.umbraco.com/Documentation/Reference/Security/Security-hardening/#rename-your-umbraco-folder - but that might be out of date?
regards
Marc
Big thanks mate!
I do feel very uncomfortable renaming the umbraco folder, because of many dependencies and further upgrades, applied from the umbraco cloud.
So I will rather go for the first approach you suggested.
Best
is working on a reply...