News for hackers. Stuff that matters.
Re:Ask HN: Why is building Windows apps so complicated? by xyzzy_plugh on Sunday December 12, 2021 @09:20AM (#29529818)
The rest of the world refers to this as "static linking" and it is, in fact, trivial.
Re:Ask HN: Why is building Windows apps so complicated? by 6nf on Sunday December 12, 2021 @09:30AM (#29529889)
It's amazing that most people on this thread seems to take this nonsense as being completely normal and acceptable now. It really shows how much windows dev has devolved over the last decade.
Re:Ask HN: Why is building Windows apps so complicated? by Dayshine on Sunday December 12, 2021 @09:35AM (#29529943)
Why does every linux app I download come as a self-extracting installer, run in a container, or download dependencies? Those aren't single-file executables.
Re:Ask HN: Why is building Windows apps so complicated? by oblio on Sunday December 12, 2021 @09:37AM (#29529960)
The discussion was about Windows, which offers self contained apps and where the support matrix isn't the size of Asia.
Re:Ask HN: Why is building Windows apps so complicated? by Dayshine on Sunday December 12, 2021 @09:45AM (#29530026)
Which dotnet supports with a single compile parameter, I'm not sure why people are making it out as if this is some very complicated feature.
Re:Ask HN: Why is building Windows apps so complicated? by dmitriid on Sunday December 12, 2021 @10:03AM (#29530150)
> I'm not sure why people are making it out as if this is some very complicated feature.

OP asked how.

The answer was, quote "If you want a single-file exe (as in completely statically compiled without self-extraction) that's a bit more advanced and requires a few properties in the csproj to configure how to handle native assemblies that expect to exist on disk. If you want it to have no runtime dependencies, add `--self-contained`"

Somehow creating an exe is "more advanced", and requires changing of unspecified parameters in the project file. wat.

Re:Ask HN: Why is building Windows apps so complicated? by Dayshine on Sunday December 12, 2021 @10:07AM (#29530175)
Huh? `dotnet run` created an .exe.

I'm talking about creating a single-file application, which is just an end-user nice-to-have if you aren't using an installer or deployment system.

Don't most applications have a bunch of ancillary files? I rarely see installed applications on any platform that are a single file.

Re:Ask HN: Why is building Windows apps so complicated? by jodrellblank on Sunday December 12, 2021 @03:08PM (#29533110)
> Somehow creating an exe is "more advanced"

.NET Core is cross platform, it was created with ASP.Net as the driver and web development is not about exe files. "dotnet run" runs your code, on any platform, that's one of the default intended ways to run code. If you want a platform-specific executable you've done more work and made the code less general. If you also want to package the entire .Net framework into one binary on any platform, why is it unbelievably impossible to understand that this is more effort and desired by fewer people, so isn't as easy to do?

Re:Ask HN: Why is building Windows apps so complicated? by julik on Tuesday December 14, 2021 @08:00AM (#29551056)
It is trivial if you can embed most of the OS inside of your executable, if there can be only 1 version of the OS, if you do not use any libraries you cannot statically link and so on.