I found the solution I was looking for after all these months here
In case the above link goes wrong, here is the skinny one from what she says:
Upload, then edit the project file. Find the line where it imports Microsoft.WebApplication.targets. It will look like this:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
Insert this XML below this line:
<Target Name="PublishToFileSystem" DependsOnTargets="PipelinePreDeployCopyAllFilesToOneFolder"> <Error Condition="'$(PublishDestination)'==''" Text="The PublishDestination property must be set to the intended publishing destination." /> <MakeDir Condition="!Exists($(PublishDestination))" Directories="$(PublishDestination)" /> <ItemGroup> <PublishFiles Include="$(_PackageTempDir)\**\*.*" /> </ItemGroup> <Copy SourceFiles="@(PublishFiles)" DestinationFiles="@(PublishFiles->'$(PublishDestination)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="True" /> </Target>
Now run this on the command line in the same folder as the project file:
msbuild TestWebApp.csproj "/p:Platform=AnyCPU;Configuration=Debug;PublishDestination=C:\pub" /t:PublishToFileSystem
Do not forget to specify the path to MSBUILD in the command or add the path to your global environment variable (this is what I did). On my car, he was here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
To check this, I put the config configuration in my Web.Release.config to add the AppSetting key (if you do, make sure the AppSettings node is present in your base configuration file or you get an error message). When I used the above command to create a debug configuration, the key was not present in the published configuration file as expected. However, when I used the release configuration, the key was successfully added to the file.
I really want Microsoft not to baffle this. In any case, this is the simplest solution I have found anywhere on the Internet. Hope this helps the rest of you.