Skip to content

NETSDK1191 error when building crossgen2.csproj with RC2 SDK #27985

Closed
@MichaelSimons

Description

@MichaelSimons

This issue was encountered with source-build. In source-build, you must be able to take the SDK from a source-build and use it to rebuild the source. It was during this process the following build error was surfaced while prepping for RC2.

  /repos/rc2-artifacts/dotnet/sdk/7.0.100-rc.2.22466.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(169,5): error NETSDK1191: A runtime identifier for the property 'PublishReadyToRun' couldn't be inferred. Specify a rid explicitly. [/repos/tarball-boot/src/runtime/artifacts/source-build/self/src/src/coreclr/tools/aot/crossgen2/crossgen2.csproj]

The error check appears to be new to the RC2 sdk as I don't find it in the RC1 sdk - 1fe65d2#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2

From /repos/runtime/.dotnet/sdk/7.0.100-rc.2.22466.18/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets

    <NETSdkError Condition="'$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifier)' == ''"
                 ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
                 FormatArguments="PublishReadyToRun"/>

Here is a binlog from a source-build.
runtime.boot.sourcebuild.zip

Failing source-build CI - Microsoft internal link - https://dev.azure.com/dnceng/internal/_build/results?buildId=1996153&view=logs&j=05a957c8-6537-5d6d-69e3-d72786d35c31&t=8f2f8c4f-4a49-5a74-0521-8049d6bde132

This is a blocker for rc2.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions