title: MsBuild not finding publish profile
body: <p>I have a VS 2012 solution that contains two projects (WCF C# Service App and a VB Web UI) that I'm trying to deploy via TeamCity/MsBuild command line.  Each project contains a publish profile - let's call it "Test Profile" - that works fine when executed from withing the IDE.</p>
  
  <p>However, when executed as two consecutive build steps, the C# project deploys fine, but the VB project fails with the following error:</p>
  
  <blockquote>
    <p>[09:27:05][ValidatePublishProfileSettings]
    GetPublishingLocalizedString [09:27:05][GetPublishingLocalizedString]
    C:\Program Files
    (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4435,
    5): The value for PublishProfile is set to 'Test Profile', expected to
    find the file at
    'C:\BuildAgent\work\61493e349d61af8c\Yms.Web.Ui__profiles\Test
    Profile.pubxml' but it could not be found.</p>
  </blockquote>
  
  <p>Each build step is setup to use MsBuild v4.0, Run Platform x64, ToolsVersion 4.0. The command line parameters are:</p>
  
  <blockquote>
    <p>/P:Configuration="Test Profile"<br>
    /p:DeployOnBuild=true
    /p:PublishProfile="Test Profile"<br>
    /p:VisualStudioVersion=11.0
    /p:Password=james2</p>
  </blockquote>
  
  <p>When run as a single build step against the solution rather than projects, I get the same error, except "Ui_profiles" in the error message is replaced with "PublishProfiles".</p>
  
  <p>Any help at all is much appreciated, this is driving me batty</p>