diff --git a/dotnet/.gitignore b/dotnet/.gitignore index 34b91bda3362..e586e107afb9 100644 --- a/dotnet/.gitignore +++ b/dotnet/.gitignore @@ -1,2 +1,3 @@ nupkgs +Microsoft.*.Sdk/targets/Microsoft.*.Sdk.SupportedTargetPlatforms.props diff --git a/dotnet/Makefile b/dotnet/Makefile index 75a2c799ea14..6e33f452b0b9 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -7,6 +7,7 @@ define DefineTargets $(1)_NUGET_TARGETS = \ $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/Sdk/Sdk.targets \ $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/Sdk/Sdk.props \ + $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.SupportedTargetPlatforms.props \ $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.DefaultItems.props \ $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.props \ $(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.targets \ @@ -61,8 +62,17 @@ targets/%.props: targets/%.template.props Makefile $(TOP)/Make.config.inc $(TOP) -e "s/@CURRENT_HASH_LONG@/$(CURRENT_HASH_LONG)/g" \ $< > $@ +define SupportedTargetPlatforms +Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.SupportedTargetPlatforms.props: $(TOP)/Versions-ios.plist.in $(TOP)/Versions-mac.plist.in Makefile ./generate-target-platforms.csharp Makefile + $(Q) rm -f $$@.tmp + $(Q) ./generate-target-platforms.csharp $(1) $$@.tmp + $(Q) mv $$@.tmp $$@ +endef +$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call SupportedTargetPlatforms,$(platform)))) + TEMPLATED_FILES = \ targets/Xamarin.Shared.Sdk.Versions.props \ + $(foreach platform,$(DOTNET_PLATFORMS),Microsoft.$(platform).Sdk/targets/Microsoft.$(platform).Sdk.SupportedTargetPlatforms.props) \ nupkgs/$(IOS_NUGET).%.nupkg: CURRENT_VERSION_NO_METADATA=$(IOS_NUGET_VERSION_NO_METADATA) nupkgs/$(TVOS_NUGET).%.nupkg: CURRENT_VERSION_NO_METADATA=$(TVOS_NUGET_VERSION_NO_METADATA) diff --git a/dotnet/generate-target-platforms.csharp b/dotnet/generate-target-platforms.csharp new file mode 100755 index 000000000000..e5aea974bfb8 --- /dev/null +++ b/dotnet/generate-target-platforms.csharp @@ -0,0 +1,43 @@ +#!/usr/bin/env /Library/Frameworks/Mono.framework/Commands/csharp + +// arguments are: + +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 ($""); + writer.WriteLine ($""); + writer.WriteLine (""); + writer.WriteLine ("\t"); + + foreach (XmlNode n in nodes) + writer.WriteLine ($"\t\t<{platform}SupportedTargetPlatform Include=\"{n.InnerText}\" />"); + + writer.WriteLine ("\t"); + writer.WriteLine ("\t"); + writer.WriteLine ($"\t\t"); + writer.WriteLine ("\t"); + writer.WriteLine (""); +} + +Environment.Exit (0); diff --git a/dotnet/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.targets b/dotnet/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.targets index 2541921df384..9b933877a91a 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.targets @@ -17,4 +17,9 @@ watchOS macOS + + + + $(_DefaultTargetPlatformVersion) + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.Versions.template.props b/dotnet/targets/Xamarin.Shared.Sdk.Versions.template.props index d0bffa8596a0..816172139a02 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.Versions.template.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.Versions.template.props @@ -14,4 +14,18 @@ <_PackageVersion Condition=" '$(_PlatformName)' == 'watchOS' ">@WATCHOS_NUGET_VERSION_FULL@ <_PackageVersion Condition=" '$(_PlatformName)' == 'macOS' ">@MACOS_NUGET_VERSION_FULL@ + + + + + <_DefaultTargetPlatformVersion Condition=" '$(_PlatformName)' == 'iOS' ">13.6 + <_DefaultTargetPlatformVersion Condition=" '$(_PlatformName)' == 'tvOS' ">13.4 + <_DefaultTargetPlatformVersion Condition=" '$(_PlatformName)' == 'watchOS' ">6.2 + <_DefaultTargetPlatformVersion Condition=" '$(_PlatformName)' == 'macOS' ">10.15 + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index 61b56161c42f..e1094735da4d 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -12,4 +12,7 @@ + + + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index a71a9ef93804..e9bd69dbc946 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -83,6 +83,10 @@ + + true + + diff --git a/external/Touch.Unit b/external/Touch.Unit index d7f55a61673e..89afaf7e05a9 160000 --- a/external/Touch.Unit +++ b/external/Touch.Unit @@ -1 +1 @@ -Subproject commit d7f55a61673e18ae5a8f9628600081a54b4e074c +Subproject commit 89afaf7e05a942c87231cf5601b3a5b59640e218 diff --git a/tests/BundledResources/dotnet/iOS/BundledResources.csproj b/tests/BundledResources/dotnet/iOS/BundledResources.csproj index 23b3ff0a4884..af44b6cc78a3 100644 --- a/tests/BundledResources/dotnet/iOS/BundledResources.csproj +++ b/tests/BundledResources/dotnet/iOS/BundledResources.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios latest diff --git a/tests/BundledResources/dotnet/macOS/BundledResources.csproj b/tests/BundledResources/dotnet/macOS/BundledResources.csproj index 9d085a14e24e..a3dc225508c1 100644 --- a/tests/BundledResources/dotnet/macOS/BundledResources.csproj +++ b/tests/BundledResources/dotnet/macOS/BundledResources.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-macos latest diff --git a/tests/BundledResources/dotnet/tvOS/BundledResources.csproj b/tests/BundledResources/dotnet/tvOS/BundledResources.csproj index 97ccf9b5cded..7afcdd11963a 100644 --- a/tests/BundledResources/dotnet/tvOS/BundledResources.csproj +++ b/tests/BundledResources/dotnet/tvOS/BundledResources.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-tvos latest diff --git a/tests/BundledResources/dotnet/watchOS/BundledResources.csproj b/tests/BundledResources/dotnet/watchOS/BundledResources.csproj index 5bf67c0b8160..5d3c759862e4 100644 --- a/tests/BundledResources/dotnet/watchOS/BundledResources.csproj +++ b/tests/BundledResources/dotnet/watchOS/BundledResources.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-watchos latest diff --git a/tests/EmbeddedResources/dotnet/iOS/EmbeddedResources.csproj b/tests/EmbeddedResources/dotnet/iOS/EmbeddedResources.csproj index b48c8a7ca9e3..f92f521be428 100644 --- a/tests/EmbeddedResources/dotnet/iOS/EmbeddedResources.csproj +++ b/tests/EmbeddedResources/dotnet/iOS/EmbeddedResources.csproj @@ -1,4 +1,7 @@ + + net5.0-ios + diff --git a/tests/EmbeddedResources/dotnet/macOS/EmbeddedResources.csproj b/tests/EmbeddedResources/dotnet/macOS/EmbeddedResources.csproj index 4f84f0f81213..0572566ad7f1 100644 --- a/tests/EmbeddedResources/dotnet/macOS/EmbeddedResources.csproj +++ b/tests/EmbeddedResources/dotnet/macOS/EmbeddedResources.csproj @@ -1,4 +1,7 @@ + + net5.0-macos + diff --git a/tests/EmbeddedResources/dotnet/shared.targets b/tests/EmbeddedResources/dotnet/shared.targets index 544be5edc057..04389527f1b6 100644 --- a/tests/EmbeddedResources/dotnet/shared.targets +++ b/tests/EmbeddedResources/dotnet/shared.targets @@ -1,7 +1,6 @@ - net5.0 true latest diff --git a/tests/EmbeddedResources/dotnet/tvOS/EmbeddedResources.csproj b/tests/EmbeddedResources/dotnet/tvOS/EmbeddedResources.csproj index a3ccbd44d531..7f32f6713b41 100644 --- a/tests/EmbeddedResources/dotnet/tvOS/EmbeddedResources.csproj +++ b/tests/EmbeddedResources/dotnet/tvOS/EmbeddedResources.csproj @@ -1,4 +1,7 @@ + + net5.0-tvos + diff --git a/tests/EmbeddedResources/dotnet/watchOS/EmbeddedResources.csproj b/tests/EmbeddedResources/dotnet/watchOS/EmbeddedResources.csproj index f17a00c39c35..8953eeb966ae 100644 --- a/tests/EmbeddedResources/dotnet/watchOS/EmbeddedResources.csproj +++ b/tests/EmbeddedResources/dotnet/watchOS/EmbeddedResources.csproj @@ -1,4 +1,7 @@ + + net5.0-watchos + diff --git a/tests/bindings-test/dotnet/iOS/bindings-test.csproj b/tests/bindings-test/dotnet/iOS/bindings-test.csproj index fce8c3d1dba6..08fd60e1e9fa 100644 --- a/tests/bindings-test/dotnet/iOS/bindings-test.csproj +++ b/tests/bindings-test/dotnet/iOS/bindings-test.csproj @@ -1,6 +1,7 @@ + net5.0-ios ios-fat diff --git a/tests/bindings-test/dotnet/macOS/bindings-test.csproj b/tests/bindings-test/dotnet/macOS/bindings-test.csproj index 0b039635f109..8cb011655c7e 100644 --- a/tests/bindings-test/dotnet/macOS/bindings-test.csproj +++ b/tests/bindings-test/dotnet/macOS/bindings-test.csproj @@ -1,6 +1,7 @@ + net5.0-macos macos diff --git a/tests/bindings-test/dotnet/shared.targets b/tests/bindings-test/dotnet/shared.targets index ffc5acd1e740..4f05f206df22 100644 --- a/tests/bindings-test/dotnet/shared.targets +++ b/tests/bindings-test/dotnet/shared.targets @@ -1,7 +1,6 @@ - net5.0 bindingstest true ..\..\..\..\product.snk diff --git a/tests/bindings-test/dotnet/tvOS/bindings-test.csproj b/tests/bindings-test/dotnet/tvOS/bindings-test.csproj index 5bf40e04cfff..338d3918f7d5 100644 --- a/tests/bindings-test/dotnet/tvOS/bindings-test.csproj +++ b/tests/bindings-test/dotnet/tvOS/bindings-test.csproj @@ -1,6 +1,7 @@ + net5.0-tvos tvos-fat diff --git a/tests/bindings-test/dotnet/watchOS/bindings-test.csproj b/tests/bindings-test/dotnet/watchOS/bindings-test.csproj index a78e54fea9a5..344fb63c00e0 100644 --- a/tests/bindings-test/dotnet/watchOS/bindings-test.csproj +++ b/tests/bindings-test/dotnet/watchOS/bindings-test.csproj @@ -1,6 +1,7 @@ + net5.0-watchos watchos-fat diff --git a/tests/bindings-test2/dotnet/iOS/bindings-test2.csproj b/tests/bindings-test2/dotnet/iOS/bindings-test2.csproj index 662296c7d1dc..78dc41a90d29 100644 --- a/tests/bindings-test2/dotnet/iOS/bindings-test2.csproj +++ b/tests/bindings-test2/dotnet/iOS/bindings-test2.csproj @@ -1,6 +1,7 @@ + net5.0-ios ios-fat iOS ..\..\.. diff --git a/tests/bindings-test2/dotnet/macOS/bindings-test2.csproj b/tests/bindings-test2/dotnet/macOS/bindings-test2.csproj index 43be3f9d0097..212872f71c1f 100644 --- a/tests/bindings-test2/dotnet/macOS/bindings-test2.csproj +++ b/tests/bindings-test2/dotnet/macOS/bindings-test2.csproj @@ -1,6 +1,7 @@ + net5.0-macos macos macOS ..\..\.. diff --git a/tests/bindings-test2/dotnet/shared.targets b/tests/bindings-test2/dotnet/shared.targets index ef600332be1b..450a7da96636 100644 --- a/tests/bindings-test2/dotnet/shared.targets +++ b/tests/bindings-test2/dotnet/shared.targets @@ -1,7 +1,6 @@ - net5.0 bindingstest2 true ..\..\..\..\product.snk diff --git a/tests/bindings-test2/dotnet/tvOS/bindings-test2.csproj b/tests/bindings-test2/dotnet/tvOS/bindings-test2.csproj index 9bf780dbaf79..a3a9fc2e66f7 100644 --- a/tests/bindings-test2/dotnet/tvOS/bindings-test2.csproj +++ b/tests/bindings-test2/dotnet/tvOS/bindings-test2.csproj @@ -1,6 +1,7 @@ + net5.0-tvos tvos-fat tvOS ..\..\.. diff --git a/tests/bindings-test2/dotnet/watchOS/bindings-test2.csproj b/tests/bindings-test2/dotnet/watchOS/bindings-test2.csproj index 332cb51a9c89..b794247039ff 100644 --- a/tests/bindings-test2/dotnet/watchOS/bindings-test2.csproj +++ b/tests/bindings-test2/dotnet/watchOS/bindings-test2.csproj @@ -1,6 +1,7 @@ + net5.0-watchos watchos-fat watchOS ..\..\.. diff --git a/tests/dotnet/MyClassLibrary/MyClassLibrary.csproj b/tests/dotnet/MyClassLibrary/MyClassLibrary.csproj index ddcd613c6f5f..bea0ea6fd2bb 100644 --- a/tests/dotnet/MyClassLibrary/MyClassLibrary.csproj +++ b/tests/dotnet/MyClassLibrary/MyClassLibrary.csproj @@ -1,6 +1,6 @@ - net5.0 + net5.0-ios diff --git a/tests/dotnet/MyClassLibrary/iOS/MyClassLibrary.csproj b/tests/dotnet/MyClassLibrary/iOS/MyClassLibrary.csproj index 1462e27279e7..713edc46f68c 100644 --- a/tests/dotnet/MyClassLibrary/iOS/MyClassLibrary.csproj +++ b/tests/dotnet/MyClassLibrary/iOS/MyClassLibrary.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios diff --git a/tests/dotnet/MyClassLibrary/macOS/MyClassLibrary.csproj b/tests/dotnet/MyClassLibrary/macOS/MyClassLibrary.csproj index d167b534c53d..d851c23f2c93 100644 --- a/tests/dotnet/MyClassLibrary/macOS/MyClassLibrary.csproj +++ b/tests/dotnet/MyClassLibrary/macOS/MyClassLibrary.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-macos diff --git a/tests/dotnet/MyClassLibrary/tvOS/MyClassLibrary.csproj b/tests/dotnet/MyClassLibrary/tvOS/MyClassLibrary.csproj index d25ca6a336cb..2ae2b5b5a980 100644 --- a/tests/dotnet/MyClassLibrary/tvOS/MyClassLibrary.csproj +++ b/tests/dotnet/MyClassLibrary/tvOS/MyClassLibrary.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-tvos diff --git a/tests/dotnet/MyClassLibrary/watchOS/MyClassLibrary.csproj b/tests/dotnet/MyClassLibrary/watchOS/MyClassLibrary.csproj index 0fa1b94b126b..f02a4245b01b 100644 --- a/tests/dotnet/MyClassLibrary/watchOS/MyClassLibrary.csproj +++ b/tests/dotnet/MyClassLibrary/watchOS/MyClassLibrary.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-watchos diff --git a/tests/dotnet/MyCocoaApp/MyCocoaApp.csproj b/tests/dotnet/MyCocoaApp/MyCocoaApp.csproj index 5da15eb14d15..53730930cfb8 100644 --- a/tests/dotnet/MyCocoaApp/MyCocoaApp.csproj +++ b/tests/dotnet/MyCocoaApp/MyCocoaApp.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-macos osx-x64 Exe diff --git a/tests/dotnet/MySingleView/MySingleView.csproj b/tests/dotnet/MySingleView/MySingleView.csproj index 79626d99754f..cdcf16bd05ff 100644 --- a/tests/dotnet/MySingleView/MySingleView.csproj +++ b/tests/dotnet/MySingleView/MySingleView.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe diff --git a/tests/dotnet/MyTVApp/MyTVApp.csproj b/tests/dotnet/MyTVApp/MyTVApp.csproj index 586baa437555..387a6f9b398f 100644 --- a/tests/dotnet/MyTVApp/MyTVApp.csproj +++ b/tests/dotnet/MyTVApp/MyTVApp.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-tvos tvos-x64 Exe diff --git a/tests/dotnet/MyWatchApp/MyWatchApp/MyWatchApp.csproj b/tests/dotnet/MyWatchApp/MyWatchApp/MyWatchApp.csproj index cd24898115ab..e5565b9b732c 100644 --- a/tests/dotnet/MyWatchApp/MyWatchApp/MyWatchApp.csproj +++ b/tests/dotnet/MyWatchApp/MyWatchApp/MyWatchApp.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-watchos watchos-x86 true diff --git a/tests/dotnet/MyWatchApp/MyWatchContainer/MyWatchContainer.csproj b/tests/dotnet/MyWatchApp/MyWatchContainer/MyWatchContainer.csproj index f8f1c8376b16..4d51a5c8361e 100644 --- a/tests/dotnet/MyWatchApp/MyWatchContainer/MyWatchContainer.csproj +++ b/tests/dotnet/MyWatchApp/MyWatchContainer/MyWatchContainer.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe diff --git a/tests/dotnet/MyWatchApp/MyWatchExtension/MyWatchExtension.csproj b/tests/dotnet/MyWatchApp/MyWatchExtension/MyWatchExtension.csproj index 6a6dabcfa825..61d4e29ac4e7 100644 --- a/tests/dotnet/MyWatchApp/MyWatchExtension/MyWatchExtension.csproj +++ b/tests/dotnet/MyWatchApp/MyWatchExtension/MyWatchExtension.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-watchos watchos-x86 true diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index c57df2b78fff..7efeda850cfe 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -49,7 +49,7 @@ public void BuildMySingleView () Clean (project_path); var result = DotNet.AssertBuild (project_path, verbosity); AssertThatLinkerExecuted (result); - AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0", "ios-x64", "MySingleView.app")); + AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0-ios", "ios-x64", "MySingleView.app")); } [Test] @@ -60,7 +60,7 @@ public void BuildMyCocoaApp () Clean (project_path); var result = DotNet.AssertBuild (project_path, verbosity); AssertThatLinkerExecuted (result); - AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0", "osx-x64", "MyCocoaApp.app")); + AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0-macos", "osx-x64", "MyCocoaApp.app")); } [Test] @@ -71,7 +71,7 @@ public void BuildMyTVApp () Clean (project_path); var result = DotNet.AssertBuild (project_path, verbosity); AssertThatLinkerExecuted (result); - AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0", "tvos-x64", "MyTVApp.app")); + AssertAppContents (platform, Path.Combine (Path.GetDirectoryName (project_path), "bin", "Debug", "net5.0-tvos", "tvos-x64", "MyTVApp.app")); } [Test] diff --git a/tests/fsharplibrary/dotnet/iOS/fsharplibrary.fsproj b/tests/fsharplibrary/dotnet/iOS/fsharplibrary.fsproj index b48c8a7ca9e3..f92f521be428 100644 --- a/tests/fsharplibrary/dotnet/iOS/fsharplibrary.fsproj +++ b/tests/fsharplibrary/dotnet/iOS/fsharplibrary.fsproj @@ -1,4 +1,7 @@ + + net5.0-ios + diff --git a/tests/fsharplibrary/dotnet/macOS/fsharplibrary.fsproj b/tests/fsharplibrary/dotnet/macOS/fsharplibrary.fsproj index 4f84f0f81213..0572566ad7f1 100644 --- a/tests/fsharplibrary/dotnet/macOS/fsharplibrary.fsproj +++ b/tests/fsharplibrary/dotnet/macOS/fsharplibrary.fsproj @@ -1,4 +1,7 @@ + + net5.0-macos + diff --git a/tests/fsharplibrary/dotnet/shared.targets b/tests/fsharplibrary/dotnet/shared.targets index e4abbc16af10..b480aa8a27de 100644 --- a/tests/fsharplibrary/dotnet/shared.targets +++ b/tests/fsharplibrary/dotnet/shared.targets @@ -1,6 +1,5 @@ - net5.0 true true diff --git a/tests/fsharplibrary/dotnet/tvOS/fsharplibrary.fsproj b/tests/fsharplibrary/dotnet/tvOS/fsharplibrary.fsproj index a3ccbd44d531..7f32f6713b41 100644 --- a/tests/fsharplibrary/dotnet/tvOS/fsharplibrary.fsproj +++ b/tests/fsharplibrary/dotnet/tvOS/fsharplibrary.fsproj @@ -1,4 +1,7 @@ + + net5.0-tvos + diff --git a/tests/fsharplibrary/dotnet/watchOS/fsharplibrary.fsproj b/tests/fsharplibrary/dotnet/watchOS/fsharplibrary.fsproj index f17a00c39c35..8953eeb966ae 100644 --- a/tests/fsharplibrary/dotnet/watchOS/fsharplibrary.fsproj +++ b/tests/fsharplibrary/dotnet/watchOS/fsharplibrary.fsproj @@ -1,4 +1,7 @@ + + net5.0-watchos + diff --git a/tests/interdependent-binding-projects/dotnet/iOS/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/dotnet/iOS/interdependent-binding-projects.csproj index 2f752a63f4eb..6f5d3604bad1 100644 --- a/tests/interdependent-binding-projects/dotnet/iOS/interdependent-binding-projects.csproj +++ b/tests/interdependent-binding-projects/dotnet/iOS/interdependent-binding-projects.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios Exe true latest diff --git a/tests/interdependent-binding-projects/dotnet/macOS/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/dotnet/macOS/interdependent-binding-projects.csproj index 9b8c2d552887..874d59aca3a0 100644 --- a/tests/interdependent-binding-projects/dotnet/macOS/interdependent-binding-projects.csproj +++ b/tests/interdependent-binding-projects/dotnet/macOS/interdependent-binding-projects.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-macos Exe true latest diff --git a/tests/interdependent-binding-projects/dotnet/tvOS/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/dotnet/tvOS/interdependent-binding-projects.csproj index 7629282f02db..f8f66ce1fe1b 100644 --- a/tests/interdependent-binding-projects/dotnet/tvOS/interdependent-binding-projects.csproj +++ b/tests/interdependent-binding-projects/dotnet/tvOS/interdependent-binding-projects.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-tvos Exe true latest diff --git a/tests/interdependent-binding-projects/dotnet/watchOS/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/dotnet/watchOS/interdependent-binding-projects.csproj index 76227cb41e5c..51ae112b69bb 100644 --- a/tests/interdependent-binding-projects/dotnet/watchOS/interdependent-binding-projects.csproj +++ b/tests/interdependent-binding-projects/dotnet/watchOS/interdependent-binding-projects.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-watchos Exe true latest diff --git a/tests/introspection/iOS/introspection-ios-dotnet.csproj b/tests/introspection/iOS/introspection-ios-dotnet.csproj index 7603fd8d4911..fdd5961386f4 100644 --- a/tests/introspection/iOS/introspection-ios-dotnet.csproj +++ b/tests/introspection/iOS/introspection-ios-dotnet.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe NET diff --git a/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj b/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj index 45452f0621a8..c762961359bb 100644 --- a/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj +++ b/tests/linker/ios/dont link/dotnet/iOS/dont link.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe NET diff --git a/tests/linker/ios/link all/dotnet/iOS/link all.csproj b/tests/linker/ios/link all/dotnet/iOS/link all.csproj index bdda8c051359..efaae4b3729e 100644 --- a/tests/linker/ios/link all/dotnet/iOS/link all.csproj +++ b/tests/linker/ios/link all/dotnet/iOS/link all.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe NET diff --git a/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj b/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj index cb0084575e38..52382c9c65b3 100644 --- a/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj +++ b/tests/linker/ios/link sdk/dotnet/iOS/link sdk.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe NET diff --git a/tests/monotouch-test/dotnet/iOS/monotouch-test.csproj b/tests/monotouch-test/dotnet/iOS/monotouch-test.csproj index f209406f116f..02cf5bccb9d3 100644 --- a/tests/monotouch-test/dotnet/iOS/monotouch-test.csproj +++ b/tests/monotouch-test/dotnet/iOS/monotouch-test.csproj @@ -1,7 +1,7 @@ - net5.0 + net5.0-ios ios-x64 Exe NET diff --git a/tests/xharness/Targets/MacTarget.cs b/tests/xharness/Targets/MacTarget.cs index ceb5e3cd8302..43d2ccc22ac0 100644 --- a/tests/xharness/Targets/MacTarget.cs +++ b/tests/xharness/Targets/MacTarget.cs @@ -110,6 +110,7 @@ public override string Platform { public override string DotNetSdk => "Microsoft.macOS.Sdk"; public override string RuntimeIdentifier => "osx-x64"; public override DevicePlatform ApplePlatform => DevicePlatform.macOS; + public override string TargetFramework => "net5.0-macos"; public override string TargetFrameworkForNuGet => "xamarinmac10"; protected override bool FixProjectReference (string include, string subdir, string suffix, out string fixed_include) diff --git a/tests/xharness/Targets/TVOSTarget.cs b/tests/xharness/Targets/TVOSTarget.cs index 61a5eb61e781..c11b2c1888a4 100644 --- a/tests/xharness/Targets/TVOSTarget.cs +++ b/tests/xharness/Targets/TVOSTarget.cs @@ -96,6 +96,7 @@ protected override bool SupportsBitcode { public override string DotNetSdk => "Microsoft.tvOS.Sdk"; public override string RuntimeIdentifier => "tvos-x64"; public override DevicePlatform ApplePlatform => DevicePlatform.tvOS; + public override string TargetFramework => "net5.0-tvos"; public override string TargetFrameworkForNuGet => "xamarintvos10"; static Dictionary project_guids = new Dictionary (); diff --git a/tests/xharness/Targets/Target.cs b/tests/xharness/Targets/Target.cs index 9136db1d9e7d..87a47252f954 100644 --- a/tests/xharness/Targets/Target.cs +++ b/tests/xharness/Targets/Target.cs @@ -74,6 +74,7 @@ public abstract class Target public abstract string DotNetSdk { get; } public abstract string RuntimeIdentifier { get; } public abstract DevicePlatform ApplePlatform { get; } + public abstract string TargetFramework { get; } public abstract string TargetFrameworkForNuGet { get; } public static string ProjectsDir { get { return "generated-projects"; } } @@ -128,6 +129,7 @@ protected virtual void ProcessDotNetProject () inputProject.SetSdk (DotNetSdk); inputProject.SetRuntimeIdentifier (RuntimeIdentifier); inputProject.FixProjectReferences (Path.Combine (ProjectsDir, GetTargetSpecificDir ()), Suffix, FixProjectReference); + inputProject.SetNode ("TargetFramework", TargetFramework); var fixedAssetTargetFallback = inputProject.GetAssetTargetFallback ()?.Replace ("xamarinios10", TargetFrameworkForNuGet); if (fixedAssetTargetFallback != null) inputProject.SetAssetTargetFallback (fixedAssetTargetFallback); diff --git a/tests/xharness/Targets/UnifiedTarget.cs b/tests/xharness/Targets/UnifiedTarget.cs index d6c7f32e2979..c9da34168fe0 100644 --- a/tests/xharness/Targets/UnifiedTarget.cs +++ b/tests/xharness/Targets/UnifiedTarget.cs @@ -127,6 +127,7 @@ protected override bool SupportsBitcode { public override string DotNetSdk => "Microsoft.iOS.Sdk"; public override string RuntimeIdentifier => "ios-x64"; public override DevicePlatform ApplePlatform => DevicePlatform.iOS; + public override string TargetFramework => "net5.0-ios"; public override string TargetFrameworkForNuGet => "xamarinios10"; } } diff --git a/tests/xharness/Targets/WatchOSTarget.cs b/tests/xharness/Targets/WatchOSTarget.cs index 38d689a79651..e4168a037874 100644 --- a/tests/xharness/Targets/WatchOSTarget.cs +++ b/tests/xharness/Targets/WatchOSTarget.cs @@ -31,6 +31,7 @@ public override string DeviceArchitectures { public override string DotNetSdk => "Microsoft.watchOS.Sdk"; public override string RuntimeIdentifier => throw new NotImplementedException (); public override DevicePlatform ApplePlatform => DevicePlatform.watchOS; + public override string TargetFramework => "net5.0-watchos"; public override string TargetFrameworkForNuGet => "xamarinwatch10"; void CreateWatchOSAppProject ()