Home > Mobile >  Why dotNET is creating a DLL for WinForms?
Why dotNET is creating a DLL for WinForms?

Time:01-23

I'm migrating from .NET Framework to .NET (Core).

I've just realized that .NET Core applications created by VS2022 always have a DLL:

enter image description here

And if I examine my EXE's details:

enter image description here

Why is the original filename set to the DLL? Can I change it to WinFormsApp2.exe?

With .NET Framework, no DLL was generated, and original filename was always set to the current EXE file. Can I reach this with .NET (Core) too?

CodePudding user response:

.net core applications are cross-platforms which is why DLL is generated as part of the build process. DLL contains the compiled so you can run the app on platform which have .net core runtime.

you can change the setting in visual studio for a different DLL name.

on the other hand,.net framework applications are built as single executable file (EXE) that contains all the application's code and dependencies which is to be run only on windows OS.

CodePudding user response:

It is normal to have .dll extension file because it is library which contains your code and allows to run program for multiple time in windows.

  • Related