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

[vs-workload.props] Append xcode info to VSMAN #21657

Merged
merged 1 commit into from
Nov 20, 2024
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
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