none
Visual Studio 2008 on Vista: run gacutil /i in post build event RRS feed

  • Question

  • One of the post build event command in my C# project is
    "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i $(TargetPath)

    it would fail but another command of uninstall succeeds.
    "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u $(TargetName)

    I tried using command line with administrator permission to install the assembly and it worked.

    I am using Vista Business. I disabled UAC on my computer.

    Thanks a million,

    Gene
    Monday, November 2, 2009 8:19 PM

Answers

  • I figured it out, so I just answer the question to myself:

    This command would not work for me:

    "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i $(TargetPath)

    But this would work for me:

    "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i "$(TargetPath)"

    the target path folder on my computer is “D:\xxx xxx xxx\”, which has space - put quotation marks around the target path variable resolved my issue.

    • Marked as answer by guoqingyu Tuesday, November 3, 2009 9:13 PM
    Tuesday, November 3, 2009 9:12 PM