-
Notifications
You must be signed in to change notification settings - Fork 816
Description
What type of issue is it?
Discussion
What article/section is this about?
umbraco-cloud/build-and-customize-your-solution/set-up-your-project/project-settings/dedicated-resources.md
Describe the issue
A project I am working on is split between shared and dedicated (live is on dedicated) and we had a severe, ongoing deployment issue which prevented successful deployments from staging (on shared) to live (on dedicated). After a month of support communications, and escalations, the issue was finally resolved with the simple addition of a configuration file added to the root of the Git repository. If this is a standard "fix" which would prevent this issue for other Cloud sites, I'd suggest mention of the necessary addition of this file be added to the "Dedicated Resources" documentation page.
This is a slightly edited version of the support message we received, which could be the basis of the docs update:
In the root of the repository, add a "Directory.Build.props" file.
The content of this file should be:
<Project>
<PropertyGroup Condition="'$(WEBSITE_SITE_NAME)' != ''">
<UseSharedCompilation>false</UseSharedCompilation>
<BuildInParallel>false</BuildInParallel>
<RunAnalyzers>false</RunAnalyzers>
<UseRazorBuildServer>false</UseRazorBuildServer>
<MSBuildDisableNodeReuse>true</MSBuildDisableNodeReuse>
</PropertyGroup>
</Project>
The Condition in the PropertyGroups is an environment variable which will be provided automatically when the build runs on a Cloud environment. This ensures that it is only set up when building on the cloud environment, and not when running locally.
Very generally put, the theory is that the issue is caused by how MSBuild performs parallel builds.
The issue is environment-specific, coupled with hardware differences between shared and dedicated hosting.
The suggestion provided above addresses that.