Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to MTP #37651

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
A little more progress
  • Loading branch information
Youssef1313 committed Jan 29, 2025
commit e2b90829fa7dfcb231dc2143f31284c0469b149c
3 changes: 3 additions & 0 deletions .pipelines/v2/templates/job-build-project.yml
Original file line number Diff line number Diff line change
@@ -146,16 +146,19 @@ jobs:
parameters:
sdk: true
version: '6.0'
platform: $(BuildPlatform)

- template: steps-ensure-dotnet-version.yml
parameters:
sdk: true
version: '8.0'
platform: $(BuildPlatform)

- template: steps-ensure-dotnet-version.yml
parameters:
sdk: true
version: '9.0'
platform: $(BuildPlatform)

- ${{ if eq(parameters.runTests, true) }}:
- task: VisualStudioTestPlatformInstaller@1
4 changes: 3 additions & 1 deletion .pipelines/v2/templates/steps-ensure-dotnet-version.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ parameters:
- name: sdk
type: boolean
default: false
- name: platform
type: string

# You might be wondering, "Why didn't they use UseDotNet?"
# Azure Pipelines is practically unmaintained, that's why.
@@ -21,7 +23,7 @@ steps:
exit 1
}
$NEW_DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet"
& ./dotnet-install.ps1 -Channel "${{parameters.version}}" -InstallDir $NEW_DOTNET_ROOT
& ./dotnet-install.ps1 -Channel "${{parameters.version}}" -Architecture ${{parameters.platform}} -InstallDir $NEW_DOTNET_ROOT
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]${NEW_DOTNET_ROOT}"
Write-Host "##vso[task.prependpath]${NEW_DOTNET_ROOT}"
Remove-Item dotnet-install.ps1 -ErrorAction:Ignore
Original file line number Diff line number Diff line change
@@ -15,13 +15,14 @@ namespace UITests_FancyZonesEditor
public class RunFancyZonesEditorTest
{
private static FancyZonesEditorSession? _session;
private static TestContext? _context;
private readonly TestContext _context;

public RunFancyZonesEditorTest(TestContext context)
=> _context = context;

[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
_context = testContext;

// prepare files to launch Editor without errors
EditorParameters editorParameters = new EditorParameters();
EditorParameters.ParamsWrapper parameters = new EditorParameters.ParamsWrapper
@@ -133,19 +134,18 @@ public static void ClassInitialize(TestContext testContext)
public static void ClassCleanup()
{
FancyZonesEditorSession.Files.Restore();
_context = null;
}

[TestInitialize]
public void TestInitialize()
{
_session = new FancyZonesEditorSession(_context!);
_session = new FancyZonesEditorSession(_context);
}

[TestCleanup]
public void TestCleanup()
{
_session?.Close(_context!);
_session?.Close(_context);
}

[TestMethod]