<?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>.net 6 &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/net-6/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 15 Dec 2021 16:31:22 +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>.net 6 &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Deploy .net 6 App to Azure from Azure DevOps using Pipelines</title>
		<link>https://www.sibeeshpassion.com/deploy-net-6-app-to-azure-from-azure-devops-using-pipelines/</link>
					<comments>https://www.sibeeshpassion.com/deploy-net-6-app-to-azure-from-azure-devops-using-pipelines/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 15 Dec 2021 14:47:13 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[.net 6]]></category>
		<category><![CDATA[Azure DevOps]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=14537</guid>

					<description><![CDATA[Working with both Azure and Azure DevOps is always fun, and the possibilities of automation are endless. I have written many articles on these topics and you can read them here. As you all know that the .net6 is been a talk in the market and I can't wait to try out things there. Here in this post, we will see how to use the Azure DevOps pipeline to build, restore and deploy the .net6 application to Azure Web App Service.]]></description>
										<content:encoded><![CDATA[
<p>Working with both Azure and Azure DevOps is always fun, and the possibilities of automation are endless. I have written many articles on these topics and you can read them <a rel="noreferrer noopener" href="https://sibeeshpassion.com/category/azure/" target="_blank">here</a>. As you all know that the .net6 is been a talk in the market and I can&#8217;t wait to try out things there. Here in this post, we will see how to use the Azure DevOps pipeline to build, restore and deploy the .net6 application to Azure Web App Service. Let&#8217;s get started. </p>



<p>At this point, I will assume that you have a .net6 application, Azure Web App Service, and Azure DevOps project with permission to configure the Pipeline and to add a new service connection to the Azure Resource Group. If you are not sure about how to configure the Service Connection to the Azure Resource Group, <a href="https://sibeeshpassion.com/azure-devops-service-connection-with-multiple-azure-resource-group/" target="_blank" rel="noreferrer noopener">this post</a> will help you. </p>



<h1 class="wp-block-heading">Create the YAML files needed</h1>



<p>We will be creating 3 YAML files as listed below. </p>



<ol class="wp-block-list"><li><a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?WT.mc_id=AZ-MVP-5001828&amp;view=azure-devops" target="_blank" rel="noreferrer noopener">A template file</a> with the all the tasks, so that we can reuse them for the environment specific pipelines</li><li>A pipeline for Test environment</li><li>A pipeline for the production environment</li></ol>



<h2 class="wp-block-heading">Template file</h2>



<p>Let&#8217;s configure all the tasks needed in our template file. We will have 2 stages in our template. You can <a href="https://sibeeshpassion.com/azure-multi-stage-pipeline-for-asp-net-core-and-azure-deploy-to-azure-app-service/" target="_blank" rel="noreferrer noopener">read this post</a> if you are not sure how to configure the stages in the pipeline. </p>



<ol class="wp-block-list"><li>Build stage, for performing the tasks below <ul><li>Install .Net Core SDK</li><li>.Net restore</li><li>.Net build</li><li>.Net publish</li><li>Publish to Azure DevOps artefacts</li></ul></li><li>Deploy stage, to deploy the artefacts generated to the Azure Web App Service. This will involves the taks below. <ul><li>Download the artefact</li><li>Deploy</li></ul></li></ol>



<p>Our final template file will look like this. </p>



<script src="https://gist.github.com/SibeeshVenu/4951d95a528d6bef87cc353eeb010548.js"></script>



<h2 class="wp-block-heading">Add pipeline for Test environment</h2>



<p>As we have a template available, we can use this to configure the pipeline for our test environment. All you have to do is to refer to this template and pass the required parameters. This is how our pipeline for our test environment can look like. </p>



<script src="https://gist.github.com/SibeeshVenu/6f6d8f7ef94f781e33b71ca031908f1b.js"></script>



<p>Here, the parameter azure subscription is the service connection name that you have created in your Azure DevOps project. Refer <a rel="noreferrer noopener" href="https://sibeeshpassion.com/azure-devops-service-connection-with-multiple-azure-resource-group/" target="_blank">to this</a> to know more.  The wwebAppName is the name of your Azure Web App Service. </p>



<h2 class="wp-block-heading">Add pipeline for Prod environment</h2>



<p>Let&#8217;s create a new pipeline for our Prod environment to see how easily we can reuse the template. </p>



<script src="https://gist.github.com/SibeeshVenu/1c9f4a5d53e696cbb5241efa0bef1ef3.js"></script>



<p>Wasn&#8217;t that cool?</p>



<h1 class="wp-block-heading">Configure the pipelines in the Azure DevOps</h1>



<p>Just creating the YAML field will not create the pipelines in our DevOps, as Microsoft has removed that option due to some security concerns. So we will have to configure them manually for the first time. Let&#8217;s do it. </p>



<ol class="wp-block-list"><li>Go to the Pipelines section from your Azure DevOps and click on the New pipeline button. </li><li>Select Azure Repos Git (YAML) from the next screen. </li><li>Select the repository that you pushed your YAML file code changes. </li><li>Azure DevOps will analyze your repository and sugges the YAML templates. Select the Existing Azure Pipeline YAML file option.</li><li>Selct the branch and the path to your YAML file as in the preceding image, review the same and run the pipeline. </li></ol>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-8.png"><img fetchpriority="high" decoding="async" width="801" height="376" src="/wp-content/uploads/2021/12/image-8.png" alt="" class="wp-image-14538" srcset="/wp-content/uploads/2021/12/image-8.png 801w, /wp-content/uploads/2021/12/image-8-300x141.png 300w, /wp-content/uploads/2021/12/image-8-768x361.png 768w" sizes="(max-width: 801px) 100vw, 801px" /></a><figcaption>Configure the pipelines in Azure DevOps</figcaption></figure>



<p>That&#8217;s it. Everything else will be working as expected from the next time as we have configured the triggers in the pipelines. If you are getting an error as &#8220;Task &#8220;NETSdkError&#8221; skipped, due to false condition; (&#8216;$(_TargetFrameworkVersionWithoutV)&#8217; &gt; &#8216;$(NETCoreAppMaximumVersion)&#8217;) was evaluated&#8221;, you will have to make sure that you are installing the correct version of the .Net Core SDK as mentioned in <a href="https://stackoverflow.com/a/70352273/5550507" target="_blank" rel="noreferrer noopener">this answer</a>.</p>



<h1 class="wp-block-heading">Source code</h1>



<p>You can get the complete source code from this <a href="https://github.com/SibeeshVenu/deploy-.net6-azure-web-app-yaml" target="_blank" rel="noreferrer noopener">GitHub repository</a>. Please feel free to fork/star. </p>



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



<p>Here in this post, we have learned the following things.</p>



<ol class="wp-block-list" id="block-d40e081d-b702-477c-8b2d-f217c2c2b5fb"><li>How to configure a YAML template</li><li>How to reuse a YAML template in the pipelines</li><li>How to deploy the .net 6 application to Azure Web App Service</li></ol>



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



<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>



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



<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://www.sibeeshpassion.com/deploy-net-6-app-to-azure-from-azure-devops-using-pipelines/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Integrate Azure App Insights in 1 Minute to .Net6 Application</title>
		<link>https://www.sibeeshpassion.com/integrate-azure-app-insights-in-1-minute-to-net6-application/</link>
					<comments>https://www.sibeeshpassion.com/integrate-azure-app-insights-in-1-minute-to-net6-application/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 15 Dec 2021 11:43:51 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[.net 6]]></category>
		<category><![CDATA[azure app insights]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=14527</guid>

					<description><![CDATA[Integrating an existing Azure App Insights into your application is never been easier than this. Within a minute you can do this. I am using the .net6 app and visual studio 2022.]]></description>
										<content:encoded><![CDATA[
<p>Integrating an existing Azure App Insights into your application is never been easier than this. Within a minute you can do this. I am using the .net6 app and visual studio 2022. Here are the steps to do that. </p>



<p>Right-click on the project and click on the Connected Service </p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-1.png"><img decoding="async" width="800" height="806" src="/wp-content/uploads/2021/12/image-1.png" alt="" class="wp-image-14529" srcset="/wp-content/uploads/2021/12/image-1.png 800w, /wp-content/uploads/2021/12/image-1-298x300.png 298w, /wp-content/uploads/2021/12/image-1-150x150.png 150w, /wp-content/uploads/2021/12/image-1-768x774.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Add connected service menu</figcaption></figure>



<p>Click on the + icon in the Service Dependencies and then select Azure Application Insights from the list </p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-2.png"><img decoding="async" width="800" height="561" src="/wp-content/uploads/2021/12/image-2.png" alt="" class="wp-image-14530" srcset="/wp-content/uploads/2021/12/image-2.png 800w, /wp-content/uploads/2021/12/image-2-300x210.png 300w, /wp-content/uploads/2021/12/image-2-768x539.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Add dependency screen</figcaption></figure>



<p>Log in and select your subscription and the Azure Application Insight instance </p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-3.png"><img decoding="async" width="800" height="561" src="/wp-content/uploads/2021/12/image-3.png" alt="" class="wp-image-14531" srcset="/wp-content/uploads/2021/12/image-3.png 800w, /wp-content/uploads/2021/12/image-3-300x210.png 300w, /wp-content/uploads/2021/12/image-3-768x539.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Select service dependency </figcaption></figure>



<p>Configure your connection string name and choose how you want to save your connections string locally. I would recommend saving it to a secret.json file. You can get more information about this <a rel="noreferrer noopener" href="https://sibeeshpassion.com/why-not-secure-your-keys-and-secrets-asp-net-core-with-azure-key-vault-integration/" target="_blank">here</a> under the Secret Storage for Development Environment section. </p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-4.png"><img decoding="async" width="800" height="561" src="/wp-content/uploads/2021/12/image-4.png" alt="" class="wp-image-14532" srcset="/wp-content/uploads/2021/12/image-4.png 800w, /wp-content/uploads/2021/12/image-4-300x210.png 300w, /wp-content/uploads/2021/12/image-4-768x539.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Provide connection string</figcaption></figure>



<p>Click Finish on the summary screen.</p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-5.png"><img decoding="async" width="800" height="561" src="/wp-content/uploads/2021/12/image-5.png" alt="" class="wp-image-14533" srcset="/wp-content/uploads/2021/12/image-5.png 800w, /wp-content/uploads/2021/12/image-5-300x210.png 300w, /wp-content/uploads/2021/12/image-5-768x539.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Summary of changes</figcaption></figure>



<p>You will be able to see the progress in the next screen.</p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-6.png"><img decoding="async" width="800" height="561" src="/wp-content/uploads/2021/12/image-6.png" alt="" class="wp-image-14534" srcset="/wp-content/uploads/2021/12/image-6.png 800w, /wp-content/uploads/2021/12/image-6-300x210.png 300w, /wp-content/uploads/2021/12/image-6-768x539.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Dependency configuration progress</figcaption></figure>



<p>Click on the Git changes window, your changes should look like the image below. </p>



<figure class="wp-block-image size-full"><a href="/wp-content/uploads/2021/12/image-7.png"><img decoding="async" width="749" height="755" src="/wp-content/uploads/2021/12/image-7.png" alt="" class="wp-image-14535" srcset="/wp-content/uploads/2021/12/image-7.png 749w, /wp-content/uploads/2021/12/image-7-298x300.png 298w, /wp-content/uploads/2021/12/image-7-150x150.png 150w" sizes="(max-width: 749px) 100vw, 749px" /></a><figcaption>Git changes</figcaption></figure>



<p>Push your changes and deploy them to your web application.</p>



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



<p>Congratulations and thanks a lot for being with me this far. Here in this post, we learned how can we enable the Azure App Insights to our application. Happy Analysing!.</p>



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



<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>



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



<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://www.sibeeshpassion.com/integrate-azure-app-insights-in-1-minute-to-net6-application/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
