diff --git a/scripts/dotnet.py b/scripts/dotnet.py
index 9d87d49d0cc..dca79e5b463 100755
--- a/scripts/dotnet.py
+++ b/scripts/dotnet.py
@@ -401,6 +401,7 @@ def publish(self,
packages_path,
target_framework_moniker: str = None,
runtime_identifier: str = None,
+ msbuildprops: list = None,
*args
) -> None:
'''
@@ -420,6 +421,9 @@ def publish(self,
if target_framework_moniker:
cmdline += ['--framework', target_framework_moniker]
+ if msbuildprops:
+ cmdline = cmdline + msbuildprops
+
if args:
cmdline = cmdline + list(args)
diff --git a/src/scenarios/shared/precommands.py b/src/scenarios/shared/precommands.py
index 039eea25998..06f03ab98f9 100644
--- a/src/scenarios/shared/precommands.py
+++ b/src/scenarios/shared/precommands.py
@@ -71,6 +71,7 @@ def __init__(self):
self.framework = args.framework
self.runtime_identifier = args.runtime
self.msbuild = args.msbuild
+ print(self.msbuild)
self.msbuildstatic = args.msbuildstatic
self.binlog = args.binlog
@@ -189,6 +190,14 @@ def _addstaticmsbuildproperty(self, projectfile: str):
propertystring = f'\n \n <{propertyname}>{propertyvalue}{propertyname}>\n '
insert_after(projectfile, r'', propertystring )
+ def _parsemsbuildproperties(self) -> list:
+ if self.msbuild:
+ proplist = list()
+ for propertyarg in self.msbuild.split(';'):
+ proplist.append(propertyarg)
+ return proplist
+ return None
+
def _updateframework(self, projectfile: str):
'Update the property so we can re-use the template'
if self.framework:
@@ -201,7 +210,7 @@ def _publish(self, configuration: str, framework: str = None, runtime_identifier
os.path.join(get_packages_directory(), ''), # blazor publish targets require the trailing slash for joining the paths
framework,
runtime_identifier,
- self.msbuild or "",
+ self._parsemsbuildproperties(),
'-bl:%s' % self.binlog if self.binlog else ""
)
diff --git a/src/scenarios/shared/sod.py b/src/scenarios/shared/sod.py
index f5f7fff52b0..ef773cdf6bb 100644
--- a/src/scenarios/shared/sod.py
+++ b/src/scenarios/shared/sod.py
@@ -42,6 +42,7 @@ def __init__(self):
get_packages_directory(),
None,
getruntimeidentifier(),
+ None,
'--no-restore'
)
self._setsodpath(sod.bin_path)
diff --git a/src/scenarios/shared/startup.py b/src/scenarios/shared/startup.py
index 449d5fd5f8d..9e04c4c9024 100644
--- a/src/scenarios/shared/startup.py
+++ b/src/scenarios/shared/startup.py
@@ -46,6 +46,7 @@ def __init__(self):
get_packages_directory(),
None,
getruntimeidentifier(),
+ None,
'--no-restore'
)
self._setstartuppath(startup.bin_path)