4 ms·
I'll echo your point about confusion. I tried once to figure out how to build a simple .exe with C# and dotnet core, something I could do easily with c++ and g
by na85 7y ago
I'll echo your point about confusion. I tried once to figure out how to build a simple .exe with C# and dotnet core, something I could do easily with c++ and gcc.
I gave up after a few days because the dotnet documentation was too confusing. There are 40 different projects with easily-confused names like corefx, coreclr, etc, and the docs are convoluted and split between developer.microsoft.com and msdn.
That was a while ago, so maybe the docs are better now but I can't shake the feeling that when your best source of info on official stuff like "how to build a self-contained application" is a 2-year old obsolete Stack Overflow post, .NET Core is just a mess.
- AdrianB1 7y agoSame experience here. I wrote some C# Windows apps a few years ago, I jumped to write a REST API and the experience was painful: the documentation is confusing, the REST API projects are even more confusing, I got what I wanted but it felt like a big accomplishment to go through the complexities. By comparison I wrote that API in PHP in a couple of hours - it had more code, but my team mates were able to understand easily how it worked. I am not saying PHP is better, I am saying it is much easier to use and there are probably more examples out there of simplicity.
- manigandham 7y agoYou don't need to know about any of those projects to build an app in C# so you may have started from a bad source. Documentation is much better now and all located at https://docs.microsoft.com/en-us/dotnet/ https://docs.microsoft.com/en-us/dotnet/ with github-integrated editing and comments. Self-contained apps package the runtime with your app so there are no dependencies but having an executable is a separate option and requires the ID of the platform you're targeting. The 3.0 SDK makes it much easier. https://docs.microsoft.com/en-us/dotnet/core/deploying/ https://docs.microsoft.com/en-us/dotnet/core/deploying/
- lukevp 7y agoWhat is your definition of "self-contained"? Does not require dotnet, or is contained within a single executable? Building an application that doesn't require a dotnet core runtime is a one-liner: dotnet publish -c Release -r win10-x64 --self-contained true https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli https://docs.microsoft.com/en-us/dotnet/core/deploying/deplo... If you mean creating a single EXE with no external dependencies whatsoever, that's something that they are discussing in .NET Core 3 but isn't straightforward right now. It's basically the same story as Python, you have to bundle the interpreter with the application or you have to rely on the interpreter being pre-installed. With dotnet, you rely on the runtime being installed or you bundle it in as self-contained.