1+ # Using the downloaded workloads, this creates the VS drops to upload for VS insertion.
2+ # It builds the Microsoft.NET.Workloads.Vsman.vsmanproj per workload ZIP, which creates the appropriate VSMAN file.
3+
4+ # $workloadPath: The path to the directory containing the workload ZIPs, usually the output path used by DARC in the download-workloads.ps1 script.
5+ # - Example Value: "$(RepoRoot)artifacts\workloads"
6+ # $msBuildToolsPath: The path to the MSBuild tools directory, generally $(MSBuildToolsPath) in MSBuild.
7+ # - Example Value: 'C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin'
8+
9+ param ([bool ] $createTestWorkloadSet = $false , [string ] $sdkVersionMinor = ' |default|' , [string ] $versionFeature = ' |default|' , [string ] $versionPatch = ' |default|' , [string ] $preReleaseVersionLabel = ' |default|' , [string ] $preReleaseVersionIteration = ' |default|' )
10+
11+ $containsNonDefault = ($sdkVersionMinor , $versionFeature , $versionPatch , $preReleaseVersionLabel , $preReleaseVersionIteration | Where-Object { $_ -ne ' |default|' }) -ne $null
12+
13+ if (-not $containsNonDefault -and -not $createTestWorkloadSet ) {
14+ Write-Host " No version overrides to apply."
15+ exit 0
16+ }
17+
18+ $xmlDoc = New-Object System.Xml.XmlDocument
19+ $projectElement = $xmlDoc.CreateElement (" Project" )
20+ $xmlDoc.AppendChild ($rootElement )
21+
22+ $propertyGroup1Element = $xmlDoc.CreateElement (" PropertyGroup" )
23+ $projectElement.AppendChild ($propertyGroup1Element )
24+
25+ $propertyGroup2Element = $xmlDoc.CreateElement (" PropertyGroup" )
26+ $projectElement.AppendChild ($propertyGroup2Element )
27+
28+
29+ $settingElement.SetAttribute (" Name" , " LogLevel" )
30+ $settingElement.InnerText = " Debug"
31+
32+ $xmlDoc.Save (" D:\Workspace\TestMe.xml" )
33+
34+
35+
36+ # <Project>
37+ # <PropertyGroup>
38+ # <VersionSDKMinor>3</VersionSDKMinor>
39+ # <VersionFeature>05</VersionFeature>
40+ # <VersionPatch>0</VersionPatch>
41+ # <PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
42+ # <PreReleaseVersionIteration Condition="'$(StabilizePackageVersion)' != 'true'">1</PreReleaseVersionIteration>
43+ # </PropertyGroup>
44+ # <PropertyGroup>
45+ # <VersionPrefix>$(VersionMajor).$(VersionSDKMinor)$(VersionFeature).$(VersionPatch)</VersionPrefix>
46+ # <WorkloadsVersion>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</WorkloadsVersion>
47+ # <WorkloadsVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(VersionPatch)' != '0'">$(WorkloadsVersion).$(VersionPatch)</WorkloadsVersion>
48+ # <SdkFeatureBand>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)00</SdkFeatureBand>
49+ # <SdkFeatureBand Condition="'$(StabilizePackageVersion)' != 'true' and $(PreReleaseVersionLabel) != 'servicing'">$(SdkFeatureBand)-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</SdkFeatureBand>
50+ # <!-- Conditional include -->
51+ # <PreReleaseVersionIteration Condition="'$(TestWorkloadVersion)' == 'true' and $(PreReleaseVersionLabel) != 'servicing'">$(PreReleaseVersionIteration).0</PreReleaseVersionIteration>
52+ # <PreReleaseVersionIteration Condition="'$(TestWorkloadVersion)' == 'true' and $(PreReleaseVersionLabel) == 'servicing'">0</PreReleaseVersionIteration>
53+ # </PropertyGroup>
54+ # </Project>
0 commit comments