RegAsm .net 4 Error, Could not load itself?

1

i just cant register some dll files that has been built with .net framework 4 in some systems that both client and extended versions of .net framework 4 is installed, when i copy regasm.exe from .net framework 4 folder and paste it among some dll files that i want to register them using regasm, it gives me this error :

"RegAsm : error RA0000 : Could not load file or assembly 'file:///file address/RegAsm.exe' or one of its dependencies. Operation is not supported . (Exception from HRESULT: 0x80131515)"

i use regasm like this :

M:\file address\RegAsm.exe M:\file address\myfile.dll

note : when i copy regasm from .net framework version 2 and use it, i don't have such a problem. but i need to register some dll files that has been built with .net framework 4.

note 2 : i must add that in some systems like my system that visual Studio 2013 is installed, there isn't such a problem.

i saw questions like this with their own answers but their talking about this that regasm cant register some dll files, but in my case it gives error about its own self.

UPDATE

thank you jeff

I changed my registering command to something like this :

C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe M:\file address\myfile.dll

and now it's giving this error about my own dll files, but i know that i have all of the dependencies in the folder, this is the error :

RegAsm : error RA0000 : Could not load file or assembly 'file:///M:\file address\myfile.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

.net-4.0
regasm
dllregistration
asked on Stack Overflow Sep 19, 2015 by Farzad Karimi • edited Sep 19, 2015 by Farzad Karimi

1 Answer

1

RegAsm is a .NET application with its own dependencies. The CLR is failing to load one of those dependencies when you copy the exe by itself to another computer. If .NET 4 is in fact installed on that computer, RegAsm.exe should be in the .NET directories under Windows and you shouldn't need to copy it from another computer.

answered on Stack Overflow Sep 19, 2015 by Jeff

User contributions licensed under CC BY-SA 3.0