R – ClickOnce requires the assembly MyProject be in the GAC

clickoncecruisecontrol.netgacnet

I am at a loss for words on this one. Hopefully one of you can clue me in…

We've been using ClickOnce deployment in conjunction with CruiseControl.NET for a long time and have not had any hiccups for a long time.

Yesterday, I modified was in the References tab on the project's properties and ended up tempted by the "Unused References…" button as our deployment is about 13mb and removed said unused references. After checking in the code and letting CruiseControl.NET have its way with things, I went to check the install and received the followong error…

"Unable to install or run the application. The application requires that assembly MyProject Version 1.0.0.0 be installed in the Global Assembly Cache (GAC) first."

No problem, I thought. I'll just roll back to the last version and things will be back to normal. Of course, in the real world, nothing is so easy. We are still receiving the error.

The only place where I really see MyProject 1.0.0.0 is in the application's manifest file.

  <entryPoint>
    <assemblyIdentity name="MyProject" version="1.0.0.0" publicKeyToken="9B95B87716692F15" language="neutral" processorArchitecture="msil" />
    <commandLine file="MyProject.exe" parameters="" />
  </entryPoint>

Any ideas on this one?

Best Answer

You may have one of several issues. When you publish a ClickOnce application you must be certain that your version number is incremented from the last released/installed version or ClickOnce will get confused when trying to deploy any changes. I'm not certain that this is what's indicated by your error message, however.

Also, be sure you deploy all of your published files to the deployment server, including your new manifest file. ClickOnce does a hash on the files to ensure they have not been tampered with.