regasm

Using a .NET-2.0-targeted COM DLL in the GAC on a .NET-4-only system

烈酒焚心 提交于 2019-12-12 12:08:10
问题 Greetings again, Following up my previous question, I'm trying to maximize the compatibility of my C#-written Windows Explorer extension. In particular, I'm interested in making sure it works in an environment in which .NET 4 is installed and .NET 3.5 and below are not installed. One would think there's no problem, but apparently it's not so simple... There are two problems. First, non-.NET-4-targeted assemblies flat out will not load with CLR 4 unless they have a .config file that specifies

Easiest way to make .NET DLL visible to COM?

喜你入骨 提交于 2019-12-11 11:01:27
问题 I have a proprietary .NET DLL which I would like to use in a COM client. Currently when I use regasm it says: warning RA0000 : No types were registered Since I don't have the source code I can't set the classes to ComVisible or whatever else is required. How can I easily make this DLL visible to COM ? 回答1: You need to write a "COM callable wrapper". Here are a few links: http://msdn.microsoft.com/en-us/library/ms973802.aspx http://msdn.microsoft.com/en-us/library/f07c8z1c.aspx http://edn

RegAsm dll .net2.0 to .net4.0

﹥>﹥吖頭↗ 提交于 2019-12-11 08:19:09
问题 I have a dll that registers fine using .Net2.0's regasm, but when attempting to register with a .NET4.0 regasm, I get the error "Could not load file or assembly ' FILENAMEHERE ' or one of it's dependencies. Operation is not supported. (Exception from HRESULT: 0x8013515 Code and assembly are below STARTelnet.cs /** *Steven T. Norris Created: 3/27/2012 *Last Updated By: Steven T. Norris Last Updated On: 3/27/2012 * */ using System; using MinimalisticTelnet; using System.Net.Sockets; /** *

Registering a generated VB.Net DLL assembly programmatically without locking the DLL

若如初见. 提交于 2019-12-11 04:46:53
问题 I've got a simple VB.Net 4 WinForms application that does basic code generation. The code generation creates a DLL assembly perfectly fine, but each time the DLL is generated it needs to be registered programmatically with the GAC. The reason it must be registered is that it is a COM object that when deployed gets called via CreateObject from a VB6 application. Eww, I know. All of this works fine: the DLL generation, registering programmatically and using the generated DLL from the VB6

How does .NET/COM work with multiple versions registered via Regasm?

大城市里の小女人 提交于 2019-12-10 03:56:09
问题 I have a .NET DLL (that happens to be written in C++/CLI). Parts of it I want to expose via COM. I do this and register it using "regasm my.dll /codebase". So far so good. But then I change some things and the version number of the assembly changes plus I move the dll to a different folder. I register it again and look at my COM object in OLE/COM Viewer. I see something like this InprocServer32 [Codebase] = file://c://foo/bar/my.dll 7.0.0.0 [Class] = My.Blah.Class 7.0.0.0 [Assembly] = Sync,

Regasm and Com Interop false negatives

杀马特。学长 韩版系。学妹 提交于 2019-12-08 07:00:51
问题 I'm attempting to expose our library via COM but seem to be fighting the tools more than the actual problem. Regardless of how I write my COM exposed class I get the warning: "XXX.dll does not contain any types that can be registered for COM interop" (marked project as Register for COM interop in the project properties). Even the simple class below (as the only class in an assembly that is signed and marked with ComVisible(false)) still warning persists: [Guid("77699130-7D58-4d29-BE18

.NET Core 2.1 - How to create COM object and generate *.tlb file

霸气de小男生 提交于 2019-12-07 06:12:04
问题 I would like to build COM object in .net Core and then register by RegAsm. My .csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>netcoreapp2.1;net4.7.2</TargetFrameworks> <RuntimeIdentifier>win7-x64</RuntimeIdentifier> <Platforms>x64</Platforms> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> </Project> My program.cs: using System; using System.Runtime.InteropServices; namespace ComExample { [Guid("7ce1e40f-760a

RegAsm dll no types registered

心已入冬 提交于 2019-12-05 11:22:38
I am attempting to register a .dll using RegAsm. It is a .NET 2.0 dll. All classes are public and ComVisible is true. I am still getting the RA0000 : No types were registered error. Below is the code and assemblyinfo. Any help would be great, thanks! STARTelnet.cs /** *Steven T. Norris Created: 3/27/2012 *Last Updated By: Steven T. Norris Last Updated On: 3/27/2012 * */ using System; using MinimalisticTelnet; using System.Net.Sockets; /** * @brief Used to connect to, read, and respond to a STAR terminal session. * * Steven T. Norris Created: 3/27/2012 */ namespace STARTelnet { /** * Class used

.NET Core 2.1 - How to create COM object and generate *.tlb file

强颜欢笑 提交于 2019-12-05 10:51:28
I would like to build COM object in .net Core and then register by RegAsm. My .csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>netcoreapp2.1;net4.7.2</TargetFrameworks> <RuntimeIdentifier>win7-x64</RuntimeIdentifier> <Platforms>x64</Platforms> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> </Project> My program.cs: using System; using System.Runtime.InteropServices; namespace ComExample { [Guid("7ce1e40f-760a-4d81-b70b-61108ed15cb4")] [ComVisible(true)] public interface IComExampleClass { IComModelClass

What does RegAsm really do? Where are files copied?

强颜欢笑 提交于 2019-12-05 05:37:13
We have a plugin for IE based on spicIE, the purpose is to connect to some external devices. To connect to those external devices, another company developed their token & DLLs. We need to have some ActiveX's and DLL's to do authentication by token. The problem is that the plugin we developed for IE, in final part have a install.bat file, that runs a RegAsm and registers the DLL and after that plugin (or its changes) is viewable in IE. When running the plugin from IE, our code can not find some DLL, required for authentication (name it x.dll). Where is registered DLL copied? Is it really copied