Skip to content
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

how to fix the error? dotnet 3.1 RID #2095

Closed
blackcross86 opened this issue Mar 18, 2021 · 8 comments
Closed

how to fix the error? dotnet 3.1 RID #2095

blackcross86 opened this issue Mar 18, 2021 · 8 comments

Comments

@blackcross86
Copy link

2021-03-18_03-30

NAME="ROSA Desktop Fresh R12"
VERSION="2019.1 (EE 2019.1 Desktop)"
ID="rosa"
VERSION_ID="2019.1"
BUILD_ID="20201213.21"
PRETTY_NAME="ROSA Desktop Fresh R12 2019.1 (EE 2019.1 Desktop)"
VERSION_CODENAME="(EE 2019.1 Desktop)"
ANSI_COLOR="1;43"
CPE_NAME="cpe:/o:rosa:rosalinux:2019.1"
HOME_URL="http://www.rosalinux.com//"
BUG_REPORT_URL="https://bugs.rosalinux.ru/"
SUPPORT_URL="https://forum.rosalinux.ru/"
PRIVACY_POLICY_URL="https://www.rosalinux.ru/products/rosa-fresh/"

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.112
 Commit:    cd75074bf4

Runtime Environment:
 OS Name:     rosa
 OS Version:  2019.1
 OS Platform: Linux
 RID:         rosa.2019.1-x64
 Base Path:   /usr/lib64/dotnet/sdk/3.1.112/

Host (useful for support):
  Version: 3.1.12
  Commit:  899abf95fa

.NET Core SDKs installed:
  3.1.112 [/usr/lib64/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.12 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.12 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

@dotnet-issue-labeler
Copy link

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.

@omajid
Copy link
Member

omajid commented Mar 18, 2021

I generally see this error from roslyn when the SDK that's being used to build roslyn doesn't have the runtime id (RID) in it's RID graph.

This rosa.2019.1-x64 RID is probably missing from the RuntimeIdentifierGraph.json file under /usr/lib64/dotnet/sdk/3.1.112/ and/or from Microsoft.NETCore.Platforms/runtime.json in the source repositories.

I generally have to use a patch like https://src.fedoraproject.org/rpms/dotnet5.0/blob/a36231563c01b8257a7a703e8505519b8773e895/f/runtime-48203-fedora-35-rid.patch to add new RIDs in the correct place in the RID graph.

@omajid
Copy link
Member

omajid commented Mar 18, 2021

The general issue here is also captured by #297

@blackcross86
Copy link
Author

2021-03-19_03-29

I generally have to use a patch like https://src.fedoraproject.org/rpms/dotnet5.0/blob/a36231563c01b8257a7a703e8505519b8773e895/f/runtime-48203-fedora-35-rid.patch to add new RIDs in the correct place in the RID graph.

error again. what is it

--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props	2021-02-27 22:01:04.000000000 +0300
+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props	2021-03-19 02:42:51.689038577 +0300
@@ -125,6 +125,13 @@
       <Versions>9</Versions>
     </RuntimeGroup>

+    <RuntimeGroup Include="rosa">
+      <Parent>linux</Parent>
+      <Architectures>x64;arm64</Architectures>
+      <Versions>2019.1;2019.05</Versions>
+      <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+    </RuntimeGroup>
+
     <RuntimeGroup Include="sles">
       <Parent>linux</Parent>
       <Architectures>x64</Architectures>

@omajid
Copy link
Member

omajid commented Mar 19, 2021

runtimeGroups.props is used to generate the runtime.json and runtime.compatiblity.json files. The build is complaining that you have updated the props file but not the json files. The files being inconsistent is generally a mistake.

This readme describes the workflow for updaitng the json file. Basically, you do a one-time build with /p:UpdateRuntimeFiles=true to automatically update the json files from the props file, and then commit the result.

The way I generally do this is by grabbing the release/3.1 branch from the https://github.com/dotnet/corefx repo, updating the runtimeGroups.props file in there, and building with /p:UpdateRuntimeFiles=true:

./build.sh /p:UpdateRuntimeFiles=true

Then I get a patch that updates all three files, like along the lines of https://src.fedoraproject.org/rpms/dotnet5.0/blob/a36231563c01b8257a7a703e8505519b8773e895/f/runtime-48203-fedora-35-rid.patch. I then apply that when building source-build 3.1.

@blackcross86
Copy link
Author

runtimeGroups.props is used to generate the runtime.json and runtime.compatiblity.json files. The build is complaining that you have updated the props file but not the json files. The files being inconsistent is generally a mistake.

This readme describes the workflow for updaitng the json file. Basically, you do a one-time build with /p:UpdateRuntimeFiles=true to automatically update the json files from the props file, and then commit the result.

The way I generally do this is by grabbing the release/3.1 branch from the https://github.com/dotnet/corefx repo, updating the runtimeGroups.props file in there, and building with /p:UpdateRuntimeFiles=true:

./build.sh /p:UpdateRuntimeFiles=true

Then I get a patch that updates all three files, like along the lines of https://src.fedoraproject.org/rpms/dotnet5.0/blob/a36231563c01b8257a7a703e8505519b8773e895/f/runtime-48203-fedora-35-rid.patch. I then apply that when building source-build 3.1.

thanks a lot, helped

@omajid
Copy link
Member

omajid commented Mar 19, 2021

@crummel @dseefeld @MichaelSimons is there any documentation for updating RIDs for source-build? Would it be useful to have? I can take the notes from above and write up some new docs..

@crummel
Copy link
Contributor

crummel commented Mar 19, 2021

I don't think there is, it would be great if you want to write something up. I could also use something like that in my proposal for NuGet/Home#5862.

omajid added a commit to omajid/dotnet-source-build that referenced this issue Mar 22, 2021
Anyone else adding their Linux distribution's RID to source-build
might find this useful.

I am trying to get this out of my head and into a shape where others
can make use of this.

See: dotnet#2095
omajid added a commit to omajid/dotnet-source-build that referenced this issue Mar 22, 2021
Anyone else adding their Linux distribution's RID to source-build
might find this useful.

I am trying to get this out of my head and into a shape where others
can make use of this.

See: dotnet#2095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants