diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs b/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs
index e35ead24aece..e7a36b556429 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs
@@ -23,7 +23,6 @@ public class RunReadyToRunCompiler : ToolTask
public bool ShowCompilerWarnings { get; set; }
public bool UseCrossgen2 { get; set; }
public string Crossgen2ExtraCommandLineArgs { get; set; }
- public string Crossgen2CompositeExtraCommandLineArgs { get; set; }
public ITaskItem[] Crossgen2PgoFiles { get; set; }
public string Crossgen2ContainerFormat { get; set; }
@@ -363,17 +362,6 @@ private string GenerateCrossgen2ResponseFile()
}
}
- // Arguments that are only valid for full composite builds (e.g. --strip-il-bodies).
- // These arguments will not be applied to any assemblies that have been excluded from the composite image.
- if (_createCompositeImage && !_partialCompile
- && !string.IsNullOrEmpty(Crossgen2CompositeExtraCommandLineArgs))
- {
- foreach (string extraArg in Crossgen2CompositeExtraCommandLineArgs.Split([';'], StringSplitOptions.RemoveEmptyEntries))
- {
- result.AppendLine(extraArg);
- }
- }
-
if (_partialCompile)
{
result.AppendLine("--partial");
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
index a216e8010ea8..8e39f25b7cd1 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
@@ -46,12 +46,6 @@ Copyright (c) .NET Foundation. All rights reserved.
$(PublishReadyToRunCrossgen2ExtraArgs);--strip-debug-info
$(PublishReadyToRunCrossgen2ExtraArgs);--strip-debug-info
$(PublishReadyToRunCrossgen2ExtraArgs);--strip-debug-info
-
- $(PublishReadyToRunCrossgen2CompositeExtraArgs);--strip-il-bodies
- $(PublishReadyToRunCrossgen2CompositeExtraArgs);--strip-il-bodies
- $(PublishReadyToRunCrossgen2CompositeExtraArgs);--strip-il-bodies
- $(PublishReadyToRunCrossgen2CompositeExtraArgs);--strip-il-bodies
- $(PublishReadyToRunCrossgen2CompositeExtraArgs);--strip-il-bodies
@@ -511,7 +505,6 @@ Copyright (c) .NET Foundation. All rights reserved.
Crossgen2PgoFiles="@(_ReadyToRunPgoFiles)"
Crossgen2ContainerFormat="$(PublishReadyToRunContainerFormat)"
Crossgen2ExtraCommandLineArgs="$(PublishReadyToRunCrossgen2ExtraArgs)"
- Crossgen2CompositeExtraCommandLineArgs="$(PublishReadyToRunCrossgen2CompositeExtraArgs)"
ImplementationAssemblyReferences="@(_ReadyToRunAssembliesToReference)"
ShowCompilerWarnings="$(PublishReadyToRunShowWarnings)"
CompilationEntry="@(_ReadyToRunCompileList)"
diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
index a6c259b66678..1d746853b00e 100644
--- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
+++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACppCliNonLibraryProject.cs
@@ -13,7 +13,7 @@ public GivenThatWeWantToBuildACppCliNonLibraryProject(ITestOutputHelper log) : b
{
}
- [FullMSBuildOnlyFact]
+ [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/54145")]
public void Given_an_exe_project_It_should_fail_with_error_message()
{
var testAsset = TestAssetsManager
@@ -27,7 +27,7 @@ public void Given_an_exe_project_It_should_fail_with_error_message()
.And.HaveStdOutContaining(Strings.NoSupportCppNonDynamicLibraryDotnetCore);
}
- [FullMSBuildOnlyFact]
+ [FullMSBuildOnlyFact(Skip = "https://github.com/dotnet/sdk/issues/54145")]
public void Given_an_StaticLibrary_project_It_should_fail_with_error_message()
{
var testAsset = TestAssetsManager
diff --git a/test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.cs b/test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.cs
index 56db0c6c50e8..75f6a2e82d48 100644
--- a/test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.cs
+++ b/test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.cs
@@ -572,6 +572,7 @@ public static class Greeter
}
""");
+ // Duplicate #:ref directives are allowed (MSBuild can handle that).
File.WriteAllText(filePath, """
#:ref lib.cs
#:ref lib.cs
@@ -581,8 +582,8 @@ public static class Greeter
new DotnetCommand(Log, "run", relativeFilePath)
.WithWorkingDirectory(testInstance.Path)
.Execute()
- .Should().Fail()
- .And.HaveStdErrContaining(DirectiveError(filePath, 2, FileBasedProgramsResources.DuplicateDirective, "#:ref lib.cs"));
+ .Should().Pass()
+ .And.HaveStdOut("Hello!");
File.WriteAllText(filePath, """
#:ref lib.cs
@@ -590,7 +591,6 @@ public static class Greeter
Console.WriteLine(MyLib.Greeter.Greet());
""");
- // https://github.com/dotnet/sdk/issues/51139: we should detect the duplicate ref
new DotnetCommand(Log, "run", relativeFilePath)
.WithWorkingDirectory(testInstance.Path)
.Execute()
@@ -603,7 +603,6 @@ public static class Greeter
Console.WriteLine(MyLib.Greeter.Greet());
""");
- // https://github.com/dotnet/sdk/issues/51139: we should detect the duplicate ref
new DotnetCommand(Log, "run", relativeFilePath)
.WithWorkingDirectory(testInstance.Path)
.Execute()