Installers Woes–Probing Paths

Today for RECESS I was working on Informant. I need a single installer to lay down my Windows Service and WPF application. I’ve done this once before in VS2008, so I figured it wouldn’t be too hard to do in VS2010. I did not anticipate any breaking changes between the two versions however, in VS2010 the way that dependencies are tracked is different than in VS2008. I have two projects that have a shared assembly but in VS2010 the dependency is injected only once for the first project output that claims it. My coworker Dan Hanan introduced me to Probing Paths. This allowed me to have the WPF application in the Application Folder of the installer and the Windows Service application in a folder named Service as a sibling to the WPF Application. In the WPF App.config I added the following probing path:


<runtime>
	<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
		<probing privatePath="Service"/>
	</assemblyBinding>
</runtime>

This allowed me to to have the common assembly dependency in the Service folder and still allow the WPF application to access it. This way the dependency is injected only once to the project installer, but used multiple times.

One thought on “Installers Woes–Probing Paths

  1. Pingback: InterKnowlogy Blogs » Blog Archive » Installer Woes-Installing Dependencies

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>