During a project's life cycle, moving the code base to the next version of visual studio becomes necessary to take advantage of newer features, This can be daunting task if there are a large number of projects.
The "Migration Helper" utility makes it a breeze as described below.
- Updates project settings ((PlatfromToolSet and Framework version) ) and solution settings (Visual studio version) to a newer version of visual studio
- Generates a report containing settings of all the projects and solutions to analyze the results of migration.
- Generates a report describing the CLR and Version of all the DLLs generated after successful build.
- Generates a report analyzing each managed executable 's references to detect potential "mixed mode" situations.
The "Source Folder" specifies the root of the project folder. All the actions recursively scans directories looking for projects and solutions. The "Output Folder" houses reports generated.
List Tab
List
This recursively scans for projects and solutions listing the project and solution settings as shown below.
This action should be invoked after the build,, This recursively scans through all the DLLs and lists the DLL version and CLR version (if managed) as shown below. The "ildasmpath" setting of of MigrationHelper.exe.config should point to the ildasm.exe. Similarly "dumpbinpath" should point to dumpbin.exe.
Dependencies
During migration, when some of the managed executables move to a newer CLR (> 4.xxx),, they might still reference assemblies from an older CLR (< 4.xxx). This leads to "Mixed mode" and the exe's app.config should address this.
Identifying such executables can be daunting as the references must be recursively scanned for dependencies. This is made simple by Dependencies option. This scans through all the executables and their references recursively and tries to load. Any errors related to "Mixed mode" are captured and reported as shown below. A detailed map of the Executables and their references is also generated,.
Identifying such executables can be daunting as the references must be recursively scanned for dependencies. This is made simple by Dependencies option. This scans through all the executables and their references recursively and tries to load. Any errors related to "Mixed mode" are captured and reported as shown below. A detailed map of the Executables and their references is also generated,.
Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
VS Upgrade Tab
The Visual Studio provides an option to upgrade projects and solutions by invoking devenv.exe with upgrade option. The path to the devenv.exe pointed by "devenvpath" setting of MigrationHelper.exe.config. Be warned that migration may not succeed in some cases.
Run
Based on the selection - solutions or projects, the source folder is scanned recursively for .slns or .*Proj files. Upgrade is attempted for selected files and reports are generated If the migration was successful, a detailed information of the migration can be obtained from upgradelog.htm generated by dev env for for each project or solution.
VS Update Tab
This is similar to VS Upgrade except the solution and project files are updated.
Run
The source folder is scanned recursively for .slns or .*Proj files. Upgrade is attempted for selected files as described below.
To update a solution, the settings "FormatVersion", "VSName", "MinimumVisualStudioVersion" , and "VisualStudioVersion" from MigrationHelper.exe.config are used.
To update a project, the settings "ToolsVersion","TargetFrameworkVersion" and "PlatformToolset" from MigrationHelper.exe.config are used.
Reports are generated as shown below.
To update a solution, the settings "FormatVersion", "VSName", "MinimumVisualStudioVersion" , and "VisualStudioVersion" from MigrationHelper.exe.config are used.
To update a project, the settings "ToolsVersion","TargetFrameworkVersion" and "PlatformToolset" from MigrationHelper.exe.config are used.
Reports are generated as shown below.
The following displays the sample settings.
<appSettings>
<add key="devenvpath" value="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe"/>
<add key="ildasmpath" value="C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\ildasm.exe"/>
<add key="dumpbinpath" value="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\dumpbin.exe"/>
<add key="TargetFrameworkVersion" value="v4.5.2"/>
<add key="PlatformToolset" value="v140"/>
<add key="ToolsVersion" value="14.0"/>
<add key="FormatVersion" value="12.00"/>
<add key="VSName" value="14"/>
<add key="VisualStudioVersion" value="14.0.24720.0"/>
<add key="MinimumVisualStudioVersion" value="10.0.40219.1"/>
</appSettings>
Source and Binaries can be found here.
No comments:
Post a Comment