Skip to content

Commit 83f1fa2

Browse files
authored
Add property with path to wasm runtime config (#1901)
* Add property with path to wasm runtime config * Add semicolons to list * Add mulitple msbuild property support * Remove debug print
1 parent deb30f7 commit 83f1fa2

4 files changed

Lines changed: 16 additions & 1 deletion

File tree

scripts/dotnet.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ def publish(self,
401401
packages_path,
402402
target_framework_moniker: str = None,
403403
runtime_identifier: str = None,
404+
msbuildprops: list = None,
404405
*args
405406
) -> None:
406407
'''
@@ -420,6 +421,9 @@ def publish(self,
420421
if target_framework_moniker:
421422
cmdline += ['--framework', target_framework_moniker]
422423

424+
if msbuildprops:
425+
cmdline = cmdline + msbuildprops
426+
423427
if args:
424428
cmdline = cmdline + list(args)
425429

src/scenarios/shared/precommands.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self):
7171
self.framework = args.framework
7272
self.runtime_identifier = args.runtime
7373
self.msbuild = args.msbuild
74+
print(self.msbuild)
7475
self.msbuildstatic = args.msbuildstatic
7576
self.binlog = args.binlog
7677

@@ -189,6 +190,14 @@ def _addstaticmsbuildproperty(self, projectfile: str):
189190
propertystring = f'\n <PropertyGroup>\n <{propertyname}>{propertyvalue}</{propertyname}>\n </PropertyGroup>'
190191
insert_after(projectfile, r'</PropertyGroup>', propertystring )
191192

193+
def _parsemsbuildproperties(self) -> list:
194+
if self.msbuild:
195+
proplist = list()
196+
for propertyarg in self.msbuild.split(';'):
197+
proplist.append(propertyarg)
198+
return proplist
199+
return None
200+
192201
def _updateframework(self, projectfile: str):
193202
'Update the <TargetFramework> property so we can re-use the template'
194203
if self.framework:
@@ -201,7 +210,7 @@ def _publish(self, configuration: str, framework: str = None, runtime_identifier
201210
os.path.join(get_packages_directory(), ''), # blazor publish targets require the trailing slash for joining the paths
202211
framework,
203212
runtime_identifier,
204-
self.msbuild or "",
213+
self._parsemsbuildproperties(),
205214
'-bl:%s' % self.binlog if self.binlog else ""
206215
)
207216

src/scenarios/shared/sod.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(self):
4242
get_packages_directory(),
4343
None,
4444
getruntimeidentifier(),
45+
None,
4546
'--no-restore'
4647
)
4748
self._setsodpath(sod.bin_path)

src/scenarios/shared/startup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(self):
4646
get_packages_directory(),
4747
None,
4848
getruntimeidentifier(),
49+
None,
4950
'--no-restore'
5051
)
5152
self._setstartuppath(startup.bin_path)

0 commit comments

Comments
 (0)