How to do RegAsm so that it cover 32-bit and 64-bit?

前端 未结 3 1665
别跟我提以往
别跟我提以往 2020-12-20 11:41

I have a DLL file prepared by C# and my system is Windows 7 64-bit. When i apply the RegAsm its not adding the registry to 64-bit path but only adding it to 32-bit path.

相关标签:
3条回答
  • 2020-12-20 12:01

    On my 2016 windows server it was the opposite, it was an old dll that needed to be registered using the "Framework" folder, not the "Framework64" folder: "C:\windows\Microsoft.net\Framework\v4.0.30319\regasm" /register /codebase "full path to dll here"

    0 讨论(0)
  • 2020-12-20 12:03

    also, you probably compiled your dll with AllCPU option try to compile with x64 and/or x86 option and register like you do

    • for x64 - "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" /register /codebase "C:\x64\o.dll"
    • for x86 - "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /register /codebase "C:\x86\o.dll"

    P.S. its 5yo question, but may be help to other peoples

    0 讨论(0)
  • 2020-12-20 12:04

    You have it backwards. The Wow6432Node is where the 32-bit specific data goes. Use the 32-bit regasm (from the Framework directory, not the Framework64 directory) to have your component registered in the Wow6432Node.

    0 讨论(0)
提交回复
热议问题