0

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!

  • Try focusing on a smaller part. Build one project, then the other. Also, MSBuild repeats warnings and errors at the end. Look back to where they are first reported to see the context. Also, use the [/verbosity](https://msdn.microsoft.com/en-us/library/ms164311.aspx) switch for more detail. You might see something like "Consider app.config remapping of assembly…". – Tom Blodget Dec 05 '15 at 20:08
  • Thanks Tom, I think I found the issue: MB3247 warnings in the MSBuild log. There is a version conflict between various DLLs when I run it on the Jenkins server. The strange this is that I don't get these errors on my dev machines so I am not sure what is happening there – Justin Pretorius Dec 07 '15 at 06:35
  • Possible duplicate of [Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly](http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depen) – Tom Blodget Dec 07 '15 at 12:03
  • Great, will have a look at it! Much appreciated! – Justin Pretorius Dec 07 '15 at 13:05

0 Answers0