Install Dll in GAC for .Net

I am new to .Net development. I need to ask about .Net winform deployment. If I have 1 exe file, some class libraries and third-party components (DevExpress). Should I install these DLLs (class library and third-party component) in the GAC (global assembly cache) on client computers? Thanks for the explanation.

+3
source share
4 answers

IMO, you should avoid installing these libraries in the GAC. By avoiding the use of the GAC, you will greatly simplify the installation process. In fact, it can be so simple that you can simply copy a bit from one computer to another to complete the installation (although you may have other installation restrictions that could prevent this).

When you link to a third-party library, you can click the link in Visual Studio and set the Copy Localvalue to the parameter true. This will copy the library to the bin folder. Third-party libraries are usually installed on the developer's computer in the GAC, but for deployment you want the system to copy the library to the bin folder.

+2
source

, Installer Pakage.

Windows Visual Studio.NET

#

0

, :

GAC?

( ) , .

0

GAC Global Assembly Cache .dll .net assemblies 'exe' 'dll'. , - , / , , GAC , , - Newtonsoft.Json

But since this is a Windows Form application, when you finish a project, you have to pack / deploy it somewhere or transfer it to someone. At the same time, you cannot ask them to install some dllsin GACexcept in the above example Newtonsoft.Jsonyou make Newtonsoft.Jsonavailable for other .Net projects.

Think about why you want to do this instead of thinking about your own application?

0
source

Source: https://habr.com/ru/post/1741385/


All Articles