@@ -159,7 +159,8 @@ internal static IEnumerable<string> GetAddPackagesCommands(BuildPartition buildP
159
159
160
160
internal static string GetRestoreCommand ( ArtifactsPaths artifactsPaths , BuildPartition buildPartition , string csProjPath , string ? extraArguments = null , string ? binLogSuffix = null , bool excludeOutput = false )
161
161
=> new StringBuilder ( )
162
- . AppendArgument ( $ "restore { csProjPath } ")
162
+ . AppendArgument ( "restore" )
163
+ . AppendArgument ( string . IsNullOrEmpty ( csProjPath ) ? string . Empty : $ "\" { csProjPath } \" ")
163
164
. AppendArgument ( string . IsNullOrEmpty ( artifactsPaths . PackagesDirectoryName ) ? string . Empty : $ "--packages \" { artifactsPaths . PackagesDirectoryName } \" ")
164
165
. AppendArgument ( GetCustomMsBuildArguments ( buildPartition . RepresentativeBenchmarkCase , buildPartition . Resolver ) )
165
166
. AppendArgument ( extraArguments )
@@ -170,7 +171,9 @@ internal static string GetRestoreCommand(ArtifactsPaths artifactsPaths, BuildPar
170
171
171
172
internal static string GetBuildCommand ( ArtifactsPaths artifactsPaths , BuildPartition buildPartition , string csProjPath , string ? extraArguments = null , string ? binLogSuffix = null , bool excludeOutput = false )
172
173
=> new StringBuilder ( )
173
- . AppendArgument ( $ "build { csProjPath } -c { buildPartition . BuildConfiguration } ") // we don't need to specify TFM, our auto-generated project contains always single one
174
+ . AppendArgument ( "build" )
175
+ . AppendArgument ( string . IsNullOrEmpty ( csProjPath ) ? string . Empty : $ "\" { csProjPath } \" ")
176
+ . AppendArgument ( $ "-c { buildPartition . BuildConfiguration } ") // we don't need to specify TFM, our auto-generated project contains always single one
174
177
. AppendArgument ( GetCustomMsBuildArguments ( buildPartition . RepresentativeBenchmarkCase , buildPartition . Resolver ) )
175
178
. AppendArgument ( extraArguments )
176
179
. AppendArgument ( GetMandatoryMsBuildSettings ( buildPartition . BuildConfiguration ) )
@@ -181,7 +184,9 @@ internal static string GetBuildCommand(ArtifactsPaths artifactsPaths, BuildParti
181
184
182
185
internal static string GetPublishCommand ( ArtifactsPaths artifactsPaths , BuildPartition buildPartition , string csProjPath , string ? extraArguments = null , string ? binLogSuffix = null )
183
186
=> new StringBuilder ( )
184
- . AppendArgument ( $ "publish { csProjPath } -c { buildPartition . BuildConfiguration } ") // we don't need to specify TFM, our auto-generated project contains always single one
187
+ . AppendArgument ( "publish" )
188
+ . AppendArgument ( string . IsNullOrEmpty ( csProjPath ) ? string . Empty : $ "\" { csProjPath } \" ")
189
+ . AppendArgument ( $ "-c { buildPartition . BuildConfiguration } ") // we don't need to specify TFM, our auto-generated project contains always single one
185
190
. AppendArgument ( GetCustomMsBuildArguments ( buildPartition . RepresentativeBenchmarkCase , buildPartition . Resolver ) )
186
191
. AppendArgument ( extraArguments )
187
192
. AppendArgument ( GetMandatoryMsBuildSettings ( buildPartition . BuildConfiguration ) )
0 commit comments