<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Niranjan Singh</title>
    <description>The latest articles on DEV Community by Niranjan Singh (@niranjankala).</description>
    <link>https://dev.to/niranjankala</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F116299%2F1cd96d34-2401-4713-8e28-22dec74e1100.jpg</url>
      <title>DEV Community: Niranjan Singh</title>
      <link>https://dev.to/niranjankala</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niranjankala"/>
    <language>en</language>
    <item>
      <title>Create Ionic 4 release build for Android</title>
      <dc:creator>Niranjan Singh</dc:creator>
      <pubDate>Fri, 26 Apr 2019 05:18:51 +0000</pubDate>
      <link>https://dev.to/niranjankala/create-ionic-4-release-build-for-android-4700</link>
      <guid>https://dev.to/niranjankala/create-ionic-4-release-build-for-android-4700</guid>
      <description>

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In this article, you will learn how to create ionic 4 release build for the Android platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Ionic?
&lt;/h2&gt;

&lt;p&gt;Ionic framework is the free, open-source toolkit for developing high-quality cross-platform apps for native iOS, Android, and the web—all from a single codebase. It allows us to develop UI using the famous frameworks e.g Angular, Vue.js, React, etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up release build for Android platform
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Steps 1 -&lt;/strong&gt; &lt;br&gt;
Run "npm install" on the root directory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps 2 -&lt;/strong&gt;&lt;br&gt;
Add android platform with the CLI:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ionic platform add android
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Steps 3 -&lt;/strong&gt; &lt;br&gt;
If you are working in a distributed development environment then make sure to install the required files. Run  &lt;a href="https://ionicframework.com/docs/cli/commands/cordova-prepare"&gt;ionic cordova prepare&lt;/a&gt; command. it will Install platforms and plugins listed in "config.xml". &lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ionic cordova prepare android
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Steps 4 -&lt;/strong&gt;&lt;br&gt;
Now navigate to platforms/android with the CLI :&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd platforms/android
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Create/Copy release signing key store file under platforms/android folder&lt;br&gt;
Copy the created Key store file for android application if you already have otherwise generate a key.store file with the CLI and answer all the questions:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;keytool -genkey -v -keystore YourApp.keystore -alias YourApp -keyalg RSA -keysize 2048 -validity 10000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Follow the steps suggested in the documentation for &lt;a href="https://ionicframework.com/docs/v3/intro/deploying/"&gt;Deploying to a Device&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create/Specify release signing information
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Steps 1 -&lt;/strong&gt;&lt;br&gt;
Create a file with name "release-signing.properties" under "platforms\android" folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps 2 -&lt;/strong&gt;&lt;br&gt;
 Add below information to this file:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key.store=YourApp.keystore
key.store.password=&amp;lt;YourApp keystore password&amp;gt;
key.alias=YourApp
key.alias.password=&amp;lt;YourApp alias password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Create build for application
&lt;/h1&gt;

&lt;p&gt;Now go back to the root of your Ionic project with the CLI and build a release version:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ionic cordova build android --prod --release
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If command run successfully then you will find release APK under -- APP_Root_Folder\platforms\android\app\build\outputs\apk\release&lt;/p&gt;

&lt;h3&gt;
  
  
  Reset plugins and platforms
&lt;/h3&gt;

&lt;p&gt;To install Or reinstall all cordova plugins In Package.json with Ionic, Run this command on windows command prompt with administrator privilege &lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rd  plugins /d/s &amp;amp;&amp;amp; rd platforms /d/s  &amp;amp;&amp;amp; ionic cordova prepare
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There are the steps to create a build for ionic 4 application and then you can host your application on Android store.&lt;/p&gt;


</description>
      <category>ionic</category>
      <category>ionic4</category>
    </item>
    <item>
      <title>How to send email in Orchard CMS</title>
      <dc:creator>Niranjan Singh</dc:creator>
      <pubDate>Fri, 19 Apr 2019 07:16:49 +0000</pubDate>
      <link>https://dev.to/niranjankala/how-to-send-email-in-orchard-cms-7nf</link>
      <guid>https://dev.to/niranjankala/how-to-send-email-in-orchard-cms-7nf</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In this article, you will learn how to send email in Orchard CMS using it's out of box services&lt;/p&gt;

&lt;h1&gt;
  
  
  Steps to send email in Orchard CMS
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Create Email wrapper template &lt;/li&gt;
&lt;li&gt;Create Email Template&lt;/li&gt;
&lt;li&gt;Inject required orchard services in the Controller or Custom Service &lt;/li&gt;
&lt;li&gt;Specify email template to use and pass data&lt;/li&gt;
&lt;li&gt;Sending email using MessageService&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To demonstrate the scenario, we take the example of sending a challenge email to verify the user email address. In Orchard. Users module, you will find all this code to send an email using orchard services.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2F3.bp.blogspot.com%2F-w-ldBHiXoWs%2FXLkCg6gOu8I%2FAAAAAAAABtY%2F5n7iNSwrGmIuxVu0WYZB41tyOKx2QHVAwCLcBGAs%2Fs640%2FOrchardCMS_Email_Template.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2F3.bp.blogspot.com%2F-w-ldBHiXoWs%2FXLkCg6gOu8I%2FAAAAAAAABtY%2F5n7iNSwrGmIuxVu0WYZB41tyOKx2QHVAwCLcBGAs%2Fs640%2FOrchardCMS_Email_Template.png" alt="Enable docker support in visual studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Steps 1 - Create Email wrapper template
&lt;/h1&gt;

&lt;p&gt;It applies default Body alteration for SmtpChannel which create the body of HTML template. create a new file "Template.User.Wrapper.cshtml" under Views folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@* Override this template to alter the email messages sent by the Orchard.Users module *@
@Display.PlaceChildContent(Source: Model)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Steps 2 - Create Email Template
&lt;/h1&gt;

&lt;p&gt;Now create the content of the email. It applies default Body alteration for SmtpChannel which create the body of HTML template. create a new file "Template.User.Validated.cshtml" under Views folder. It is the same razor view page where we can pass the data and place on the place holders. e.g. Model.ContactEmail is the address of the contact person of the website.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@T("Thank you for registering with {0}.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;b&amp;gt;Final Step&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;To verify that you own this e-mail address, please click the following link:&amp;lt;br /&amp;gt;&amp;lt;a href=\"{1}\"&amp;gt;{1}&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;b&amp;gt;Troubleshooting:&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;If clicking on the link above does not work, try the following:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Select and copy the entire link.&amp;lt;br /&amp;gt;Open a browser window and paste the link in the address bar.&amp;lt;br /&amp;gt;Click &amp;lt;b&amp;gt;Go&amp;lt;/b&amp;gt; or, on your keyboard, press &amp;lt;b&amp;gt;Enter&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;Return&amp;lt;/b&amp;gt;.", Model.RegisteredWebsite, Model.ChallengeUrl)
@if (!String.IsNullOrWhiteSpace(Model.ContactEmail)) {
    @T("&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;If you continue to have access problems or want to report other issues, please &amp;lt;a href=\"mailto:{0}\"&amp;gt;Contact Us&amp;lt;/a&amp;gt;.",Model.ContactEmail)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Steps 3 - Inject required orchard services in the Controller or Custom Service
&lt;/h1&gt;

&lt;p&gt;To render the email template, we need to use a few orchard services. In Orchard CMS every view object is a shape so we need to create a shape using our created template views. We need to inject  IShapeService and IShapeFactory to create the shape for the email content. IMessageService required to send the email through the SMTP channel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace Orchard.Users.Services {
    public class UserService : IUserService {
        private readonly IMessageService _messageService;
        private readonly IShapeFactory _shapeFactory;
        private readonly IShapeDisplay _shapeDisplay;
        public UserService(
        IMessageService messageService, 
        IShapeFactory shapeFactory,
        IShapeDisplay shapeDisplay) {

            _messageService = messageService;
            _shapeFactory = shapeFactory;
            _shapeDisplay = shapeDisplay;
        }
        ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Steps 4 - Specify email template to use and pass data
&lt;/h1&gt;

&lt;p&gt;At this step, we specify the email and wrapper template to create the Shape for HTML content. In below line of code ShapeFactory.Create method takes the first parameter for the email template then we add email wrapper template in the template metadata. Along with this, we pass the model data using the anonymous object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var template = _shapeFactory.Create("Template_User_Validated", Arguments.From(new {
    RegisteredWebsite = site.As&amp;lt;RegistrationSettingsPart&amp;gt;().ValidateEmailRegisteredWebsite,
    ContactEmail = site.As&amp;lt;RegistrationSettingsPart&amp;gt;().ValidateEmailContactEMail,
    ChallengeUrl = url
}));
template.Metadata.Wrappers.Add("Template_User_Wrapper");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Steps 5 - Sending email using MessageService
&lt;/h1&gt;

&lt;p&gt;Now specify the mail message Subject, Body and Recipients of the email message. You can also specify attachments also. Just add the "Attachments" key and List as value to the parameters dictionary. Attachment should be the file path to attach with the email message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var parameters = new Dictionary&amp;lt;string, object&amp;gt; {
                    {"Subject", T("Verification E-Mail").Text},
                    {"Body", _shapeDisplay.Display(template)},
                    {"Recipients", user.Email}
                };

        _messageService.Send("Email", parameters);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Below is the complete code for method which sends the challenge email:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public void SendChallengeEmail(IUser user, Func&amp;lt;string, string&amp;gt; createUrl) {
    string nonce = CreateNonce(user, DelayToValidate);
    string url = createUrl(nonce);

    if (user != null) {
        var site = _siteService.GetSiteSettings();

        var template = _shapeFactory.Create("Template_User_Validated", Arguments.From(new {
            RegisteredWebsite = site.As&amp;lt;RegistrationSettingsPart&amp;gt;().ValidateEmailRegisteredWebsite,
            ContactEmail = site.As&amp;lt;RegistrationSettingsPart&amp;gt;().ValidateEmailContactEMail,
            ChallengeUrl = url
        }));
        template.Metadata.Wrappers.Add("Template_User_Wrapper");

        var parameters = new Dictionary&amp;lt;string, object&amp;gt; {
                    {"Subject", T("Verification E-Mail").Text},
                    {"Body", _shapeDisplay.Display(template)},
                    {"Recipients", user.Email}
                };

        _messageService.Send("Email", parameters);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I guess that's all to send an email in Orchard CMS.&lt;/p&gt;

</description>
      <category>orchardcms</category>
    </item>
    <item>
      <title>How to enable docker support ASP.NET applications in Visual Studio</title>
      <dc:creator>Niranjan Singh</dc:creator>
      <pubDate>Tue, 16 Apr 2019 17:12:06 +0000</pubDate>
      <link>https://dev.to/niranjankala/how-to-enable-docker-support-asp-net-applications-in-visual-studio-28p7</link>
      <guid>https://dev.to/niranjankala/how-to-enable-docker-support-asp-net-applications-in-visual-studio-28p7</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In this article, you will know that how to enable docker support for ASP.NET application in Visual Studio. We will create an ASP.NET Core application docker support and also enable docker support in an existing application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Docker for Windows&lt;/li&gt;
&lt;li&gt;Visual Studio 2017 or later with the .NET Core cross-platform development workload&lt;/li&gt;
&lt;li&gt;Enable Docker support in a new application&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can get Docker support in your project when you create a Visual Studio web project, either. NET Core or the full framework. If you choose the .NET Core framework, you get the option to add Docker support in the new project wizard but for the full framework, we can add Docker support later context menu “Solution Explorer”. See below steps to create a .NET Core project with Linux container support:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zsERfZ7x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-3fktFlZe1ls/XEodRn7XtsI/AAAAAAAABro/752MAL86VKwwC4BhYjIbgQ8VjG-kikcsgCHMYCw/clip_image001_thumb1%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zsERfZ7x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-3fktFlZe1ls/XEodRn7XtsI/AAAAAAAABro/752MAL86VKwwC4BhYjIbgQ8VjG-kikcsgCHMYCw/clip_image001_thumb1%3Fimgmax%3D800" alt="Alt Text" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docker tools in Visual Studio understand the difference between. NET Core and the. NET full framework so the generated files will nicely reflect those different targeted platforms.&lt;/p&gt;

&lt;p&gt;To add Docker support for the full framework, go through previous post - &lt;a href="http://niranjankala.in/post/Containerizing-a-NET-application"&gt;Containerizing a .NET application&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Enable Docker support in a new application
&lt;/h1&gt;

&lt;p&gt;You add Docker support after creating a project is by right-clicking the project in the “Solution Explorer” and then select “Docker Support” option under the Add submenu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j2UCdHcN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-KioN8jDs-Bs/XEodUOHruII/AAAAAAAABrw/eKw06MrlthEd8dDn_sgouRfBM15SGCSZgCHMYCw/clip_image003_thumb6%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j2UCdHcN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-KioN8jDs-Bs/XEodUOHruII/AAAAAAAABrw/eKw06MrlthEd8dDn_sgouRfBM15SGCSZgCHMYCw/clip_image003_thumb6%3Fimgmax%3D800" alt="Enable docker support in visual studio" width="619" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visual Studio will add DockerFile and .dockerignore to the project that will be used to build a docker container image starts with a reference to the base image dotnet:2.2-aspnetcore-runtime.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YOdnxRlQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-Iscki3i_kmo/XEodWV8Es3I/AAAAAAAABr4/nFW2l9Gs5nk1GbWJYHF2XabGNm28Du02gCHMYCw/clip_image005_thumb2%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YOdnxRlQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-Iscki3i_kmo/XEodWV8Es3I/AAAAAAAABr4/nFW2l9Gs5nk1GbWJYHF2XabGNm28Du02gCHMYCw/clip_image005_thumb2%3Fimgmax%3D800" alt="Enable docker support in visual studio" width="625" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; To build this container, you need to switch the Docker tools for Windows on your machine to run Linux containers. If it is targeting to different operating system type, then you would get errors during the build since you can't mix Linux containers with Windows containers.&lt;/p&gt;

&lt;p&gt;Docker support also added the generated YAML files. YAML files can be used together with docker-compose to execute Docker commands to a set of containers instead of only one at a time so that multiple container can work together for the microservices scenarios.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -f "D:\DevWorkSpaces\GitHub\WebDevLearning\WebDev\WebDev.Containerized.MVCWeb\Dockerfile" -t webdevcontainerizedmvcweb:dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2N0G7rr2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-ApaPR9s2eCo/XEodZcO_EGI/AAAAAAAABsA/sWwh_p8c-FYfr8bEex-efG7fa-lOo7FegCHMYCw/clip_image007_thumb4%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2N0G7rr2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-ApaPR9s2eCo/XEodZcO_EGI/AAAAAAAABsA/sWwh_p8c-FYfr8bEex-efG7fa-lOo7FegCHMYCw/clip_image007_thumb4%3Fimgmax%3D800" alt="Docker file to build image" width="647" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Build Docker image from CLI
&lt;/h1&gt;

&lt;p&gt;Open command prompt in administrative mode and run the below command  in project folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\niranjansingh\Source\Repos\WebDevLearning\WebDev\WebDev.AspNETMVC&amp;gt;docker build .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z4NbmTto--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-OjImm3L9gbw/XEojAc4R5YI/AAAAAAAABs4/UoMxABnoZ8E8LXvKog_0g26ZOqBsNcJkgCHMYCw/clip_image001_thumb%25255B10%25255D%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z4NbmTto--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-OjImm3L9gbw/XEojAc4R5YI/AAAAAAAABs4/UoMxABnoZ8E8LXvKog_0g26ZOqBsNcJkgCHMYCw/clip_image001_thumb%25255B10%25255D%3Fimgmax%3D800" alt="Build docker image for asp.net application" width="653" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Running application under Docker Environment
&lt;/h1&gt;

&lt;p&gt;For .NET Core framework applications, Just run the application by selecting the Docker option just after the Run arrow button. After that application will build and create Docker image according to the settings provided in the DockerFile.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0bYNIVSz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-k4_RQaLP1qE/XEodb5Ud6XI/AAAAAAAABsI/r_H1BubyMwk7j4eqb1kilZwitrqT60iWQCHMYCw/clip_image009_thumb3%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0bYNIVSz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-k4_RQaLP1qE/XEodb5Ud6XI/AAAAAAAABsI/r_H1BubyMwk7j4eqb1kilZwitrqT60iWQCHMYCw/clip_image009_thumb3%3Fimgmax%3D800" alt="clip_image009" width="649" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For my case application is targeting “Linux” and Docker for Windows on my system is configured to run the Windows contains so it will not build my case. So, remember to switch particular target Operating system containers before you build the application.&lt;/p&gt;

&lt;p&gt;For a .NET framework application, make docker-compose as startup project. After this modify the .yml files to build and run the contains.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lvyYQq1g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-GfTEhGwRzOo/XEodeMCJYBI/AAAAAAAABsQ/_VU7OvEGu2EBs9p8lFqIhaVidQ3Hm0ijwCHMYCw/image_thumb11%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lvyYQq1g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-GfTEhGwRzOo/XEodeMCJYBI/AAAAAAAABsQ/_VU7OvEGu2EBs9p8lFqIhaVidQ3Hm0ijwCHMYCw/image_thumb11%3Fimgmax%3D800" alt="image" width="356" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will see Docker Compose button on the place of “Docker” in .NET full framework applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b4nLQ9EV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-jYQFOKHu0To/XEodgyZCXWI/AAAAAAAABsY/CNPqzWh4MDEpsor6hKW48XKt1h81lXTlwCHMYCw/image_thumb16%3Fimgmax%3D800" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b4nLQ9EV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lh3.googleusercontent.com/-jYQFOKHu0To/XEodgyZCXWI/AAAAAAAABsY/CNPqzWh4MDEpsor6hKW48XKt1h81lXTlwCHMYCw/image_thumb16%3Fimgmax%3D800" alt="image" width="524" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Debug button to let the docker decompose to build and run the docker image on the bases of yml file configuration.&lt;/p&gt;

&lt;p&gt;Here we have completed basic steps to build a docker image for an ASP.NET application in Visual Studio.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>visualstudio</category>
      <category>dotnetcore</category>
    </item>
  </channel>
</rss>
