Skip to content

Commit 0b462a7

Browse files
authored
Revert "Fix PublishDotnetAot target NETSDK1047 error in CI" (#54164)
2 parents ee2499a + 5ac2a3b commit 0b462a7

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

src/Layout/redist/targets/GenerateLayout.targets

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,9 @@
523523
Only runs for native builds (TargetRid == HostRid) on supported platforms.
524524
Cross-compilation is not supported as NativeAOT requires native toolchain for target platform.
525525
-->
526-
<Target Name="PublishDotnetAot"
527-
Condition="'$(TargetRid)' == '$(HostRid)' and ($(TargetRid.StartsWith('win')) or $(TargetRid.StartsWith('linux')) or $(TargetRid.StartsWith('osx')))">
526+
<!-- <Target Name="PublishDotnetAot"
527+
Condition="'$(TargetRid)' == '$(HostRid)' and ($(TargetRid.StartsWith('win')) or $(TargetRid.StartsWith('linux')) or $(TargetRid.StartsWith('osx')))"> -->
528+
<Target Name="PublishDotnetAot" Condition="false">
528529
<PropertyGroup>
529530
<!-- Define platform-specific native library naming -->
530531
<_DotnetAotNativeLibPrefix Condition="'$(OSName)' != 'win'">lib</_DotnetAotNativeLibPrefix>
@@ -538,22 +539,11 @@
538539
<_DotnetAotIntermediateDir>$(ArtifactsObjDir)dotnet-aot-redist\$(Configuration)\$(TargetRid)\</_DotnetAotIntermediateDir>
539540
</PropertyGroup>
540541

541-
<!--
542-
In CI, Arcade's centralized NuGet restore runs via NuGet.targets and does not include
543-
RuntimeIdentifier, so the assets file lacks the RID-specific target (NETSDK1047).
544-
Restore here with RuntimeIdentifiers (plural) to add the RID target to the assets file.
545-
BaseIntermediateOutputPath controls where project.assets.json is written.
546-
-->
542+
<!-- Restore and publish the dotnet-aot project as a NativeAOT shared library -->
547543
<MSBuild
548-
Targets="Restore"
544+
Targets="Restore;Publish"
549545
Projects="$(RepoRoot)/src/Cli/dotnet-aot/dotnet-aot.csproj"
550-
Properties="Configuration=$(Configuration);RuntimeIdentifiers=$(TargetRid);BaseIntermediateOutputPath=$(_DotnetAotIntermediateDir)" />
551-
552-
<!-- Publish the dotnet-aot project as a NativeAOT shared library -->
553-
<MSBuild
554-
Targets="Publish"
555-
Projects="$(RepoRoot)/src/Cli/dotnet-aot/dotnet-aot.csproj"
556-
Properties="Configuration=$(Configuration);RuntimeIdentifier=$(TargetRid);PublishDir=$(_DotnetAotPublishDir);BaseIntermediateOutputPath=$(_DotnetAotIntermediateDir)" />
546+
Properties="Configuration=$(Configuration);RuntimeIdentifier=$(TargetRid);PublishDir=$(_DotnetAotPublishDir);IntermediateOutputPath=$(_DotnetAotIntermediateDir)" />
557547

558548
<!-- Verify the native library was produced -->
559549
<Error Condition="!Exists('$(_DotnetAotPublishDir)$(_DotnetAotNativeLibName)')"

0 commit comments

Comments
 (0)