<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>porting assistant .net tool &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/porting-assistant-net-tool/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Thu, 03 Jun 2021 11:00:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>porting assistant .net tool &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Migrate or Port Your Old Legacy .NET Projects to the .NET5</title>
		<link>https://sibeeshpassion.com/migrate-or-port-your-old-legacy-net-projects-to-the-net5/</link>
					<comments>https://sibeeshpassion.com/migrate-or-port-your-old-legacy-net-projects-to-the-net5/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 02 Jun 2021 15:10:50 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.net framework to .net core]]></category>
		<category><![CDATA[.net migration]]></category>
		<category><![CDATA[.net5]]></category>
		<category><![CDATA[amazon dot net tool for migration]]></category>
		<category><![CDATA[dotnet 5]]></category>
		<category><![CDATA[migrate legacy application to .net5]]></category>
		<category><![CDATA[migrate old .net to new]]></category>
		<category><![CDATA[port from .net framework to .net5]]></category>
		<category><![CDATA[porting assistant .net tool]]></category>
		<category><![CDATA[porting assistant for .net]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=14339</guid>

					<description><![CDATA[If you are looking for a tool to migrate your legacy old .NET framework projects to the .NET5 version, then you are in the right place. Recently, I got a chance to migrate one legacy application to .NET5, and here in this post, I will be explaining the steps.]]></description>
										<content:encoded><![CDATA[
<p>The word migration means a lot to us, developers, every day we upgrade ourselves by learning new technologies and the situation should not be different when we work on the legacy application. That&#8217;s when the use of some cool migration tools coming into the picture. If you are looking for a tool to migrate your legacy old .NET framework projects to the .NET5 version, then you are in the right place. Recently, I got a chance to migrate one legacy application to .NET5, and here in this post, I will be explaining the steps. Throughout the process, I will be using two different tools, &#8220;Porting assistant for .NET&#8221; by Amazon and .NET Upgrade Assistant by Microsoft. Both tools are Open Source and maintained by the community, free to use. Let&#8217;s get started.</p>



<h1 class="wp-block-heading">Prerequisites </h1>



<p>Download the Targeting framework, and install it. In my case, NET5. You can download them from <a rel="noreferrer noopener" href="https://dotnet.microsoft.com/download/dotnet/5.0" target="_blank">here</a>.</p>



<h2 class="wp-block-heading">Upgrade Assistant tool by Microsoft</h2>



<p>If you choose to use the Upgrade Assistant tool by Microsoft, all you have to do is to <a rel="noreferrer noopener" href="https://visualstudio.microsoft.com/downloads/?WT.mc_id=DT-MVP-5001828" target="_blank">install visual studio</a>,  install the <a rel="noreferrer noopener" href="https://github.com/dotnet/try-convert" target="_blank">try-convert tool</a> by running the preceding command.</p>



<pre class="wp-block-code"><code>Install try-convert: dotnet tool install -g try-convert
Update try-convert: dotnet tool update -g try-convert</code></pre>



<p>Now install the upgrade assistant by executing the below command.</p>



<pre class="wp-block-code"><code>dotnet tool install -g upgrade-assistant</code></pre>



<p>Just like any other tools, to update the tool, just run the below command. </p>



<pre class="wp-block-code"><code>dotnet tool update -g upgrade-assistant</code></pre>



<p>To get more info about the installation, you can visit <a rel="noreferrer noopener" href="https://github.com/dotnet/upgrade-assistant#installation" target="_blank">this document</a>.</p>



<h2 class="wp-block-heading">Porting Assistant tool by Amazon</h2>



<p>If choose to use this tool, please make sure that you have done the preceding things.</p>



<ul class="wp-block-list"><li>Signup an <a rel="noreferrer noopener" href="https://aws.amazon.com/free/" target="_blank">account with AWS</a></li><li>Log in to the AWS account and collect the security credentials. We will be using this info in our migration. Visit <a rel="noreferrer noopener" href="https://console.aws.amazon.com/iam/home?#/security_credentials" target="_blank">this site</a>, click on the Access Keys section, and then click on the Create New Access Key button. This will generate a new key, download the same and keep it in a safe location. </li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image.png"><img fetchpriority="high" decoding="async" width="1024" height="776" src="/wp-content/uploads/2021/06/image-1024x776.png" alt="" class="wp-image-14340" srcset="/wp-content/uploads/2021/06/image-1024x776.png 1024w, /wp-content/uploads/2021/06/image-300x227.png 300w, /wp-content/uploads/2021/06/image-768x582.png 768w, /wp-content/uploads/2021/06/image-1536x1164.png 1536w, /wp-content/uploads/2021/06/image.png 2035w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Amazon access keys</figcaption></figure></div>



<ul class="wp-block-list"><li>Go to this <a rel="noreferrer noopener" href="https://aws.amazon.com/porting-assistant-dotnet/" target="_blank">link</a>, click on the Download Porting Assistant for the .NET button to download and install. You can also use the Visual Studio extension from <a rel="noreferrer noopener" href="https://marketplace.visualstudio.com/items?itemName=AWSPA.AWSPortingAssistant" target="_blank">here</a>.</li></ul>



<h1 class="wp-block-heading">Port the Application</h1>



<p>In this section, let&#8217;s see how we can use both tools.</p>



<h2 class="wp-block-heading">Using Upgrade Assistant tool</h2>



<p>Using the upgrade assistant tool is as easy as you type some writing some basic commands in CLI. If you have worked with any CLI tools before, this would be very easy. </p>



<p>Once you have installed the tool, you can run the preceding command to start the process. </p>



<pre class="wp-block-code"><code>upgrade-assistant upgrade &lt;Path to csproj or sln to upgrade&gt;</code></pre>



<p>This will analyse your solution or the project and give you the commands to perform as in the preceding image. The first step is to select the entry point from your solution, if you are trying to port the entire solution.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-8.png"><img decoding="async" width="650" height="239" src="/wp-content/uploads/2021/06/image-8.png" alt="" class="wp-image-14420" srcset="/wp-content/uploads/2021/06/image-8.png 650w, /wp-content/uploads/2021/06/image-8-300x110.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></a><figcaption>Upgrade Assistant initial commands</figcaption></figure></div>



<p>The next step is to select the project and select the commands to perform each task. Please remember that you will have to do this for each project. In my case, I was having 43 projects, if you have more projects it can be a pain. Your screen should look like the preceding image.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-9.png"><img decoding="async" width="1000" height="589" src="/wp-content/uploads/2021/06/image-9.png" alt="" class="wp-image-14421" srcset="/wp-content/uploads/2021/06/image-9.png 1000w, /wp-content/uploads/2021/06/image-9-300x177.png 300w, /wp-content/uploads/2021/06/image-9-768x452.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption>Upgrade Assistant porting task</figcaption></figure></div>



<p>Please keep in mind that I am upgrading my MVC application, and the commands will be slightly different for other .NET framework app types. See more <a rel="noreferrer noopener" href="https://dotnet.microsoft.com/platform/upgrade-assistant" target="_blank">here</a>. Once the tool has gone through all the projects, the last step is to finalize the upgrade. As always, all you have to do is selecting the command. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-10.png"><img decoding="async" width="1024" height="423" src="/wp-content/uploads/2021/06/image-10-1024x423.png" alt="" class="wp-image-14422" srcset="/wp-content/uploads/2021/06/image-10-1024x423.png 1024w, /wp-content/uploads/2021/06/image-10-300x124.png 300w, /wp-content/uploads/2021/06/image-10-768x317.png 768w, /wp-content/uploads/2021/06/image-10-1536x635.png 1536w, /wp-content/uploads/2021/06/image-10.png 1580w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Upgrade assistant finalize step</figcaption></figure></div>



<p>You should get a message as preceding once the upgrade has been completed. </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>[22:43:27 INF] Upgrade has completed. Please review any changes.<br>[22:43:27 INF] Deleting upgrade progress file at C:\sourcecode\solution-name.upgrade-assistant<br>PS C:\sourcecode\solution-name&gt;</p><cite>Upgrade output</cite></blockquote>



<p>It is worth noting that you will have to manually do a lot of changes in your solution according to how complex your solution is. Some of the warnings/errors that this tool gives are given below. </p>



<ul class="wp-block-list"><li>No version of System.Configuration.ConfigurationManager found that supports [&#8220;net46&#8221;]; leaving unchanged</li><li>No version of System.ServiceModel.Federation found that supports [&#8220;net46&#8221;]; leaving unchanged</li><li>.NET Upgrade Assistant analyzer NuGet package reference cannot be added because the package cannot be found</li><li>Package AutoMapper has been upgraded across major versions (4.2.0 -&gt; 5.2.0) which may introduce breaking changes</li><li>No version of EnterpriseLibrary.TransientFaultHandling found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of EnterpriseLibrary.TransientFaultHandling.Data found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.AspNet.WebApi.OData found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.Azure.CosmosDB.Table found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.Azure.DocumentDB found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.Bcl.Async found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>Package Microsoft.Web.Xdt has been upgraded across major versions (2.1.1 -&gt; 3.1.0) which may introduce breaking changes</li><li>Package Microsoft.Azure.NotificationHubs has been upgraded across major versions (1.0.9 -&gt; 2.0.2) which may introduce breaking changes</li><li>No version of SharePointPnPCoreOnline found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>Package Microsoft.Azure.NotificationHubs has been upgraded across major versions (1.0.9 -&gt; 2.0.2) which may introduce breaking changes</li><li>No version of System.ServiceModel.Federation found that supports [&#8220;net46&#8221;]; leaving unchanged</li><li>No version of Microsoft.Azure.ActiveDirectory.GraphClient found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>Package Microsoft.Azure.WebJobs has been upgraded across major versions (1.1.2 -&gt; 2.3.0) which may introduce breaking changes</li><li>No version of Microsoft.ApplicationInsights.Web found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.AspNet.WebApi.Owin found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of StackifyHttpModule found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of System.IdentityModel.Tokens.ValidatingIssuerNameRegistry found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of WebApiContrib.Formatting.Jsonp found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.AspNet.WebApi.Cors found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>No version of Microsoft.AspNet.WebApi.Tracing found that supports [&#8220;net5.0-windows&#8221;]; leaving unchanged</li><li>Package NJsonSchema.CodeGeneration has been upgraded across major versions (1.39.5923.31344 -&gt; 2.65.6055.39156) which may introduce breaking changes</li></ul>



<h2 class="wp-block-heading">Using Posting Assistant tool</h2>



<p>This is how you can use the Porting Assistant tool.</p>



<h3 class="wp-block-heading">Configure the Porting Assistant tool</h3>



<p>Once the tool is installed, open the same and click on the Get started button.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-1.png"><img decoding="async" width="650" height="331" src="/wp-content/uploads/2021/06/image-1.png" alt="" class="wp-image-14341" srcset="/wp-content/uploads/2021/06/image-1.png 650w, /wp-content/uploads/2021/06/image-1-300x153.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></a><figcaption>Get started with Porting Assistant for .NET tool</figcaption></figure></div>



<p>In the new screen, select the target framework and then click on the Add named profile link and provide the Access key information we get from the AWS console. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-2.png"><img decoding="async" width="1024" height="815" src="/wp-content/uploads/2021/06/image-2-1024x815.png" alt="" class="wp-image-14342" srcset="/wp-content/uploads/2021/06/image-2-1024x815.png 1024w, /wp-content/uploads/2021/06/image-2-300x239.png 300w, /wp-content/uploads/2021/06/image-2-768x611.png 768w, /wp-content/uploads/2021/06/image-2.png 1498w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>AWS named profile</figcaption></figure></div>



<p>Click on the Add button, if you want to know more about the named profile, <a rel="noreferrer noopener" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html" target="_blank">this has</a> everything documented. This is how your screen should look like now.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-3.png"><img decoding="async" width="1024" height="668" src="/wp-content/uploads/2021/06/image-3-1024x668.png" alt="" class="wp-image-14343" srcset="/wp-content/uploads/2021/06/image-3-1024x668.png 1024w, /wp-content/uploads/2021/06/image-3-300x196.png 300w, /wp-content/uploads/2021/06/image-3-768x501.png 768w, /wp-content/uploads/2021/06/image-3-1536x1001.png 1536w, /wp-content/uploads/2021/06/image-3.png 2040w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Porting assistant framework selection</figcaption></figure></div>



<h3 class="wp-block-heading">Using the porting assistant tool</h3>



<p>From the above screen, click on the button Next. From here you can select your solution file that holds all of your projects. The tool will start analysing your solution bytes by bytes, depending on the complexity of your solution, this can take a while. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-4.png"><img decoding="async" width="1024" height="334" src="/wp-content/uploads/2021/06/image-4-1024x334.png" alt="" class="wp-image-14344" srcset="/wp-content/uploads/2021/06/image-4-1024x334.png 1024w, /wp-content/uploads/2021/06/image-4-300x98.png 300w, /wp-content/uploads/2021/06/image-4-768x251.png 768w, /wp-content/uploads/2021/06/image-4-1536x502.png 1536w, /wp-content/uploads/2021/06/image-4-2048x669.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Porting assistant tool analyse screen</figcaption></figure></div>



<p>The system will give a message as in the preceding image once the analysing is finished. The screen will also contain information about your Incompatible packages, Incompatible APIs, Build Errors, Porting actions, etc.  </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-5.png"><img decoding="async" width="1024" height="287" src="/wp-content/uploads/2021/06/image-5-1024x287.png" alt="" class="wp-image-14345" srcset="/wp-content/uploads/2021/06/image-5-1024x287.png 1024w, /wp-content/uploads/2021/06/image-5-300x84.png 300w, /wp-content/uploads/2021/06/image-5-768x215.png 768w, /wp-content/uploads/2021/06/image-5-1536x430.png 1536w, /wp-content/uploads/2021/06/image-5-2048x573.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Porting assistant tool success message</figcaption></figure></div>



<p>Click on the solution name, in the screen you will be able to either select all the projects or one by one at a time and start the porting process. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-6.png"><img decoding="async" width="1024" height="542" src="/wp-content/uploads/2021/06/image-6-1024x542.png" alt="" class="wp-image-14346" srcset="/wp-content/uploads/2021/06/image-6-1024x542.png 1024w, /wp-content/uploads/2021/06/image-6-300x159.png 300w, /wp-content/uploads/2021/06/image-6-768x406.png 768w, /wp-content/uploads/2021/06/image-6-1536x812.png 1536w, /wp-content/uploads/2021/06/image-6-2048x1083.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption>Porting assistant porting action</figcaption></figure></div>



<p>Clicking on the button Port solution redirect you to another screen, that is where you can change the versions of your packages. And once you finalized that, click on the port button. You should now see a notification saying that the porting has started. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="/wp-content/uploads/2021/06/image-7.png"><img decoding="async" width="651" height="181" src="/wp-content/uploads/2021/06/image-7.png" alt="" class="wp-image-14416" srcset="/wp-content/uploads/2021/06/image-7.png 651w, /wp-content/uploads/2021/06/image-7-300x83.png 300w" sizes="(max-width: 651px) 100vw, 651px" /></a><figcaption>Porting assistant porting operation</figcaption></figure></div>



<p>You will also be getting an option to view the logs at the end.</p>



<h1 class="wp-block-heading">Things to keep in mind</h1>



<ul class="wp-block-list"><li>These tools are just a starting point, and according to the complexity of your application, and the number of APIs or packages incompatible, you may have to manually edit the code and change the package references. </li><li>It will be helpful if you choose to save the accessed solution in the same place if you use any Git branch so that you can see the changes and act accordingly.</li><li>If you use Microsoft Upgrade Assistant, you can choose the given order to perform the port or if you use Amazon Porting Assistant, you can select which project you should be migrated first according to the graph in the Project references tab.</li></ul>



<h1 class="wp-block-heading">More information about the tools</h1>



<p>The .NET Upgrade Assistant is a CLI tool introduced by Microsoft, and with this tool, you can easily migrate any old application to new versions. You can read more about this tool <a href="https://docs.microsoft.com/en-gb/dotnet/core/porting/upgrade-assistant-overview?WT.mc_id=DT-MVP-5001828" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>The tool &#8220;Porting Assistant for .NET&#8221; is developed by Amazon. You can read more about this tool <a rel="noreferrer noopener" href="https://aws.amazon.com/porting-assistant-dotnet/" target="_blank">here</a>.</p>



<p>To get more understanding about this &#8220;Porting Assistant for .NET&#8221; tool, I recommend you to watch the preceding video. </p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Porting Assistant for .NET" width="1200" height="675" src="https://www.youtube.com/embed/mMu7qahc9-0?start=231&#038;feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div><figcaption>Porting Assistant for .NET Overview</figcaption></figure>



<h1 class="wp-block-heading">Conclusion</h1>



<p>In this post, we learned the preceding things.</p>



<ul class="wp-block-list"><li>What is Upgrade Assistant tool from Microsoft</li><li>How to configure and use Upgrade Assistant tool from Microsoft</li><li>How to migrate from old .NET framework project to new .NET 5 version</li><li>What is the Porting Assistant for the .NET tool</li><li>How to configure the Porting Assistant for the .NET tool</li></ul>



<p>I will be updating this post if I find any information needs to be added in the future. </p>



<h1 class="wp-block-heading">About the Author</h1>



<p>I am yet another developer who is passionate about writing and video creation. I have written close to 500 blogs on my&nbsp;<a href="https://sibeeshpassion.com/" target="_blank" rel="noreferrer noopener">blog</a>. And I upload videos on my YouTube channels&nbsp;<a href="https://www.youtube.com/njanorumalayali" target="_blank" rel="noreferrer noopener">Njan Oru Malayali</a>&nbsp;and&nbsp;<a href="https://www.youtube.com/SibeeshPassion" target="_blank" rel="noreferrer noopener">Sibeesh Passion</a>. Please feel free to follow me.</p>



<ul class="wp-block-list"><li><a href="https://github.com/SibeeshVenu">GitHub</a></li><li><a href="https://medium.com/@sibeeshvenu">medium</a></li><li><a href="https://twitter.com/sibeeshvenu">Twitter</a></li></ul>



<h1 class="wp-block-heading">Your turn. What do you think?</h1>



<p>Thanks a lot for reading. Did I miss anything that you may think is needed in this article? Could you find this post useful? Kindly do not forget to share your feedback.</p>



<p>Kindest Regards</p>



<p>Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/migrate-or-port-your-old-legacy-net-projects-to-the-net5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
