Feb 15, 2013 · The command that you entered passed the solution file path and two properties to MSBuild: msbuild C:\ContosoUniversity\ContosoUniversity.sln /p:DeployOnBuild=true /p:PublishProfile=Test Deploying the solution versus deploying individual projects. Specifying the solution file causes all projects in the solution to be built.
MSBuild does not know about this property. If you add the following property to the publish profile, then it would work from both VS and commandline. <Configuration>Release</Configuration>. or you can pass this in the commandline - /p:Configuration=Release. The issue here is specific to configuration.