Skip to content

Unable to update runtime ids using runtimeGroups.props #57702

Closed

Description

@omajid

Description

I am trying to add new Runtime IDs.

Following the advice in https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/readme.md#adding-a-new-os, I tried modifying runtimeGroups.props and rebuilding runtime with the new parameter. It doesn't work anymore:

$ git diff                                                                                                                                                                                               
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                            
index 57b19a9a4ca..58b93131016 100644                                                                                                                                                                                                         
--- a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                                                                                                       
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                                                                                                       
@@ -72,7 +72,7 @@                                                                                                                                                                                                                             
     <RuntimeGroup Include="fedora">                                                                                                                                                                                                          
       <Parent>linux</Parent>                                                                                                                                                                                                                 
       <Architectures>x64;arm64</Architectures>                                                                                                                                                                                               
-      <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>                                                                                                                                                                            
+      <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35;36</Versions>                                                                                                                                                                         
       <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>                                                                                                                                                                           
     </RuntimeGroup>                                                                                                                                                                                                                          
                                                                                                                                                                                                                                              
$ ./build.sh /p:UpdateRuntimeFiles=true                                                                                                                                                                
__DistroRid: linux-x64                                                                                                                                                                                                                        
  Determining projects to restore...                                                                                                                                                                                                          
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet                                                                                                                                                        
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator                                                                                                                                
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.21404.1') was restored. Available commands: xharness                                                                                                                        
  Tool 'microsoft.visualstudio.slngen.tool' (version '6.1.0') was restored. Available commands: slngen                                                       
....
....
  Microsoft.NETCore.DotNetHostPolicy -> /home/omajid/devel/dotnet/runtime/artifacts/packages/Debug/Shipping/Microsoft.NETCore.DotNetHostPolicy.7.0.0-dev.nupkg                                                                                
  Microsoft.NETCore.DotNetAppHost -> /home/omajid/devel/dotnet/runtime/artifacts/packages/Debug/Shipping/Microsoft.NETCore.DotNetAppHost.7.0.0-dev.nupkg                                                                                      
  Microsoft.NETCore.DotNetAppHost -> /home/omajid/devel/dotnet/runtime/artifacts/packages/Debug/Shipping/runtime.linux-x64.Microsoft.NETCore.DotNetAppHost.7.0.0-dev.nupkg                                                                    
                                                                                                                                                                                                                                              
Build succeeded.                                                                                                                                                                                                                              
    0 Warning(s)                                                                                                                                                                                                                              
    0 Error(s)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                              
Time Elapsed 00:06:32.54                                                                                                                                                                                                                      
$ git diff                                                                                                                                                                                               
diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                            
index 57b19a9a4ca..58b93131016 100644                                                                                                                                                                                                         
--- a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                                                                                                       
+++ b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props                                                                                                                                                                       
@@ -72,7 +72,7 @@                                                                                                                                                                                                                             
     <RuntimeGroup Include="fedora">                                                                                                                                                                                                          
       <Parent>linux</Parent>                                                                                                                                                                                                                 
       <Architectures>x64;arm64</Architectures>                                                                                                                                                                                               
-      <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>                                                                                                                                                                            
+      <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35;36</Versions>                                                                                                                                                                         
       <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>                                                                                                                                                                           
     </RuntimeGroup>                                                                                                                                                                                                                          
                                                                                                                              

Using build/msbuild in the Microsoft.NETCore.Platforms/src/ doesn't work either:

$ ../../../../.dotnet/dotnet msbuild /p:UpdateRuntimeFiles=true                                                                                                                                            
Microsoft (R) Build Engine version 17.0.0-preview-21411-04+6ca861613 for .NET                                                                                                                                                                 
Copyright (C) Microsoft Corporation. All rights reserved.                                                                                                                                                                                     
                                                                                                                                                                                                                                              
/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj : error MSB4236: The SDK 'Microsoft.NET.SDK' specified could not be found.                                                 
$ ../../../../.dotnet/dotnet build /p:UpdateRuntimeFiles=true                                                                                                                                                
Microsoft (R) Build Engine version 17.0.0-preview-21411-04+6ca861613 for .NET                                                                                                                                                                 
Copyright (C) Microsoft Corporation. All rights reserved.                                                                                                                                                                                     
                                                                                                                                                                                                                                              
/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj : error MSB4236: The SDK 'Microsoft.NET.SDK' specified could not be found.                                                 
                                                                                                                                                                                                                                              
Build FAILED.                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                              
/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj : error MSB4236: The SDK 'Microsoft.NET.SDK' specified could not be found.                                                 
    0 Warning(s)                                                                                                                                                                                                                              
    1 Error(s)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                              
Time Elapsed 00:00:00.19                                                                                                                                                                                                                      
$ cd ..                                                                                                                                                                                                    
$ ls                                                                                                                                                                                 
Microsoft.NETCore.Platforms.sln  readme.md  src  tests                                                                                                                                                                                        
$ ../../../.dotnet/dotnet build /p:UpdateRuntimeFiles=true                                                                                                                           
Microsoft (R) Build Engine version 17.0.0-preview-21411-04+6ca861613 for .NET                                                                                                                                                                 
Copyright (C) Microsoft Corporation. All rights reserved.                                                                                                                                                                                     
                                                                                                                                                                                                                                              
  Determining projects to restore...                                                                                                                                                                                                          
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error : The project file could not be loaded. Could not find a part of the path '/home/omajid/devel/dotnet/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime/ref/System.Runtime.csproj'.  /home/omajid/devel/dotnet/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime/ref/System.Runtime.csproj [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]                                                                                                                                                              
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(Boolean condition, String errorSubCategoryResourceName, BuildEventFileInfo projectFile, Exception innerException, String resourceName, Object[] args) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]                         
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectFileErrorUtilities.ThrowInvalidProjectFile(BuildEventFileInfo projectFile, Exception innerException, String resourceName, Object[] args) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]                                                                                       
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Construction.ProjectRootElement.LoadDocument(String fullPath, Boolean preserveFormatting, Boolean loadAsReadOnly) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]                                                                                                                            
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Construction.ProjectRootElement..ctor(String path, ProjectRootElementCacheBase projectRootElementCache, Boolean preserveFormatting) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Construction.ProjectRootElement.CreateProjectFromPath(String projectFile, ProjectRootElementCacheBase projectRootElementCache, Boolean preserveFormatting) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Construction.ProjectRootElement.<>c.<OpenProjectOrSolution>b__208_0(String path, ProjectRootElementCacheBase cache) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.ProjectRootElementCache.Get(String projectFile, OpenProjectRootElement openProjectRootElement, Boolean isExplicitlyLoaded, Nullable`1 preserveFormatting) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Construction.ProjectRootElement.OpenProjectOrSolution(String fullPath, IDictionary`2 globalProperties, String toolsVersion, ProjectRootElementCacheBase projectRootElementCache, Boolean isExplicitlyLoaded) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl..ctor(Project owner, String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]
/home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options) [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]

Configuration

  • Which version of .NET is the code running on? This was dotnet/runtime (without any local installation of .NET) as of 2021-08-18.
  • What OS and version, and what distro if applicable? Fedora 34
  • What is the architecture (x64, x86, ARM, ARM64)? x64
  • Do you know whether it is specific to that configuration? No

Regression?

Yes, this is working in release/5.0.

Other information

Activity

  1. ghost added
    untriaged
    on Aug 18, 2021
  2. ViktorHofer commented on Aug 19, 2021

    @ViktorHofer
    Member

    /home/omajid/devel/dotnet/runtime/.dotnet/sdk/6.0.100-rc.1.21411.28/NuGet.RestoreEx.targets(19,5): error : The project file could not be loaded. Could not find a part of the path '/home/omajid/devel/dotnet/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime/ref/System.Runtime.csproj'. /home/omajid/devel/dotnet/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime/ref/System.Runtime.csproj [/home/omajid/devel/dotnet/runtime/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln]

    That sln seems broken: /home/omajid/devel/dotnet/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime/ref/System.Runtime.csproj. I can't see any issues with the Microsoft.NETCore.Platforms.sln checked in though.

    Using build/msbuild in the Microsoft.NETCore.Platforms/src/ doesn't work either:

    That's weird. Let me try reproing it on my Ubuntu vm.

  3. ghost added
    in-pr
    on Aug 19, 2021
  4. ViktorHofer commented on Aug 19, 2021

    @ViktorHofer
    Member

    Found the issue: #57739.

  5. ghost removed
    in-pr
    on Aug 19, 2021
  6. ghost locked as resolved and limited conversation to collaborators on Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructureuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions