1

I am getting this message when I executed the dotnet publish command on cmd.

"Nothing to do. None of the projects specified contain packages to restore."

dotnet publish "/p:PublishProfile=Properties\PublishProfiles\PMIAdmin.pubxml"

enter image description here

It is working when I clicked the publish button on Visual Studio 2019

enter image description here

How can I publish this project from cmd?

dotnet version: .NET Framework 4.5 project type: Asp.Net MVC

Tolga Cakir
  • 725
  • 1
  • 7
  • 13

1 Answers1

1

dotnet publish is for .NET Core, to publish .NET Framework app you can use MSBuild directly. For example from Visual Studio Developer Command Prompt:

msbuild path_to_sln_file /p:DeployOnBuild=true /p:PublishProfile=<profile-name>

Read more.

Guru Stron
  • 102,774
  • 10
  • 95
  • 132