-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532)
* [dotnet] Set TargetPlatformSupported when the right TargetPlatformIdentifier is used. * [dotnet] Generate a list of valid OS versions for each platform, and add it to the SupportedTargetPlatform item group. The generated files: https://gist.github.com/rolfbjarne/765c4e4b38b1b017380c9378d9666317 * [dotnet] Define and set the default platform version if it's not set in the TargetFramework variable. * [dotnet] Switch to using the new-style TargetFramework values. This includes bumping spouliot/Touch.Unit to get new-style TargetFramework values for Touch.Client. * xamarin/Touch.Unit@89afaf7 [Touch.Client] Use the right TargetFrameworks for watchOS and macOS as well. (#92) * xamarin/Touch.Unit@fd0e576 [Touch.Client] Use the right TargetFrameworks. (#91) * xamarin/Touch.Unit@40f47db [Touch.Client] Add a macOS and watchOS version for .NET. (#90) * xamarin/Touch.Unit@1d4b8c0 Add .gitignore for NuGet.config and global.json. (#89) * xamarin/Touch.Unit@49441f3 Call `mlaunch` instead of `mtouch` (#88) * xamarin/Touch.Unit@b157cf4 Fix a few markdown issues found by markdownlint. (#87) Diff: https://github.com/spouliot/Touch.Unit/compare/d7f55a61673e18ae5a8f9628600081a54b4e074c..89afaf7e05a942c87231cf5601b3a5b59640e218 * [dotnet] Document the script that generates the lists of the target platform versions a little bit better. * [dotnet] Make the [Platform]SupportedTargetPlatform variables public. This matches how Android and Windows do it: * dotnet/android#5007 * https://github.com/dotnet/sdk/blob/18ee4eac8b3abe6d554d2e0c39d8952da0f23ce5/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props * [xharness] Update the TargetFramework value when creating project variations.
- Loading branch information
1 parent
4f004e7
commit d278851
Showing
58 changed files
with
146 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
nupkgs | ||
Microsoft.*.Sdk/targets/Microsoft.*.Sdk.SupportedTargetPlatforms.props | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env /Library/Frameworks/Mono.framework/Commands/csharp | ||
|
||
// arguments are: <platform> <outputPath> | ||
|
||
using System.IO; | ||
using System.Xml; | ||
|
||
var args = Environment.GetCommandLineArgs (); | ||
var expectedArgumentCount = 2; | ||
if (args.Length != expectedArgumentCount + 2 /* 2 default arguments (executable + script) + 'expectedArgumentCount' arguments we're interested in */) { | ||
// first arg is "/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/4.5/csharp.exe" | ||
// second arg the script itself | ||
// then comes the ones we care about | ||
Console.WriteLine ($"Need {expectedArgumentCount} arguments, got {args.Length - 2}"); | ||
Environment.Exit (1); | ||
return; | ||
} | ||
|
||
var platform = args [2]; | ||
var outputPath = args [3]; | ||
var plistPath = platform == "macOS" ? "../Versions-mac.plist.in" : "../Versions-ios.plist.in"; | ||
|
||
var doc = new XmlDocument (); | ||
doc.Load (plistPath); | ||
var nodes = doc.SelectNodes ($"/plist/dict/key[text()='KnownVersions']/following-sibling::dict[1]/key[text()='{platform}']/following-sibling::array[1]/string"); | ||
|
||
using (TextWriter writer = new StreamWriter (outputPath)) { | ||
writer.WriteLine ($"<!-- This file contains a generated list of the {platform} platform versions that are supported for this SDK -->"); | ||
writer.WriteLine ($"<!-- Generation script: https://github.com/xamarin/xamarin-macios/blob/main/dotnet/generate-target-platforms.csharp -->"); | ||
writer.WriteLine ("<Project>"); | ||
writer.WriteLine ("\t<ItemGroup>"); | ||
|
||
foreach (XmlNode n in nodes) | ||
writer.WriteLine ($"\t\t<{platform}SupportedTargetPlatform Include=\"{n.InnerText}\" />"); | ||
|
||
writer.WriteLine ("\t</ItemGroup>"); | ||
writer.WriteLine ("\t<ItemGroup>"); | ||
writer.WriteLine ($"\t\t<SupportedTargetPlatform Condition=\"'$(TargetPlatformIdentifier)' == '{platform}'\" Include=\"@({platform}SupportedTargetPlatform)\" />"); | ||
writer.WriteLine ("\t</ItemGroup>"); | ||
writer.WriteLine ("</Project>"); | ||
} | ||
|
||
Environment.Exit (0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Touch.Unit
updated
from d7f55a to 89afaf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.iOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0-ios</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.targets" /> | ||
</Project> |
3 changes: 3 additions & 0 deletions
3
tests/EmbeddedResources/dotnet/macOS/EmbeddedResources.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.macOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0-macos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.tvOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0-tvos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.targets" /> | ||
</Project> |
3 changes: 3 additions & 0 deletions
3
tests/EmbeddedResources/dotnet/watchOS/EmbeddedResources.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.watchOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0-watchos</TargetFramework> | ||
</PropertyGroup> | ||
<Import Project="..\shared.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.iOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<TargetFramework>net5.0-ios</TargetFramework> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.iOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<TargetFramework>net5.0-ios</TargetFramework> | ||
</PropertyGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.macOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<TargetFramework>net5.0-macos</TargetFramework> | ||
</PropertyGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.tvOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<TargetFramework>net5.0-tvos</TargetFramework> | ||
</PropertyGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.watchOS.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<TargetFramework>net5.0-watchos</TargetFramework> | ||
</PropertyGroup> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dotnet/MyWatchApp/MyWatchContainer/MyWatchContainer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/dotnet/MyWatchApp/MyWatchExtension/MyWatchExtension.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Build was (probably) aborted
🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Install Provisioning Profiles' 🔥 : hudson.AbortException: script returned exit code 104
✅ Provisioning succeeded
✅ Build succeeded
✅ Packages built successfully
View packages
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS (DDFun) 🔥
Failed provisioning profiles.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS (DDFun) 🔥
Failed installing dependencies.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS32b (Cambridge) 🔥
Failed provisioning profiles.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS32b (Cambridge) 🔥
Failed installing dependencies.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS (Cambridge) 🔥
Failed provisioning profiles.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests iOS (Cambridge) 🔥
Failed installing dependencies.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests tvOS (DDFun) 🔥
Failed provisioning profiles.
Pipeline on Agent
d278851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Tests failed catastrophically on VSTS: device tests tvOS (DDFun) 🔥
Failed installing dependencies.
Pipeline on Agent