@@ -1212,18 +1212,19 @@ public WebSiteGetPublishProfileResponse.PublishProfile GetWebDeployPublishProfil
1212
1212
/// <param name="websiteName">The name of the web site.</param>
1213
1213
/// <param name="slot">The name of the slot.</param>
1214
1214
/// <param name="package">The WebDeploy package.</param>
1215
+ /// <param name="setParametersFile">The SetParametersFile.xml used to override internal package configuration.</param>
1215
1216
/// <param name="connectionStrings">The connection strings to overwrite the ones in the Web.config file.</param>
1216
1217
/// <param name="skipAppData">Skip app data</param>
1217
1218
/// <param name="doNotDelete">Do not delete files at destination</param>
1218
- public void PublishWebProject ( string websiteName , string slot , string package , Hashtable connectionStrings , bool skipAppData , bool doNotDelete )
1219
+ public void PublishWebProject ( string websiteName , string slot , string package , string setParametersFile , Hashtable connectionStrings , bool skipAppData , bool doNotDelete )
1219
1220
{
1220
1221
if ( File . GetAttributes ( package ) . HasFlag ( FileAttributes . Directory ) )
1221
1222
{
1222
1223
PublishWebProjectFromPackagePath ( websiteName , slot , package , connectionStrings , skipAppData , doNotDelete ) ;
1223
1224
}
1224
1225
else
1225
1226
{
1226
- PublishWebProjectFromPackageFile ( websiteName , slot , package , connectionStrings , skipAppData , doNotDelete ) ;
1227
+ PublishWebProjectFromPackageFile ( websiteName , slot , package , setParametersFile , connectionStrings , skipAppData , doNotDelete ) ;
1227
1228
}
1228
1229
}
1229
1230
@@ -1233,10 +1234,11 @@ public void PublishWebProject(string websiteName, string slot, string package, H
1233
1234
/// <param name="websiteName">The name of the web site.</param>
1234
1235
/// <param name="slot">The name of the slot.</param>
1235
1236
/// <param name="package">The WebDeploy package zip file.</param>
1237
+ /// <param name="setParametersFile">The SetParametersFile.xml used to override internal package configuration.</param>
1236
1238
/// <param name="connectionStrings">The connection strings to overwrite the ones in the Web.config file.</param>
1237
1239
/// <param name="skipAppData">Skip app data</param>
1238
1240
/// <param name="doNotDelete">Do not delete files at destination</param>
1239
- private void PublishWebProjectFromPackageFile ( string websiteName , string slot , string package , Hashtable connectionStrings , bool skipAppData , bool doNotDelete )
1241
+ private void PublishWebProjectFromPackageFile ( string websiteName , string slot , string package , string setParametersFile , Hashtable connectionStrings , bool skipAppData , bool doNotDelete )
1240
1242
{
1241
1243
DeploymentBaseOptions remoteBaseOptions = CreateRemoteDeploymentBaseOptions ( websiteName , slot ) ;
1242
1244
DeploymentBaseOptions localBaseOptions = new DeploymentBaseOptions ( ) ;
@@ -1247,6 +1249,11 @@ private void PublishWebProjectFromPackageFile(string websiteName, string slot, s
1247
1249
1248
1250
using ( var deployment = DeploymentManager . CreateObject ( DeploymentWellKnownProvider . Package , package , localBaseOptions ) )
1249
1251
{
1252
+ if ( ! string . IsNullOrEmpty ( setParametersFile ) )
1253
+ {
1254
+ deployment . SyncParameters . Load ( setParametersFile , true ) ;
1255
+ }
1256
+
1250
1257
DeploymentSyncParameter providerPathParameter = new DeploymentSyncParameter (
1251
1258
"Provider Path Parameter" ,
1252
1259
"Provider Path Parameter" ,
@@ -1264,8 +1271,9 @@ private void PublishWebProjectFromPackageFile(string websiteName, string slot, s
1264
1271
null ) ;
1265
1272
providerPathParameter . Add ( iisAppEntry ) ;
1266
1273
providerPathParameter . Add ( setAclEntry ) ;
1267
- deployment . SyncParameters . Add ( providerPathParameter ) ;
1268
1274
1275
+ deployment . SyncParameters . Add ( providerPathParameter ) ;
1276
+
1269
1277
// Replace the connection strings in Web.config with the ones user specifies from the cmdlet.
1270
1278
ReplaceConnectionStrings ( deployment , connectionStrings ) ;
1271
1279
0 commit comments