Visio - How to reverse engineering VS2008 (hack)

I found a work-around for those of you, like myselt, that are not in a position to take risk trying to hack the registry and don't want to switch from Visio; it is only a few steps and has worked on every project I've tried it on (at least 5 last night).

  1. Open the project in notepad (remove the readonly attribute if under source control)
  2. Find the following statement    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  3. Change it to   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />  (we're changing Tools to Bin)
  4. Save the file
  5. Load the project in Visual Studio 2005 (Visio for Architects) and reverse engineer the project.
  6. Reverse steps 2 and 3, save and restore the readonly attribute if applicable.

I also changed a Visual Studio 2008 Solution header (in notepad) from version 10.00 to 9.00 (VS2005) and was able to load the solution and the projects I made the above changes to so I could more easily reverse engineer them.   I trust in the very near future I'll write a program to do these few steps but for now I'm content with having access to the objects so that I can diagram with them without having to manually add them.


FYI, the following MSDN article covers MSBuildToolsPath / MSBuildBinPath if your interested:
http://msdn.microsoft.com/en-us/library/bb397428.aspx

Related post in the MSDN Architecture & Design forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3654817&SiteID=1&mode=1


Tags:
Categories:


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know