Using msbuild to execute a File System Publish Profile
FYI: I had the same issue with Visual Studio 2015. After many of hours trying, I can now do msbuild myproject.csproj /p:DeployOnBuild=true /p:PublishProfile=myprofile
.
I had to edit my .csproj file to get it working. It contained a line like this:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
Condition="false" />
I changed this line as follows:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets" />
(I changed 10.0 to 14.0, not sure whether this was necessary. But I definitely had to remove the condition part.)
MSBuild with publish profiles and configuration merges
I installed VS update 3 on the build server an it's working now.
MsBuild publish website without using publish profile
You can actually override the PublishProfile settings from the command line. You would want this parameter:
/p:publishUrl=pathToPublishHere
If it's local filesystem this should work just fine.
Related Topics
Persist Data by Programming Against Interface
Replace Unicode Escape Sequences in a String
3D Relative Angle Sum Calculation
Extremely Large Single-Line File Parse
Class List Keeps Printing Out as Class Name in Console
What Is the Best Practice for "Copy Local" and with Project References
How to Avoid "Too Many Parameters" Problem in API Design
Why Must We Define Both == and != in C#
Generic Type Conversion from String
How to Tell Moq to Return a Task
Is There a Task Based Replacement for System.Threading.Timer
Is It Necessary to Explicitly Remove Event Handlers in C#