How to run regasm.exe from command line other than Visual Studio command prompt?

后端 未结 10 2111
盖世英雄少女心
盖世英雄少女心 2020-12-08 02:40

I want to run regasm.exe from cmd. which is available in c:\\windows\\Microsoft.net\\framework\\2.057

I do like this c:\\ regasm.exe

It gives regasm is n

10条回答
  •  感动是毒
    2020-12-08 02:48

    Execute only 1 of the below
    Once a command works, skip the rest/ below to it:

    Normal:

    %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe myTest.dll
    %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe myTest.dll /tlb:myTest.tlb
    %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe myTest.dll /tlb:myTest.tlb /codebase
    

    Only if you face issues, use old version 'v2.0.50727':

    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe myTest.dll
    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe myTest.dll /tlb:myTest.tlb
    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe myTest.dll /tlb:myTest.tlb 
    

    Only if you built myTest.dll for 64bit Only, use 'Framework64' path:

    %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe myTest.dll
    %SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe myTest.dll
    

    Note: 64-bit built dlls will not work on 32-bit platform.

    All options:

    See https://docs.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool

提交回复
热议问题