I've got an issue where my WPF application cannot be published with ClickOnce.
The application uses Nuget packages MVVM Light 126.96.36.199, Unity 2.1.505.2, CommonServiceLocator 1.0.
The problem is that when I publish, it all build fine, but I get this error when I try and install the clickonce package:
Unable to install or run the application. The application requires that assembly Microsoft.Practices.ServiceLocation Version 188.8.131.52 be installed into the Global Assembly Cache (GAC) first.
I did some digging and saw that there were two references to that assembly in the manifest, and one of them was marked as a prerequisite which I can't get rid of:
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" version="184.108.40.206" publicKeyToken="59D6D24383174AC4" language="neutral" processorArchitecture="msil" />
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Practices.ServiceLocation.dll" size="29760">
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" version="220.127.116.11" publicKeyToken="31BF3856AD364E35" language="neutral" processorArchitecture="msil" />
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
I'm pretty sure the issue with the ClickOnce is down to there being two references to this assembly with the same version (but notice the different public key tokens).
I created a very simple repro as follows:
- Create a new WPF application
- Add Nuget package MVVM Light
- Add Nuget package Unity
- Build and publish the WPF application
- Try and install the published MyApp.application clickOnce package....get the error detailed above
Here's a repro project:
Skydrive repro project link
Any ideas how I might get over this?