I read in this doc about the any
RID, and it's the root for all other RIDs.
So, I try to use it to target all RIDs in the command
dotnet publish -c Release -r any --self-contained true
And it throws the following error(s):
C:\Program Files (x86)\dotnet\sdk\5.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(99,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'any'. [C:\Users\Administrator\Desktop\Projects\C#\langs\Janky\language\language.csproj]
C:\Program Files (x86)\dotnet\sdk\5.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(99,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'any'. [C:\Users\Administrator\Desktop\Projects\C#\langs\Janky\language\language.csproj]
C:\Program Files (x86)\dotnet\sdk\5.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(99,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'any'. [C:\Users\Administrator\Desktop\Projects\C#\langs\Janky\language\language.csproj]
C:\Program Files (x86)\dotnet\sdk\5.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(99,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'any'. [C:\Users\Administrator\Desktop\Projects\C#\langs\Janky\language\language.csproj]
(idk why it does it 4 times.)
So, how can I use any
?
If I can't, is there any way to target all runtimes?
What is the default value of -r
? And why can't I have a self-contained application w/o specifying a runtime?
If I can't have a self contained application w/o a specified runtime (because that may be equal to any
), is there any way to get around it?
Thanks!
Cheers!
Cheers!
Top comments (6)
I don't think that you can use '-r any' with self-contained option simultaneously, because to produce a self-contained .NET app you'll need to specify an exact target platform.
I'll find the doc and link it here
any
doesn't work regardless of if it's self-contained or not.I assume this is because of the way applications actually work?
Write an issue to their repo, to have that included
Where's the repo?
And how do I write an issue (presumably) on GitHub?
Thanks!
Cheers!
github.com/microsoft/dotnet