Skip to content

Added DotNetBuild=true target in NativeAotTestApp project - #68679

Open
ashutoshjadhav9 wants to merge 2 commits into
dotnet:mainfrom
ashutoshjadhav9:main
Open

Added DotNetBuild=true target in NativeAotTestApp project#68679
ashutoshjadhav9 wants to merge 2 commits into
dotnet:mainfrom
ashutoshjadhav9:main

Conversation

@ashutoshjadhav9

Copy link
Copy Markdown
Contributor

Description

The Asp.Net Core build fails on linux-ppc64le with NU1101 errors for Microsoft.NETCore.App.Runtime.linux-ppc64le and Microsoft.NETCore.App.Host.linux-ppc64le in project src/Components/Testing/testassets/NativeAotTestApp/NativeAotTestApp.csproj. The issue occurs when building Asp.Net Core on linux-ppc64le with .NET SDK 11.0.100-rc.1.26413.103

As Native AOT is not supported on Power Mono Runtime, we are using /p:PublishAot=false and /p:EnableAotAnalyzer=false properties with the build command. These properties should skip the Native AOT related build steps, but the project is still being built and fails during the build.

Error as below

/root/jenkins-scripts/ci/aspnetcore/src/Components/Testing/testassets/NativeAotTestApp/NativeAotTestApp.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Runtime.linux-ppc64le. No packages exist with this id in source(s): darc-pub-dotnet-extensions-ccb356f, dotnet-eng, dotnet-public, dotnet-tools, dotnet10, dotnet10-transport, dotnet11, dotnet11-transport, dotnet8, dotnet8-transport, dotnet9, dotnet9-transport, source L3Jvb3QvYXNodXRvc2gvcG9ydC9ncnBjL2FydGlmYWN0cwo=
/root/jenkins-scripts/ci/aspnetcore/src/Components/Testing/testassets/NativeAotTestApp/NativeAotTestApp.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Host.linux-ppc64le. No packages exist with this id in source(s): darc-pub-dotnet-extensions-ccb356f, dotnet-eng, dotnet-public, dotnet-tools, dotnet10, dotnet10-transport, dotnet11, dotnet11-transport, dotnet8, dotnet8-transport, dotnet9, dotnet9-transport, source L3Jvb3QvYXNodXRvc2gvcG9ydC9ncnBjL2FydGlmYWN0cwo=

If we add $(DotNetBuild) == 'true' to the project file, the build is successful.

Similar issue: - #66383

CC @omajid @tmds

@ashutoshjadhav9
ashutoshjadhav9 requested a review from a team as a code owner August 21, 2026 08:03
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 21, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @ashutoshjadhav9. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseAspNetCoreSharedRuntime>false</UseAspNetCoreSharedRuntime>
<RuntimeIdentifier Condition="'$(DotNetBuild)' == 'true'">$(TargetRuntimeIdentifier)</RuntimeIdentifier>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please scope this to the unsupported rid

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern is used in many places without scoping:

<RuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">$(TargetRuntimeIdentifier)</RuntimeIdentifiers>

<RuntimeIdentifier Condition="'$(DotNetBuild)' == 'true'">$(TargetRuntimeIdentifier)</RuntimeIdentifier>

Can you help us understand why scoping here is required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants