Click here to Skip to main content
15,886,873 members
Articles / All Topics

Publishing With DNU or DOTNET

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
28 May 2016CPOL2 min read 5.9K   1  
How to publish with DNU or DotNet

In this option, we will see how to host the site using DNU option. DNU means DOT NET Utility. DNU is part of the ASP.NET Core ecosystem. Therefore, when we type dnu in command prompt, then it will result in all the required options available as shown below:

264th

One of the commands which do interest me is publish here. DNU is very useful, you can actually script all of these processes and you can actually install all the dependencies and then run the build and then publish to any server, say Test, Staging or even on Release server. Therefore, it provides a mechanism to automate these tasks. Here, we will be applying dnu command at the root of the project folder like shown below with output directory option.

265th

Once the command starts executing, then you will see the below packages are getting copied.

266th

Therefore, this command will run all the required pre-publish commands and will copy all the different pieces to the destination folder. Once, the command gets completed, then it will show similar message as follows.

267th

Now, let us go to the destination folder.

268th

This should look familiar to you as this is the same thing that we have seen in case of publish from Visual Studio. In fact, Visual Studio was just automating the stuff using DNU tool. Now, let us go inside the approot.

269th

Therefore, here also runtime is embedded, now when I type web here, then it will launch the application as shown below:

270th

And, here when I navigate to http://localhost:5000, it will present the same expected result.

Note: This piece is valid for RC1 update. However, if you have upgraded to RC2, then command dnx is renamed to dotnet. You can refer the complete list at https://docs.efproject.net/en/latest/miscellaneous/rc1-rc2-upgrade.html.

I hope you would have liked today’s discussion. Thanks for joining me.

Happy coding!

327 total views, 3 views today

Image 8 Image 9 Image 10 Image 11 Image 12 Image 13 Image 14 Image 15 Image 16 Image 17 Image 18

Image 19

This article was originally posted at http://myview.rahulnivi.net?p=2973

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Publicis Sapient
India India
Hey there, it's Rahul Sahay! I'm thrilled to be a platform specialist at Publicis Sapient, where I get to work on some exciting projects. I've been honing my skills in various aspects of the software development life cycle for more than 15 years, with a primary focus on web stack development. I've been fortunate to have contributed to numerous software development initiatives, ranging from client applications to web services and websites. Additionally, I enjoy crafting application architecture from scratch, and I've spent most of my time writing platform agnostic and cloud agnostic code. As a self-proclaimed code junkie, software development is more than just a job to me; it's a passion! And I consider myself lucky to have worked with an array of cutting-edge technologies, from .NetCore to SpringBoot 3, from Angular to React, and from Azure to AWS and many more cousin technologies...

- 🔭 I’m currently working @ below tech stacks
- Microservices,
- Distributed Systems,
- Spring Boot
- Spring Cloud
- System Design,
- Docker,
- Kubernetes,
- Message Queues,
- ELK Stack
- DotNetCore,
- Angular,
- Azure

- 💬 Ask me anything about my articles [My View](https://myview.rahulnivi.net/)
- 📫 How to reach me: [@rahulsahay19](https://twitter.com/rahulsahay19)
- 📫 Github: [@rahulsahay19](https://github.com/rahulsahay19)

Comments and Discussions

 
-- There are no messages in this forum --