regasm

How to register a DLL with RegAsm in Build EventS VS2013

天涯浪子 提交于 2021-02-10 08:43:52
问题 In every compile, output dll is changed in my program and after every compile, I must register dll again. I can register it via Visual Studio Command Prompt as regasm mydll.dll. But I dont want to do it everytime and I want it as automatically. After some research, I have detected that it is possible with Visual Studio from Build Events (project>properties). But I have never used Build Events before and I really cannot understand how it will be. Should I write my dll path to pre-build event

How to register a DLL with RegAsm in Build EventS VS2013

五迷三道 提交于 2021-02-10 08:43:11
问题 In every compile, output dll is changed in my program and after every compile, I must register dll again. I can register it via Visual Studio Command Prompt as regasm mydll.dll. But I dont want to do it everytime and I want it as automatically. After some research, I have detected that it is possible with Visual Studio from Build Events (project>properties). But I have never used Build Events before and I really cannot understand how it will be. Should I write my dll path to pre-build event

How to find regasm location on a machine

微笑、不失礼 提交于 2020-01-25 00:39:27
问题 I am creating an installer that registers .NET assemblies to COM using regasm. Different clients will have different Microsoft.Net versions installed on their machines. I need to know the regasm location in advance to use it. Should I look for it only in the following locations or is there any other possible location too? C:\Windows\Microsoft.NET\Framework\v2.0.50727\ C:\Windows\Microsoft.NET\Framework\v1.0.xxx\ C:\Windows\Microsoft.NET\Framework\v4.0.xxxx\ Could it instead be present in the

What is the best practise for making a COM server with a GUI?

本秂侑毒 提交于 2020-01-07 05:52:26
问题 Context : I'm working with some old robotics software which is able to get information from a COM object if it implements some predefined interfaces. Since this old software runs on Windows 2000, I want to use DCOM to (try to) avoid having to compile something for Windows 2000. (I am aware that the program that has to be called probably needs to work, or at least exist, on the Windows 2000 computer as well) The other computer will be called through DCOM and will process an image using a

regasm /codebase works but file generated with regasm /codebase /regfile does not

喜夏-厌秋 提交于 2020-01-05 07:37:07
问题 I have a COM visible dll suitable for 32 and 64 bit architechtures that I use to add a menu item to the windows explorer context menu. Using "regasm myassembly.dll /codebase" I register the dll and see the new menu item. Great. Unregistering works fine also. Now I want to create a .reg file so I can add the menu item to non development machines. I use "regasm myassembly.dll /codebase /regfile" that produces a reg file that I can import with regedit. The problem is, after importing the .reg, I

How to Register a Type Library without RegAsm.exe

房东的猫 提交于 2020-01-03 15:16:18
问题 I want to know if it's possible to register a type library without using the RegAsm tool. Here is my situation, which will hopefully explain why I want to do this: I'm developing an assembly in .NET that will provide some modern functionality for our older VB6 applications. I have successfully registered the assembly and the type library on my development machine using RegAsm like so: regasm.exe MyAssembly.dll /tlb /codebase The above command generates the type library (MyAssembly.tlb) and

c# excel dll - can't add a reference to the specified file - regasm

点点圈 提交于 2019-12-30 12:38:07
问题 When deploying and registering a .Net Excel.dll on another computer, I get an error Can't add a reference to the specified file when attempting to add reference to DLL in VBA editor. I have created the Excel.dll in C# in Visual Studio that runs fine on my machine with Windows 7 and Office 2010 . No problem adding reference to the dll in Excel VBA editor on my computer. My problem is deploying on another machine which is running Vista and Excel 2007 . I copied dll to this computer and used

Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL

六月ゝ 毕业季﹏ 提交于 2019-12-28 01:55:39
问题 I've created a .NET assembly for COM interop and it is working well on my development machine. I'm currently trying to figure out how to deploy the DLL to a target machine using Visual Studio's "Setup Project." How can I use the VIsual Studio setup project to do the following things: Register the assembly (currently using regasm ). The assembly needs to be registered successfully and the type library (.tlb) needs to be registered successfully . This answer suggests scrapping regasm in favor

How Does a COM Program Locate a .NET DLL Registered for COM Interop?

我的未来我决定 提交于 2019-12-23 07:57:21
问题 One customer wants to consume our .NET DLLs from VB6. They are designed to support reverse interop and all works fine... except: There are two separate VB6 programs in two different directories. It seems it's necessary to do one of: Copy the .NET DLL into both directories, or Install the .NET DLL in the GAC This is the customer's observation and also supported by the RegAsm documentation: After registering an assembly using Regasm.exe, you can install it in the global assembly cache so that

Regasm BHO from C# Code

橙三吉。 提交于 2019-12-23 05:36:10
问题 I have DLL With BHO IE Plugin. And I use " regasm.exe /codebase myBHO.dll " to register my dll. Is there any C# code to regasm my DLL in windows application? 回答1: Create a dedicated installer for this. For quick debugging cycles from Visual Studio, setup some Build Events like so: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\gacutil.exe" /f /i $(TargetDir)$(TargetFileName) "%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" /unregister $(TargetDir)$