This tool helps to automatically create and maintain links from a source project to a target project to share code that is common to Silverlight and WPF. Therefore, shared code can be written once and built for the target environment.
for VS2012 see http://visualstudiogallery.msdn.microsoft.com/273dbf44-55a1-4ac6-a1f3-0b9741587b9a/edit?newSession=True
BTW the "Prism guidance" link in the description is broken instructions seem to be available at http://msdn.microsoft.com/en-us/library/ff921108(v=pandp.20).aspx
WARNING: unfortunately the "Add project link..." dialog doesn't work correctly with Solution Navigator (installed by some Visual Studio 2010 add-on functionality pack), must use Solution Explorer instead (from VS2010 "View" menu)
first time you link to a source project it doesn’t link all files from it, but after linking can move all files from that one to some temporary project and then back to the source project for the project linking extension to grab them and make links at the target project
also note that the source project can contain links to files existing somewhere in the filesystem (use add link action at add existing item dialog), no need to include (copy) the files to it
for VS 2012 Support - rename it to .zip - extract it - open the extension.vsixmanifest file - change <VisualStudio Version="10.0"> to <VisualStudio Version="11.0"> - zip the folder - rename it to .vsix --> install it
Agreeed. We MUST get this working with VS2012 again. I tried hacking the VSIX but it would lead to msbuild dysfunctioning at times (http://connect.microsoft.com/VisualStudio/feedback/details/760326/error-msb4014-the-build-stopped-unexpectedly-because-of-an-internal-failure-when-compiling-random-c-projects-with-vs2012). Uninstalling my "hacked" version of Project Linker made it work again, so it seems like it needs some work to function correctly with 2012 unfortunately...
I LOVE this brilliant tool; so simple yet effective. Anyone who has tried to share source between projects knows what an absolute pain linked files are to manage. This tool completely solves the maintenance headache that using linked files introduces. Although the developers of the tool specifically highlight the use case of sharing common code between Silverlight and WPF applications, it is not limited to this specific scenario and can be used whenever you want to share code between projects. Moreover, this approach is considerably cleaner than the RIA services approach where shared files have to be named *.shared.* and the code is copied. Job well done!
Every time I try to add a link to another project, I get a crash. My solution uses quite a lot of solution folders and it is when I try to expand a solution folder that I get the crash:
The error message says: Assertion failed at Microsoft.Practices.ProjectLinker.VisualStudio.Helper.Design.SolutionPickerControl.CreateNode(TreeNodeCollection parentCollection, IHierarchyNode hierarchyNode)
Microsoft.Practices.ProjectLinker.VisualStudio.Helper.Design.SolutionPickerControl.OnBeforeExpand(Object sender, TreeViewCancelEventArgs e)
My solution folder structure looks like this:
* Solution Folder A
* Solution Folder B
* Solution Folder C
* Solution Folder CA
* Solution Folder CB
* Solution Folder CBA
* Solution Folder CBB
* Solution Folder CBC
* Solution Folder CBD
* Solution Folder CBE
* Project CBEA
* Project CBEB
* Project CBEC
* Project CBED
* Project CBEE
* Solution Folder CBF
* Solution Folder D
* Solution Folder E
There are some more projects and sub solution folders under the nonexpanded solution folders as well. The solution folder names and project names here are of course fake. Tell me if you need all the full names and structure and I'll send you the full solution.
What I am doing when I get the crash is:
Right click project CBEC and select "Add project link..." and then navigate by clicking the "+" icons. When I click the "+" icon for Solution Folder CBE, I get the crash and Visual Studio 2012 is nonrecoverable after that.
The biggest problem is that I cannot use this extension at all, since the solution folder structure we are using is something that we want to keep.
I hope that my explanation will make you find and fix the bug. :)
I am starting to think that maybe this is not only a structure issue but also depends on which types of projects are in there. I have PCLs, iOS, Android, WPhone etc.
The current version does not seem to support Visual Studio 11 Developer Preview. Is there any workaround for this, or a new version coming soon? I use this a lot. It just saves me a lot of time. Thanks.
This worked for me:
1. Downloaded the vsix.
2. Extracted the contents with 7-Zip.
3. Modified extension.vsixmanifest to add <VisualStudio Version="11.0"> to the <SupportedProducts> node.
4. Changed MaxVersion to <SupportedFrameworkRuntimeEdition MinVersion="3.5" MaxVersion="4.5" />(not sure if this is necessary)
5. Zipped up contents.
6. Renamed extension back to vsix.
7. Installed extension.
Thanks for posting this, worked for me but not for all project types. I use PL to cross compile between Silveright and WPF. It works if I link the Silverlight project to the WPF version but not the other way around. Throws a NullReferenceException somewhere in the extension.
The tool seems to be creating links only for the files that are added to the source project after the projects have been linked.
Is there any way to force it to create the links for all the files that already exist in the source project?
I agree would be nice to be able to control this from the extension but there is a work around. Simply exclude the files from the source project then include them again. I find it easier to turn on the option to Show All Files first. Then it is as easy as selecting the relevant files/folders using the Right Click menu to Exclude From Project then again to Include In Project. As files/folders are included in the project the links are also created.