0

I have created a .net framework 4.7.2 mvc project in visual studio.

From visual studio, I can publish this project to a folder by right click the project name -> select publish -> select Folder and so on. The screenshot is as below:

enter image description here

And now, I want to use some commands(For example, for a .net core project, we can use dotnet publish command to publish to a folder) to publish it to folder instead of using visual studio, does anyone know it?

Thanks in advance.

Jack J Jun - MSFT
  • 5,164
  • 1
  • 7
  • 19
Ivan Yang
  • 28,783
  • 2
  • 29
  • 49
  • 1
    Does this answer your question? [Using MSBuild.exe to "Publish" a ASP.NET MVC 4 project with the cmd line](https://stackoverflow.com/questions/13920146/using-msbuild-exe-to-publish-a-asp-net-mvc-4-project-with-the-cmd-line) – Martheen May 12 '21 at 08:48
  • @Martheen, thanks for your reply. It seems that the msbuild.exe needs a .sln file. And my project is in a solution with other projects, so it does not have .sln file for this project, it only has .csproj file. – Ivan Yang May 12 '21 at 09:00
  • https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild?view=vs-2019#use-msbuild-at-a-command-prompt – Martheen May 12 '21 at 09:09

0 Answers0