Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6646227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:23:26+00:00 2026-05-26T00:23:26+00:00

I have an open source .NET project whose main artefact is a DLL that

  • 0

I have an open source .NET project whose main artefact is a DLL that needs to be installed to the GAC for its primary use case. Therefore I want to install it during the AfterBuild task. I am using the GacUtil msbuild task from the MSBuild Community Extensions. It is not working.

My MSBuild code, which I got from here is:

<Target Name="AfterBuild">
  <GacUtil Assemblies="$(TargetName)" />
</Target>

The command I am using is msbuild /t:AfterBuild /verbosity:diagnostic. The error I get is:

Done building target "_CheckForInvalidConfigurationAndPlatform" in project "JustAProgrammer.ADPR.csproj".
Target "AfterBuild" in project "e:\src\JustAProgrammer.ADPR\JustAProgrammer.ADPR\JustAProgrammer.ADPR.csproj" (entry point):
Using "GacUtil" task from assembly "C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll".
Task "GacUtil"
Done executing task "GacUtil" -- FAILED.
Done building target "AfterBuild" in project "JustAProgrammer.ADPR.csproj" -- FAILED.
Done Building Project "e:\src\JustAProgrammer.ADPR\JustAProgrammer.ADPR\JustAProgrammer.ADPR.csproj" (AfterBuild target(s)) -- FAILED.

I am executing this command from a copy of cmd.exe running as administrator with gacutil.exe in its path. I used this very same command prompt to successfully install and uninstall this assembly from the GAC, and double checked that the assembly is not in the c:\windows\assembly folder.

How do I figure out why GacUtil is failing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:23:27+00:00Added an answer on May 26, 2026 at 12:23 am

    It looks like the path it’s trying to use to get to the tool is wrong (or at least it was in my case). Set the “ToolPath” property on the “GacUtil” task to “$(FrameworkSDKDir)bin” like so:

    <Target Name="BeforeBuild">
        <GacUtil Command="Uninstall" ToolPath="$(FrameworkSDKDir)bin" Assemblies="$(TargetName)" ContinueOnError="true"/>
    </Target>
    <Target Name="AfterBuild">
      <GacUtil ToolPath="$(FrameworkSDKDir)bin" Assemblies="$(TargetPath)"/>
    </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been contributing heavily to this open source project that aims to help
Within my Subversion project I have a few directories that contain other open source
I have searched through the net for the open source project of Document management
hello all i have code from open source project that im integrating into my
I have downloaded an open source project that I would like to use to
I have been working on an open source project for awhile, http://gtkworkbook.sourceforge.net/ , and
I have an issue with an open source C++ project that I have been
I have a .NET application, which is using an open source C++ compression library
If I have a decent size asp.net page open in Source view, and hold
I have an open-source iPhone API that I downloaded, and that is a standalone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.