4 ms·
Embedding native assemblies inside another application is apparently very hard. I'm not sure I know any frameworks that easily support arbitrary native .dll/.s
by Dayshine 5y ago
Embedding native assemblies inside another application is apparently very hard.
I'm not sure I know any frameworks that easily support arbitrary native .dll/.so inside the application executable.
- oblio 5y agohttps://www.joelonsoftware.com/2004/01/28/please-sir-may-i-have-a-linker/ https://www.joelonsoftware.com/2004/01/28/please-sir-may-i-h... Strategic decision from Sun and Microsoft that has crippled software for 2 decades already.
- xyzzy_plugh 5y agoThe rest of the world refers to this as "static linking" and it is, in fact, trivial.
- julik 5y agoIt 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.
- 6nf 5y agoIt'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.
- Dayshine 5y agoWhy 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.
- oblio 5y agoThe discussion was about Windows, which offers self contained apps and where the support matrix isn't the size of Asia.
- Dayshine 5y agoWhich 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.
- dmitriid 5y ago> 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.
- Dayshine 5y agoHuh? `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.
- jodrellblank 5y ago> 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?