sn,gacutil,ildasm

Hi,

Iwant to use SN utility for generating public key,and want to use GACUTIL and ILDASM.

I found those utilities in C:\Program Files\Microsoft Visual studio 8\SDK\BIN.

I added the above path to the environmentals and come to the command line,and typed sn.

It's not working.

Please help me.




Answer this question

sn,gacutil,ildasm

  • Shyam Bharath

    With Visual Studio installed you should have a shortcut to Open Visual Studio Command Prompt under the Visual Studio Tools (from within the Start menu)... I'd suggest using that for using the various .NET tools from the command line as it sets up all of the paths and environmental variables you need.

  • oldolddba

    To save time I’ll paste mine here for you, to use it you’ll need to save it as a batch file, modify a few of the paths to fit your environment (if applicable) and then execute it from a shortcut with the target of

    %comspec% /k "C:\PathTo\BatchFile.bat"

    And now, the file:

    @SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
    @SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003
    @SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
    @SET FrameworkVersion=v1.1.4322
    @SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1
    @rem Root of Visual Studio common files.

    @if "%VSINSTALLDIR%"=="" goto Usage
    @if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%

    @rem
    @rem Root of Visual Studio ide installed files.
    @rem
    @set DevEnvDir=%VSINSTALLDIR%

    @rem
    @rem Root of Visual C++ installed files.
    @rem
    @set MSVCDir=%VCINSTALLDIR%\VC7

    @rem
    @echo Setting environment for using Microsoft Visual Studio .NET 2003 tools.
    @echo (If you have another version of Visual Studio or Visual C++ installed and wish
    @echo to use its tools from the command line, run vcvars32.bat for that version.)
    @rem

    @REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.

    @set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
    @set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%
    @set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%

    @goto end

    :Usage

    @echo. VSINSTALLDIR variable is not set.
    @echo.
    @echo SYNTAX: %0

    @goto end

    :end



  • JohnMatthews

    Hi,

    I installed c# express Edition.For this tehere is no shortcut to command utility.

    Please help me.

    Thanks.



  • sn,gacutil,ildasm