Skip to content

Commit 1f3750e

Browse files
committed
Prevent circular dependency errors
1 parent c958d3c commit 1f3750e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Packages/com.unity.ide.visualstudio/Editor/ProjectGeneration/SdkStyleProjectGeneration.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ internal override void GetProjectHeader(ProjectProperties properties, out String
5555
headerBuilder.Append(@"<Project ToolsVersion=""Current"">").Append(k_WindowsNewline);
5656
headerBuilder.Append(@" <!-- Generated file, do not modify, your changes will be overwritten (use AssetPostprocessor.OnGeneratedCSProject) -->").Append(k_WindowsNewline);
5757

58+
// Prevent circular dependency issues see https://github.com/microsoft/vscode-dotnettools/issues/401
59+
// We need a dedicated subfolder for each project in obj, else depending on the build order, nuget cache files could be overwritten
60+
// We need to do this before common.props, else we'll have a MSB3539 The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild
61+
headerBuilder.Append(@" <PropertyGroup>").Append(k_WindowsNewline);
62+
headerBuilder.Append(@" <BaseIntermediateOutputPath>Temp/obj/$(Configuration)/$(MSBuildProjectName)</BaseIntermediateOutputPath>").Append(k_WindowsNewline);
63+
headerBuilder.Append(@" <IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>").Append(k_WindowsNewline);
64+
headerBuilder.Append(@" </PropertyGroup>").Append(k_WindowsNewline);
65+
5866
// Supported capabilities
5967
GetCapabilityBlock(headerBuilder, "Sdk.props", "Include", SupportedCapabilities);
6068

0 commit comments

Comments
 (0)