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"
It is working when I clicked the publish button on Visual Studio 2019
How can I publish this project from cmd?
dotnet version: .NET Framework 4.5 project type: Asp.Net MVC
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>