I am struggling with MSBuild. I have an MSBuild proj file which builds and deploys via the file system to a folder. It works on my dev machine but when running on a Jenkins server it doesn't bother in deploying to the same named folder and location.
I used a script from http://sedodream.com/CategoryView,category,WebPublishingPipeline.aspx and modified it to meet my needs. Here is the script:
<PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)'=='' ">12.0</VisualStudioVersion>
<Configuration Condition=" '$(Configuration)'=='' ">Release</Configuration>
<OutputRoot Condition=" '$(OutputRoot)'=='' ">$(MSBuildThisFileDirectory)..\BuildOutput\</OutputRoot>
<PublishFolder Condition=" '$(PublishFolder)'==''">C:\inetpub\wwwroot\</PublishFolder>
</PropertyGroup>
<ItemGroup>
<ProjectsToBuild Include="$(MSBuildThisFileDirectory)Source\SPV.API.Web\SPV.API.Web.csproj">
<AdditionalProperties>
VisualStudioVersion=$(VisualStudioVersion);
Configuration=$(Configuration);
OutputPath=$(OutputRoot);
WebPublishMethod=FileSystem;
publishUrl=$(PublishFolder)Test.API\;
DeployOnBuild=true;
DeployTarget=WebPublish;
PublishProfile=$(MSBuildThisFileFullPath)
</AdditionalProperties>
</ProjectsToBuild>
<ProjectsToBuild Include="$(MSBuildThisFileDirectory)Source\SPV.API.Client.Web\SPV.API.Client.Web.csproj">
<AdditionalProperties>
VisualStudioVersion=$(VisualStudioVersion);
Configuration=$(Configuration);
OutputPath=$(OutputRoot);
WebPublishMethod=FileSystem;
publishUrl=$(PublishFolder)Test.WebSite\;
DeployOnBuild=true;
DeployTarget=WebPublish;
PublishProfile=$(MSBuildThisFileFullPath)
</AdditionalProperties>
</ProjectsToBuild>
</ItemGroup>
<Target Name="BuildProjects">
<Message Text="$(MSBuildThisFileDirectory)" Importance="high" />
<MSBuild Projects="@(ProjectsToBuild)" />
</Target>
I get Build succeeded on my dev machine and deployed to the respective folders but on the server I have "Build Succeeded" and then two warnings with "Found conflicts between different versions of the same dependency" but yet it says it succeeded but no deploy to folders.
Does anyone have any ideas if the warning has prevented the deploy? Surely it would be an error and not a warning to state if no deployment occurred?
Any help will be appreciated!