diff --git a/.gitmodules b/.gitmodules index 5edb550dd124..51cc22ec2f6c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,3 +18,7 @@ path = external/Xamarin.MacDev url = ../../xamarin/Xamarin.MacDev branch = main +[submodule "external/MonoTouch.Dialog"] + path = external/MonoTouch.Dialog + url = ../../migueldeicaza/MonoTouch.Dialog + branch = dotnet diff --git a/Make.config b/Make.config index 33a76446d630..71bdfab53739 100644 --- a/Make.config +++ b/Make.config @@ -401,6 +401,7 @@ XAMARIN_MACDEV_PATH=$(TOP)/external/Xamarin.MacDev MACCORE_PATH=$(TOP)/../maccore MACIOS_BINARIES_PATH=$(TOP)/external/macios-binaries IKVM_PATH=$(TOP)/external/ikvm-fork +MONOTOUCH_DIALOG_PATH=$(TOP)/external/MonoTouch.Dialog MONO_PREFIX ?= /Library/Frameworks/Mono.framework/Versions/Current SYSTEM_MCS=$(MONO_PREFIX)/bin/mcs diff --git a/external/MonoTouch.Dialog b/external/MonoTouch.Dialog new file mode 160000 index 000000000000..8e60f82a1ab0 --- /dev/null +++ b/external/MonoTouch.Dialog @@ -0,0 +1 @@ +Subproject commit 8e60f82a1ab0fba5e798624edd488736870bb0d7 diff --git a/external/Touch.Unit b/external/Touch.Unit index 3345db2f4e64..cbda70358360 160000 --- a/external/Touch.Unit +++ b/external/Touch.Unit @@ -1 +1 @@ -Subproject commit 3345db2f4e6408fdf2e8f099251c5c1310b56937 +Subproject commit cbda70358360329854ea399100a2b5b04ae43982 diff --git a/mk/versions.mk b/mk/versions.mk index f95c8ad4be39..b1377c69be03 100644 --- a/mk/versions.mk +++ b/mk/versions.mk @@ -69,6 +69,7 @@ $(eval $(call CheckSubmoduleTemplate,opentk,OPENTK)) $(eval $(call CheckSubmoduleTemplate,Xamarin.MacDev,XAMARIN_MACDEV)) $(eval $(call CheckSubmoduleTemplate,macios-binaries,MACIOS_BINARIES)) $(eval $(call CheckSubmoduleTemplate,ikvm-fork,IKVM)) +$(eval $(call CheckSubmoduleTemplate,MonoTouch.Dialog,MONOTOUCH_DIALOG)) include $(TOP)/mk/xamarin.mk diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index 65d12a17b6a9..0b988fe9f054 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -2250,7 +2250,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. - + (); for (var i = 0; i < files.Length; i++) { var fn = files [i]; - targets [i] = Path.Combine (targetDirectory, fn); var src = Path.Combine (srcDirectory, fn); if (!File.Exists (src)) ExecutionHelper.Execute ("make", new [] { "-C", srcDirectory, fn }); - File.Copy (src, targets [i], true); + foreach (var targetDirectory in targetDirectories) { + var target = Path.Combine (targetDirectory, fn); + File.Copy (src, target, true); + targets.Add (target); + } } - return targets; + return targets.ToArray (); } public static Dictionary GetBuildEnvironment (ApplePlatform platform) diff --git a/tests/common/shared-dotnet.csproj b/tests/common/shared-dotnet.csproj index 846e46ccea85..5f64b7b9411d 100644 --- a/tests/common/shared-dotnet.csproj +++ b/tests/common/shared-dotnet.csproj @@ -11,7 +11,6 @@ 10.0 - @@ -22,7 +21,6 @@ 10.0 - @@ -40,4 +38,10 @@ + + + + + + diff --git a/tests/dotnet/Makefile b/tests/dotnet/Makefile index c92feb78a594..be4c4f0eec10 100644 --- a/tests/dotnet/Makefile +++ b/tests/dotnet/Makefile @@ -68,3 +68,4 @@ copy-dotnet-config: $(TARGETS) $(CP) -c NuGet.config global.json "$$dir"; \ done $(Q) $(CP) -c NuGet.config global.json $(TOP)/external/Touch.Unit/Touch.Client/dotnet + $(Q) $(CP) -c NuGet.config global.json $(TOP)/external/MonoTouch.Dialog/MonoTouch.Dialog/dotnet diff --git a/tests/dotnet/UnitTests/PackTest.cs b/tests/dotnet/UnitTests/PackTest.cs index 0eb62c67ea4d..07052771a7e5 100644 --- a/tests/dotnet/UnitTests/PackTest.cs +++ b/tests/dotnet/UnitTests/PackTest.cs @@ -110,6 +110,7 @@ public void BindingFrameworksProject (ApplePlatform platform, bool noBindingEmbe public void BindingXcFrameworksProject (ApplePlatform platform, bool noBindingEmbedding) { var project = "bindings-xcframework-test"; + var assemblyName = "bindings-framework-test"; Configuration.IgnoreIfIgnoredPlatform (platform); var project_path = Path.Combine (Configuration.RootPath, "tests", project, "dotnet", platform.AsString (), $"{project}.csproj"); @@ -123,23 +124,22 @@ public void BindingXcFrameworksProject (ApplePlatform platform, bool noBindingEm properties ["OutputPath"] = outputPath + Path.DirectorySeparatorChar; properties ["IntermediateOutputPath"] = intermediateOutputPath + Path.DirectorySeparatorChar; properties ["NoBindingEmbedding"] = noBindingEmbedding ? "true" : "false"; - properties ["AssemblyName"] = project; DotNet.AssertPack (project_path, properties); - var nupkg = Path.Combine (outputPath, project + ".1.0.0.nupkg"); + var nupkg = Path.Combine (outputPath, assemblyName + ".1.0.0.nupkg"); Assert.That (nupkg, Does.Exist, "nupkg existence"); var archive = ZipFile.OpenRead (nupkg); var files = archive.Entries.Select (v => v.FullName).ToHashSet (); Assert.That (archive.Entries.Count, Is.EqualTo (noBindingEmbedding ? 6 : 5), $"nupkg file count - {nupkg}"); - Assert.That (files, Does.Contain (project + ".nuspec"), "nuspec"); + Assert.That (files, Does.Contain (assemblyName + ".nuspec"), "nuspec"); Assert.That (files, Does.Contain ("_rels/.rels"), ".rels"); Assert.That (files, Does.Contain ("[Content_Types].xml"), "[Content_Types].xml"); - Assert.That (files, Does.Contain ($"lib/{platform.ToFrameworkWithDefaultVersion ()}/{project}.dll"), $"{project}.dll"); + Assert.That (files, Does.Contain ($"lib/{platform.ToFrameworkWithDefaultVersion ()}/{assemblyName}.dll"), $"{assemblyName}.dll"); Assert.That (files, Has.Some.Matches (v => v.StartsWith ("package/services/metadata/core-properties/", StringComparison.Ordinal) && v.EndsWith (".psmdcp", StringComparison.Ordinal)), "psmdcp"); if (noBindingEmbedding) { - Assert.That (files, Does.Contain ($"lib/{platform.ToFrameworkWithDefaultVersion ()}/{project}.resources.zip"), $"{project}.resources.zip"); + Assert.That (files, Does.Contain ($"lib/{platform.ToFrameworkWithDefaultVersion ()}/{assemblyName}.resources.zip"), $"{assemblyName}.resources.zip"); } } diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 98aff1df7899..1b7ee00e16c1 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -277,7 +277,10 @@ public void BuildInterdependentBindingProjects (string platform) Configuration.CopyDotNetSupportingFiles (dotnet_bindings_dir); Configuration.CopyDotNetSupportingFiles (dotnet_bindings_dir.Replace (assemblyName, "bindings-test")); Configuration.CopyDotNetSupportingFiles (dotnet_bindings_dir.Replace (assemblyName, "bindings-test2")); - var cleanupSupportFiles = Configuration.CopyDotNetSupportingFiles (Path.Combine (Configuration.SourceRoot, "external", "Touch.Unit", "Touch.Client/dotnet")); + var cleanupSupportFiles = Configuration.CopyDotNetSupportingFiles ( + Path.Combine (Configuration.SourceRoot, "external", "Touch.Unit", "Touch.Client", "dotnet"), + Path.Combine (Configuration.SourceRoot, "external", "MonoTouch.Dialog", "MonoTouch.Dialog", "dotnet") + ); try { var result = DotNet.AssertBuild (project_path, verbosity); var lines = BinLog.PrintToLines (result.BinLogPath); @@ -476,8 +479,9 @@ public void InvalidRuntimeIdentifier (ApplePlatform platform, string runtimeIden var properties = GetDefaultProperties (runtimeIdentifier); var rv = DotNet.AssertBuildFailure (project_path, properties); var errors = BinLog.GetBuildLogErrors (rv.BinLogPath).ToArray (); - Assert.AreEqual (1, errors.Length, "Error count"); - Assert.AreEqual ($"The RuntimeIdentifier '{runtimeIdentifier}' is invalid.", errors [0].Message, "Error message"); + var uniqueErrors = errors.Select (v => v.Message).Distinct ().ToArray (); + Assert.AreEqual (1, uniqueErrors.Length, "Error count"); + Assert.AreEqual ($"The RuntimeIdentifier '{runtimeIdentifier}' is invalid.", uniqueErrors [0], "Error message"); } [Test] diff --git a/tests/framework-test/dotnet/shared.csproj b/tests/framework-test/dotnet/shared.csproj index 48943019ff5c..9d4e7627eab7 100644 --- a/tests/framework-test/dotnet/shared.csproj +++ b/tests/framework-test/dotnet/shared.csproj @@ -19,11 +19,6 @@ - - - - - diff --git a/tests/fsharp/dotnet/shared.fsproj b/tests/fsharp/dotnet/shared.fsproj index 949b4a3b024f..db8d912c7623 100644 --- a/tests/fsharp/dotnet/shared.fsproj +++ b/tests/fsharp/dotnet/shared.fsproj @@ -22,10 +22,6 @@ - - - - diff --git a/tests/interdependent-binding-projects/dotnet/shared.csproj b/tests/interdependent-binding-projects/dotnet/shared.csproj index ede579a1679a..267d9fac79e2 100644 --- a/tests/interdependent-binding-projects/dotnet/shared.csproj +++ b/tests/interdependent-binding-projects/dotnet/shared.csproj @@ -24,11 +24,6 @@ - - - - - diff --git a/tests/introspection/dotnet/shared.csproj b/tests/introspection/dotnet/shared.csproj index 0ef7df1f5e48..84f516089b30 100644 --- a/tests/introspection/dotnet/shared.csproj +++ b/tests/introspection/dotnet/shared.csproj @@ -21,13 +21,6 @@ - - - - - - - diff --git a/tests/linker/ios/dont link/dotnet/shared.csproj b/tests/linker/ios/dont link/dotnet/shared.csproj index a3152fab4f0a..827a00633300 100644 --- a/tests/linker/ios/dont link/dotnet/shared.csproj +++ b/tests/linker/ios/dont link/dotnet/shared.csproj @@ -15,10 +15,6 @@ - - - - diff --git a/tests/linker/ios/link all/dotnet/shared.csproj b/tests/linker/ios/link all/dotnet/shared.csproj index 1be52aa65b89..2a5f90a1f171 100644 --- a/tests/linker/ios/link all/dotnet/shared.csproj +++ b/tests/linker/ios/link all/dotnet/shared.csproj @@ -30,10 +30,6 @@ - - - - diff --git a/tests/linker/ios/link sdk/dotnet/shared.csproj b/tests/linker/ios/link sdk/dotnet/shared.csproj index c80380365a3f..c9d0f454d4f6 100644 --- a/tests/linker/ios/link sdk/dotnet/shared.csproj +++ b/tests/linker/ios/link sdk/dotnet/shared.csproj @@ -24,10 +24,6 @@ $(ThisTestDirectory)/support.dll - - - - diff --git a/tests/monotouch-test/dotnet/shared.csproj b/tests/monotouch-test/dotnet/shared.csproj index 1a3316c727e2..93183f9cfe3f 100644 --- a/tests/monotouch-test/dotnet/shared.csproj +++ b/tests/monotouch-test/dotnet/shared.csproj @@ -25,11 +25,6 @@ - - - - - diff --git a/tests/xcframework-test/dotnet/shared.csproj b/tests/xcframework-test/dotnet/shared.csproj index 56e301713b80..e1cf7abf8ebd 100644 --- a/tests/xcframework-test/dotnet/shared.csproj +++ b/tests/xcframework-test/dotnet/shared.csproj @@ -19,11 +19,6 @@ - - - - -