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
9 changes: 4 additions & 5 deletions src/scenarios/mauiandroid/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
# Setup the Maui folder - will use merged NuGet.config with MAUI feeds
precommands.new(template='maui',
output_dir=const.APPDIR,
Expand All @@ -32,7 +31,7 @@

# Build the APK - will also use merged NuGet.config
precommands.execute([])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block

# Remove the aab files as we don't need them, this saves space
output_dir = const.PUBDIR
Expand Down
9 changes: 4 additions & 5 deletions src/scenarios/mauiblazorandroid/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
# Setup the Maui folder - will use merged NuGet.config with MAUI feeds
precommands.new(template='maui-blazor',
output_dir=const.APPDIR,
Expand Down Expand Up @@ -63,7 +62,7 @@

# Build the APK - will use merged NuGet.config
precommands.execute([])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block

output_dir = const.PUBDIR
if precommands.output:
Expand Down
9 changes: 4 additions & 5 deletions src/scenarios/mauiblazordesktop/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
precommands.new(template='maui-blazor',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
Expand All @@ -33,4 +32,4 @@
shutil.copy2(os.path.join(const.SRCDIR, 'Replacement.Index.razor.cs'), os.path.join(const.APPDIR, 'Pages', 'Index.razor.cs'))
precommands.add_startup_logging(os.path.join('Pages', 'Index.razor.cs'), "if (firstRender) {")
precommands.execute(['/p:Platform=x64','/p:WindowsAppSDKSelfContained=True','/p:WindowsPackageType=None','/p:WinUISDKReferences=False','/p:PublishReadyToRun=true'])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block
8 changes: 4 additions & 4 deletions src/scenarios/mauiblazorios/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
logger = getLogger(__name__)

precommands = PreCommands()
install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
# Setup the Maui folder - will use merged NuGet.config with MAUI feeds
precommands.new(template='maui-blazor',
output_dir=const.APPDIR,
Expand All @@ -46,7 +46,7 @@
# Build the IPA - will use merged NuGet.config
# TODO: Remove /p:TargetsCurrent=true once https://github.com/dotnet/performance/issues/5055 is resolved
precommands.execute(['/p:EnableCodeSigning=false', '/p:ApplicationId=net.dot.mauiblazortesting', '/p:TargetsCurrent=true'])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block

output_dir = const.PUBDIR
if precommands.output:
Expand Down
9 changes: 4 additions & 5 deletions src/scenarios/mauidesktop/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
precommands.new(template='maui',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
Expand All @@ -30,4 +29,4 @@
no_restore=False)

precommands.execute(['/p:Platform=x64','/p:WindowsAppSDKSelfContained=True','/p:WindowsPackageType=None','/p:WinUISDKReferences=False','/p:PublishReadyToRun=true'])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block
8 changes: 4 additions & 4 deletions src/scenarios/mauiios/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
setup_loggers(True)

precommands = PreCommands()
install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
# Setup the Maui folder - will use merged NuGet.config with MAUI feeds
precommands.new(template='maui',
output_dir=const.APPDIR,
Expand All @@ -31,7 +31,7 @@
# Build the IPA - will use merged NuGet.config
# TODO: Remove /p:TargetsCurrent=true once https://github.com/dotnet/performance/issues/5055 is resolved
precommands.execute(['/p:EnableCodeSigning=false', '/p:ApplicationId=net.dot.mauitesting', '/p:TargetsCurrent=true'])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block

# Remove the aab files as we don't need them, this saves space
output_dir = const.PUBDIR
Expand Down
9 changes: 4 additions & 5 deletions src/scenarios/mauisamplecontentandroid/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()

# Use context manager to temporarily merge MAUI's NuGet feeds into repo config
# This ensures both dotnet new and dotnet build/publish have access to MAUI packages
# This ensures dotnet package search, dotnet new, and dotnet build/publish have access to MAUI packages
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()
# Setup the Maui folder - will use merged NuGet.config with MAUI feeds
precommands.new(template='maui',
output_dir=const.APPDIR,
Expand All @@ -33,7 +32,7 @@

# Build the APK - will use merged NuGet.config
precommands.execute([])
# NuGet.config is automatically restored after this block
# NuGet.config is automatically restored after this block

# Remove the aab files as we don't need them, this saves space
output_dir = const.PUBDIR
Expand Down
25 changes: 13 additions & 12 deletions src/scenarios/netandroid/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
from performance.logger import setup_loggers, getLogger
from shared import const
from shared.mauisharedpython import remove_aab_files,install_latest_maui
from shared.mauisharedpython import remove_aab_files,install_latest_maui, MauiNuGetConfigContext
from shared.precommands import PreCommands
from shared.versionmanager import versions_write_json, get_sdk_versions
from test import EXENAME
Expand All @@ -16,19 +16,20 @@

precommands = PreCommands()

install_latest_maui(precommands)
precommands.print_dotnet_info()
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()

# Setup the app folder
precommands.new(template='android',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
exename=EXENAME,
working_directory=sys.path[0],
no_restore=False)
# Setup the app folder
precommands.new(template='android',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
exename=EXENAME,
working_directory=sys.path[0],
no_restore=False)

# Build the APK
precommands.execute([])
# Build the APK
precommands.execute([])

# Remove the aab files as we don't need them, this saves space
output_dir = const.PUBDIR
Expand Down
28 changes: 15 additions & 13 deletions src/scenarios/netios/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,30 @@
import sys
from performance.logger import setup_loggers, getLogger
from shared import const
from shared.mauisharedpython import remove_aab_files, install_latest_maui
from shared.mauisharedpython import remove_aab_files, install_latest_maui, MauiNuGetConfigContext
from shared.precommands import PreCommands
from shared.versionmanager import versions_write_json, get_sdk_versions
from test import EXENAME

setup_loggers(True)

precommands = PreCommands()
install_latest_maui(precommands)
precommands.print_dotnet_info()

# Setup the .NET iOS folder
precommands.new(template='ios',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
exename=EXENAME,
working_directory=sys.path[0],
no_restore=False)
with MauiNuGetConfigContext(precommands.framework):
install_latest_maui(precommands)
precommands.print_dotnet_info()

# Build the IPA - will use merged NuGet.config
# TODO: Remove /p:TargetsCurrent=true once https://github.com/dotnet/performance/issues/5055 is resolved
precommands.execute(['/p:EnableCodeSigning=false', '/p:ApplicationId=net.dot.xamarintesting', '/p:TargetsCurrent=true'])
# Setup the .NET iOS folder
precommands.new(template='ios',
output_dir=const.APPDIR,
bin_dir=const.BINDIR,
exename=EXENAME,
working_directory=sys.path[0],
no_restore=False)

# Build the IPA - will use merged NuGet.config
# TODO: Remove /p:TargetsCurrent=true once https://github.com/dotnet/performance/issues/5055 is resolved
precommands.execute(['/p:EnableCodeSigning=false', '/p:ApplicationId=net.dot.xamarintesting', '/p:TargetsCurrent=true'])

# Remove the aab files as we don't need them, this saves space
output_dir = const.PUBDIR
Expand Down
Loading