Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/dotnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ def publish(self,
packages_path,
target_framework_moniker: str = None,
runtime_identifier: str = None,
msbuildprops: list = None,
*args
) -> None:
'''
Expand All @@ -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)

Expand Down
11 changes: 10 additions & 1 deletion src/scenarios/shared/precommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __init__(self):
self.framework = args.framework
self.runtime_identifier = args.runtime
self.msbuild = args.msbuild
print(self.msbuild)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be deleted?

self.msbuildstatic = args.msbuildstatic
self.binlog = args.binlog

Expand Down Expand Up @@ -189,6 +190,14 @@ def _addstaticmsbuildproperty(self, projectfile: str):
propertystring = f'\n <PropertyGroup>\n <{propertyname}>{propertyvalue}</{propertyname}>\n </PropertyGroup>'
insert_after(projectfile, r'</PropertyGroup>', 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 <TargetFramework> property so we can re-use the template'
if self.framework:
Expand All @@ -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 ""
)

Expand Down
1 change: 1 addition & 0 deletions src/scenarios/shared/sod.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self):
get_packages_directory(),
None,
getruntimeidentifier(),
None,
'--no-restore'
)
self._setsodpath(sod.bin_path)
Expand Down
1 change: 1 addition & 0 deletions src/scenarios/shared/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self):
get_packages_directory(),
None,
getruntimeidentifier(),
None,
'--no-restore'
)
self._setstartuppath(startup.bin_path)
Expand Down