I am trying to publish a vs2013 asp.net webapp (the only project in the solution) on TFS 2012. On any developer box, it downloads, explodes and resolves nuget packages (using nuget 2.8.1,) and runs Web Deploy Publish just fine.
However I am unable to replicate that on the TFS box. MSBuild is not finding nuget packages nor is it running Web Deploy Publish.
1. Nuget
Invoked from csproj
<PropertyGroup>
<PreBuildEvent>$(SolutionDir)..\..\..\tools\nuget\nuget.exe restore</PreBuildEvent>
</PropertyGroup>
as recommended in here. There is no .nuget solution-level directory, nuget.exe and nuget.config live up the tfs folder hierarchy. That works fine on a dev box. Why is it not working on the build server?
2. Web Deploy Publish
msbuild log excerpt:
Run MSBuild for Project
Initial Property Values
...
CommandLineArguments = /p:SkipInvalidConfigurations=true /p:DeployOnBuild=True /p:PublishProfile=dev01 /p:AllowUntrustedCertificate=True /p:UserName=myDomainUsername /p:Password=myPassword
....
DeployOnBuild = False
....
Note how DeployOnBuild = False, shouldn't it be overriden by the parameter?
Configuration:
Developer box
Visual studio 2013 update 2, webdeploy 3.6 (latest), Web Deploy Publish is based on .pubxml publish profiles.
vs project file excerpt in case it's relevant:
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup>
<PreBuildEvent>$(SolutionDir)..\..\..\tools\nuget\nuget.exe restore</PreBuildEvent>
</PropertyGroup>
Build definition
The build definition is for the solution (.sln) not the project (.csproj), with parameters as follows:
/p:DeployOnBuild=True /p:PublishProfile=dev01 /p:AllowUntrustedCertificate=True /p:UserName=myDomainUser /p:Password=myPassword
TFS 2012 box
WebDeploy 3.6 (latest) installed.
There is probably a combination of configuration and concept errors in my approach, would appreciate any input really!