@@ -56,20 +56,12 @@ private static void ConfigureMsBuild(BuildContext buildContext, MSBuildSettings
5656
5757 msBuildSettings . WithProperty ( "PackageOutputPath" , buildContext . General . OutputRootDirectory ) ;
5858
59- // Only optimize in release mode
60- if ( ! buildContext . General . IsLocalBuild )
61- {
62- buildContext . CakeContext . Information ( "This is NOT a local build, disabling building of project references" ) ;
59+ buildContext . CakeContext . Information ( "This is NOT a local build, disabling building of project references" ) ;
6360
64- // Don't build project references (should already be built)
65- msBuildSettings . WithProperty ( "BuildProjectReferences" , "false" ) ;
61+ // Don't build project references (should already be built)
62+ msBuildSettings . WithProperty ( "BuildProjectReferences" , "false" ) ;
6663
67- //InjectAssemblySearchPathsInProjectFile(buildContext, projectName, GetProjectFileName(buildContext, projectName));
68- }
69- else
70- {
71- buildContext . CakeContext . Information ( "This is a local build, not disabling building of project references" ) ;
72- }
64+ //InjectAssemblySearchPathsInProjectFile(buildContext, projectName, GetProjectFileName(buildContext, projectName));
7365
7466 // Continuous integration build
7567 msBuildSettings . ContinuousIntegrationBuild = true ;
@@ -87,6 +79,12 @@ private static void ConfigureMsBuild(BuildContext buildContext, MSBuildSettings
8779 // msBuildSettings.WithProperty("SolutionExt", ".sln");
8880 // msBuildSettings.WithProperty("DefineExplicitDefaults", "true");
8981
82+ // Path maps
83+ if ( ! buildContext . General . IsLocalBuild )
84+ {
85+ msBuildSettings . WithProperty ( "PathMap" , $ "{ buildContext . General . RootDirectory } =./") ;
86+ }
87+
9088 // Disable copyright info
9189 msBuildSettings . NoLogo = true ;
9290
@@ -143,21 +141,11 @@ private static void ConfigureMsBuildForDotNet(BuildContext buildContext, DotNetM
143141
144142 msBuildSettings . WithProperty ( "PackageOutputPath" , buildContext . General . OutputRootDirectory ) ;
145143
146- // Only optimize in release mode
147- if ( ! buildContext . General . IsLocalBuild )
148- {
149- buildContext . CakeContext . Information ( $ "This is NOT a local build, disabling building of project references") ;
150-
151- // Don't build project references (should already be built)
152- msBuildSettings . WithProperty ( "BuildProjectReferences" , "false" ) ;
153-
154- //InjectAssemblySearchPathsInProjectFile(buildContext, projectName, GetProjectFileName(buildContext, projectName));
155- }
156- else
157- {
158- buildContext . CakeContext . Information ( $ "This is a local build, not disabling building of project references") ;
159- }
144+ // Don't build project references (should already be built)
145+ msBuildSettings . WithProperty ( "BuildProjectReferences" , "false" ) ;
160146
147+ //InjectAssemblySearchPathsInProjectFile(buildContext, projectName, GetProjectFileName(buildContext, projectName));
148+
161149 // Continuous integration build
162150 msBuildSettings . ContinuousIntegrationBuild = true ;
163151 //msBuildSettings.WithProperty("ContinuousIntegrationBuild", "true");
@@ -174,6 +162,12 @@ private static void ConfigureMsBuildForDotNet(BuildContext buildContext, DotNetM
174162 // msBuildSettings.WithProperty("SolutionExt", ".sln");
175163 // msBuildSettings.WithProperty("DefineExplicitDefaults", "true");
176164
165+ // Path maps
166+ if ( ! buildContext . General . IsLocalBuild )
167+ {
168+ msBuildSettings . WithProperty ( "PathMap" , $ "{ buildContext . General . RootDirectory } =./") ;
169+ }
170+
177171 // Disable copyright info
178172 msBuildSettings . NoLogo = true ;
179173
0 commit comments