Skip to content

Commit

Permalink
[vs-workload.props] Append xcode info to VSMAN (#21657)
Browse files Browse the repository at this point in the history
Context:
06fea90

In order to add .NET 9 Xcode16.1 builds to VS we'll need to insert packs
from two different commits on the `release/9.0.1xx-preview` branch.

Xcode information will now be added to the VS manifest that we generate
to allow us to produce unique manifests across the same branch.
  • Loading branch information
pjcollins authored Nov 20, 2024
1 parent 34666f5 commit 4681428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions dotnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ $(DOTNET_NUPKG_DIR)/vs-workload.props: Makefile $(GENERATE_VS_WORKLOAD)
--shorten Microsoft.NET.Sdk.MacCatalyst.Manifest=Microsoft.MacCatalyst.Manifest \
--shorten Microsoft.tvOS.Runtime.tvossimulator=Microsoft.tvOS.Runtime \
--tfm $(DOTNET_TFM) \
--xcode $(XCODE_VERSION) \
--output $@.tmp
$(Q) mv $@.tmp $@

Expand Down
6 changes: 5 additions & 1 deletion scripts/generate-vs-workload/generate-vs-workload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var platforms = new List<(string, string)> ();
var windowsPlatforms = new List<string> ();
var tfm = string.Empty;
var xcodeName = string.Empty;
var outputPath = string.Empty;

var queue = new Queue<string> (args);
Expand All @@ -37,6 +38,9 @@
case "--tfm":
tfm = queue.Dequeue ();
break;
case "--xcode":
xcodeName = $"xcode{queue.Dequeue ()}";
break;
default:
Console.Error.WriteLine ($"Unknown argument: {arg}");
return 1;
Expand All @@ -48,7 +52,7 @@
writer.WriteLine ($"<Project>");
writer.WriteLine ($" <PropertyGroup>");
var allPlatforms = string.Join (".", platforms.Select (v => v.Item1).OrderBy (v => v));
writer.WriteLine ($" <TargetName>Microsoft.NET.Sdk.{allPlatforms}.Workload.{tfm}</TargetName>");
writer.WriteLine ($" <TargetName>Microsoft.NET.Sdk.{allPlatforms}.Workload.{tfm}.{xcodeName}</TargetName>");
// Find the iOS version, otherwise use the version of the first platform listed.
var iOSPlatform = platforms.Where (v => v.Item1 == "iOS");
var manifestBuildVersion = iOSPlatform.Any () ? iOSPlatform.First ().Item2 : platforms.First ().Item2;
Expand Down

6 comments on commit 4681428

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.