How can C# use a legacy DLL simply without registration(regsvr32)

前端 未结 5 1149
醉话见心
醉话见心 2021-01-02 14:15

Situation
I run a build system that executes many builds for many project. To avoid one build impacting another we lock down the build user to only its

5条回答
  •  囚心锁ツ
    2021-01-02 14:58

    in .NET COM is normally done thru Interop in order to register .DLL in .NET they are called Assemblies and that can be done several ways.. by adding references via VS IDE at the project level, or writing code that Loads and unloads the assembly.. by .Config file that haas the reference to the assembly as well as the using of that reference within the project... GAC.

    • If you have access to the 3rd party .DLL's you can GAC them, and reference them in your project
    • you can add a using to your .cs file header as well as add the reference to the project by right clicking on reference --> add Reference ...
    • you can also do the above step as well as set the copy local = true in the properties for that .dll.. I hope that this gives you some ideas.. keep in mind that .NET assemblies are Managed code so there are several ways to Consume those 3rd party .DLL's using other methods within C# like LoadFromAssembly ect..

提交回复
热议问题