3

I use this command

dotnet publish -c Release --force -r **win-x86** --self-contained true 

try to publish a project, while I want to publish a any cpu project, with

dotnet publish -c Release --force -r **AnyCPU** --self-contained true 
dotnet publish -c Release --force -r **win** --self-contained true 
dotnet publish -c Release --force -r **any** --self-contained true 

said the RID cannot be found.

Is there a way to publish a any cpu project for .net core(.net 5)?

Ming Tong
  • 105
  • 1
  • 8
  • First off, [this documentation](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog) gives the list of accepted RIDs. I, too, would like to know what it takes to get the same result from .NET 5.0 that I used to get from .NET Framework 4.x when I selected the "AnyCPU" build option. – DonBoitnott Mar 03 '21 at 12:52
  • Especially confusing is that new .NET 5 projects have 'AnyCPU' default for 'PlatformTarget' in project properties, given that 'AnyCPU' seems to be irrelevant for .NET 5. – Dave Doknjas Aug 18 '21 at 17:49

0 Answers0