Closed CalinZBaenen closed 2 years ago
@CalinZBaenen did you ever get an answer here? I am experiencing this issue
@DanielGlick45 Nope. That's one of the reasons I was deterred from C#.
I'm sorry you're experiencing this issue and I hope you find a solution.
Hello @CalinZBaenen - can you open this at dotnet/sdk? We can't move issues across orgs, and the team that works on the SDK doesn't have visibility into this issue here.
@baronfel
We can't move issues across orgs
"org"? As in "organization"? The context is vague.
Hello @CalinZBaenen - can you open this at dotnet/sdk?
No because I have no intention of returning to this issue.
However, if you or @DanielGlick45 would like to, as would seem obvious, feel free to.
Sorry, I meant github organizations - issues can only be moved between dotnet/runtime and dotnet/sdk, for example, not from microsoft/dotnet to dotnet/sdk. I asked mostly because I imagined you had more context or details that you might have wanted to submit. I'll try to repro this when I have time and open a corresponding issue on the SDK repo.
I imagined you had more context or details that you might have wanted to submit.
Nope. I posted what I wanted to post.
With that said, I probably should have posted more since this Issue seems somewhat vague, but I wasn't real sure what else to include or what to include based on the error.
Also, unrelated, but @baronfel, are þorn and eð readable (to you)? In the browser the latter character looks a little messy on the top due to pixelation.
I want to start switching to using them anywhere except source-code.
At my chosen font size those characters are fine, the second grapheme is a little cluttered but I also use a relatively small font.
Alright, thank you. \:)
dotnet public -r any --self-contained true
-r any
and --self-contained
don't match as options. As designed, self-contained apps can only ever be for one runtime/RID, in large part because they contain a runtime. In a counter-factual design, we could make any
download all the runtimes and all the hosts. I don't think anyone wants that.
This is the only way to use any
:
% dotnet build -r any --self-contained false -p:UseAppHost=false
% ls bin/Debug/net6.0/any
test.deps.json test.pdb
test.dll test.runtimeconfig.json
It produces an app w/no executable.
That said, it appears that it doesn't do anything useful. I added a reference to SkiaSharp
and didn't get what I thought was a useful result. I recall @vitek-karas telling me that any
doesn't do anything useful. This seems to be proving the point.
What are you trying to do?
@richlander I'm not sure what @DanielGlick45 is trying to do or if they figured it out, but originally I was foolishly trying to make an executable that'd work on any device without having to build it for each target.
Right. That's not supported. It's not a .NET thing but a computer thing. No one enables that.
.NET Framework executables on Windows are very special. That make it seem like anything works. Having supported that scenario for many years, I can report that they are indeed very special.
Right. That's not supported. It's not a .NET thing but a computer thing. No one enables that.
I was a (younger) kid, my rationale was that .NET was similar to Java's Runtime because of everything else in C# was a(n) rip-off of exact match for Java's stuff.
Sure. We support that scenario, too. It's dotnet foo.dll
. Works fine.
Sorry; huh?
Here's your "any app":
% dotnet build -o app
% dotnet app/test.dll
Hello, World!
That pattern will work on any OS with a .NET runtime installed.
Neat.
Is it fine if that's how one decides to make and distribute their program?
Yes. It is supported and various scenarios use just that. It works A-OK for console apps and web apps. It works poorly for client apps. Knock yourself out with this pattern!
Poorly for client apps because they need to be run with a command? :P /prob-obv
Right. Users except the double-click EXE experience. There are ways to work around that with scripts, but it is a pain.
When ever I do
dotnet public -r any --self-contained true
on my CSharp project. it provides the errorI tried removing
--self-contained
but the issue persisted.