diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index be60333c6f..89536f162f 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -386,10 +386,12 @@ + - - - $(MicrosoftNETCoreAppRefPackageVersion) - - - - - $(MicrosoftNETCoreAppRefPackageVersion) + + $(MicrosoftNETCoreAppRefPackageVersion) + + + $(MicrosoftNETCoreAppRefPackageVersion) diff --git a/tests/dotnet/MySimpleApp/Directory.Build.props b/tests/dotnet/MySimpleApp/Directory.Build.props new file mode 100644 index 0000000000..f35c2a50a9 --- /dev/null +++ b/tests/dotnet/MySimpleApp/Directory.Build.props @@ -0,0 +1,7 @@ + + + + false + + + diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index c2f4318cd7..cd4001996a 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -1984,5 +1984,37 @@ namespace Xamarin.Tests { ExecuteWithMagicWordAndAssert (appExecutable); } } + + [Test] + [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64")] + public void AppendRuntimeIdentifierToOutputPath_DisableCommandLine (ApplePlatform platform, string runtimeIdentifiers) + { + var project = "MySimpleApp"; + Configuration.IgnoreIfIgnoredPlatform (platform); + Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers); + + var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); + Clean (project_path); + var properties = GetDefaultProperties (runtimeIdentifiers); + properties ["cmdline:AppendRuntimeIdentifierToOutputPath"] = "false"; + DotNet.AssertBuild (project_path, properties); + } + + [Test] + [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64")] + public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (ApplePlatform platform, string runtimeIdentifiers) + { + var project = "MySimpleApp"; + Configuration.IgnoreIfIgnoredPlatform (platform); + Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers); + + var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); + Clean (project_path); + var properties = GetDefaultProperties (runtimeIdentifiers); + properties ["SetAppendRuntimeIdentifierToOutputPathToFalse"] = "true"; + DotNet.AssertBuild (project_path, properties); + } } } diff --git a/tests/dotnet/Windows/InstallDotNet.csproj b/tests/dotnet/Windows/InstallDotNet.csproj index 78bc126d48..2f208f0f27 100644 --- a/tests/dotnet/Windows/InstallDotNet.csproj +++ b/tests/dotnet/Windows/InstallDotNet.csproj @@ -54,8 +54,6 @@ - - netstandard2.0 false diff --git a/tests/test-libraries/nugets/FrameworksInRuntimesNativeDirectory/FrameworksInRuntimesNativeDirectory.csproj b/tests/test-libraries/nugets/FrameworksInRuntimesNativeDirectory/FrameworksInRuntimesNativeDirectory.csproj index e6a6de9c6e..48a7b1b683 100644 --- a/tests/test-libraries/nugets/FrameworksInRuntimesNativeDirectory/FrameworksInRuntimesNativeDirectory.csproj +++ b/tests/test-libraries/nugets/FrameworksInRuntimesNativeDirectory/FrameworksInRuntimesNativeDirectory.csproj @@ -12,7 +12,6 @@ $(RootTestDirectory)/test-libraries/frameworks - diff --git a/tests/test-libraries/nugets/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory.csproj b/tests/test-libraries/nugets/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory.csproj index e170001bdd..8171afed83 100644 --- a/tests/test-libraries/nugets/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory.csproj +++ b/tests/test-libraries/nugets/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory/XCFrameworkWithStaticLibraryInRuntimesNativeDirectory.csproj @@ -12,7 +12,6 @@ $(RootTestDirectory)/test-libraries - diff --git a/tests/xharness/Xharness.Tests/Xharness.Tests.csproj b/tests/xharness/Xharness.Tests/Xharness.Tests.csproj index 6477284ac1..cba5528d90 100644 --- a/tests/xharness/Xharness.Tests/Xharness.Tests.csproj +++ b/tests/xharness/Xharness.Tests/Xharness.Tests.csproj @@ -52,7 +52,6 @@ - {e1f53f80-8399-499b-8017-c414b9cd263b} diff --git a/tests/xharness/xharness.csproj b/tests/xharness/xharness.csproj index 404b9173cc..6d30a585e1 100644 --- a/tests/xharness/xharness.csproj +++ b/tests/xharness/xharness.csproj @@ -35,7 +35,6 @@ Project --configure --autoconf --rootdir ../../../.. - diff --git a/tests/xtro-sharpie/Makefile b/tests/xtro-sharpie/Makefile index 28c5f2a3ed..349cddf6b0 100644 --- a/tests/xtro-sharpie/Makefile +++ b/tests/xtro-sharpie/Makefile @@ -313,7 +313,7 @@ remove-empty-files: U2TODO = u2todo/bin/Debug/u2todo.dll $(U2TODO): $(wildcard u2todo/*.cs u2todo/*.csproj xtro-sharpie/Filter.cs) - $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build $(DOTNET_BUILD_VERBOSITY) u2todo/u2todo.csproj /bl:$@.binlog + $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build u2todo/u2todo.csproj $(DOTNET_BUILD_VERBOSITY) /bl:$@.binlog $(Q) touch $@ unclassified2todo-classic: $(U2TODO) diff --git a/tests/xtro-sharpie/xtro-sharpie/xtro-sharpie.csproj b/tests/xtro-sharpie/xtro-sharpie/xtro-sharpie.csproj index 8f78421a30..d6105ef85f 100644 --- a/tests/xtro-sharpie/xtro-sharpie/xtro-sharpie.csproj +++ b/tests/xtro-sharpie/xtro-sharpie/xtro-sharpie.csproj @@ -1,6 +1,5 @@ - Debug AnyCPU