Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MichaelSimons opened this issue Sep 17, 2022 · 7 comments · Fixed by #28005
Closed

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

MichaelSimons opened this issue Sep 17, 2022 · 7 comments · Fixed by #28005
Assignees
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@MichaelSimons
Copy link
Member

MichaelSimons commented Sep 17, 2022

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.

@ghost
Copy link

ghost commented Sep 17, 2022

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged Request triage from a team member label Sep 17, 2022
@MichaelSimons
Copy link
Member Author

cc @nagilson who implemented the error check.

@am11
Copy link
Member

am11 commented Sep 17, 2022

I think this issue belongs to the SDK repo. The evaluated properties show that we have correctly assigned RuntimeIdentifiers, but implicit RID added in #26143 (which hasn't reached SDK's main branch yet) only checks RuntimeIdentifier (singular) in that error case.

@MichaelSimons MichaelSimons transferred this issue from dotnet/runtime Sep 18, 2022
@ghost ghost added the Area-NetSDK label Sep 18, 2022
@MichaelSimons
Copy link
Member Author

cc @marcpopMSFT

@nagilson
Copy link
Member

Thanks @am11, that sounds right to me. I'll take a look and fix it. Sorry to block it.

@ViktorHofer
Copy link
Member

I think this issue should be closed given that #28005 is merged?

@nagilson
Copy link
Member

Yea, thanks @ViktorHofer. It seems it doesn't cause the blow-up anymore so I'll close it out. If there are any concerns please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants