Skip to content

Commit 3ef3a5a

Browse files
committed
cleanup
1 parent 3ca52dd commit 3ef3a5a

1 file changed

Lines changed: 0 additions & 43 deletions

File tree

test/EndToEnd/tests/ServicesTest.ps1

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,6 @@ function Test-PackageManagerServicesAreAvailableThroughMEF {
1313
Assert-NotNull $installerEvents
1414
}
1515

16-
# If this test fails with the cryptic error:
17-
#
18-
# Exception calling "NewProject" with "5" argument(s): "The method or operation is not implemented."
19-
#
20-
# ...it is because the specific Windows 10 SDK build indicated by the <TargetPlatformVersion /> element in the test's
21-
# project file (test\EndToEnd\ProjectTemplates\UwpClassLibraryProjectJson.zip\ClassLibrary6.csproj) is not installed.
22-
function Test-MigrateVanillaUwpProjectJsonToPackageReference {
23-
param(
24-
$context
25-
)
26-
27-
# Arrange
28-
$p = New-UwpClassLibraryProjectJson UwpClassLibrary1
29-
$cm = Get-VsComponentModel
30-
$projectDir = Get-ProjectDir $p
31-
$result = [API.Test.InternalAPITestHook]::MigrateJsonProject($p.FullName)
32-
Start-Sleep -Seconds 3
33-
# Assert
34-
35-
# Check if runtimes were migrated correctly
36-
$expectRuntimeIds = 'win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot'
37-
Assert-True($result.IsSuccess)
38-
$actualRuntimes = Get-MsBuildPropertyValue $p 'RuntimeIdentifiers'
39-
Assert-AreEqual $expectRuntimeIds $actualRuntimes
40-
41-
# Check if project.json file was deleted
42-
Assert-True !(Test-Path (Join-Path $projectDir project.json))
43-
44-
# Check if backup was created
45-
$backupProjectJsonPath = [System.IO.Path]::Combine($projectDir, "Backup", "project.json")
46-
$backupCsprojPath = [System.IO.Path]::Combine($projectDir, "Backup", "UwpClassLibrary1.csproj")
47-
Write-Host "Project json backup path: $backupProjectJsonPath"
48-
Write-Host "Csproj backup path: $backupCsprojPath"
49-
Assert-True (Test-Path $backupProjectJsonPath)
50-
Assert-True (Test-Path $backupCsprojPath)
51-
52-
# Check if package reference was added correctly
53-
$packageRefs = @(Get-MsBuildItems $p 'PackageReference')
54-
Assert-AreEqual 1 $packageRefs.Count
55-
Assert-AreEqual $packageRefs[0].GetMetadataValue("Identity") 'Microsoft.NETCore.UniversalWindowsPlatform'
56-
Assert-AreEqual $packageRefs[0].GetMetadataValue("Version") '5.2.2'
57-
}
58-
5916
function Test-VsPackageInstallerServices {
6017
param(
6118
$context

0 commit comments

Comments
 (0)