none
Publish Profile not working with MSBuild

    Question

  • Hello,

    in our current SW project we use VS2010 and TFS2010 for development. We made some tests with VS2012 and recognized that Web Deployment Project are no longer supported. After reading following article http://www.diaryofaninja.com/blog/2012/08/26/visual-studio-2012-web-deployment-projects-are-dead-ndash-long-live-publishing-profiles I think PublishProfiles can do the job and made some tests with VS2012. I was able to add a PublishProfile to our WebApplication project and also to deploy it using the Publish Dialog in VisualStudio.

    But if I try to use the MSBuild only to work with PublishProfile nothing happens. MSBuild only builds the application and deploys it to a zip file like the default WebPackaging does. It looks like MSBuild ignores the PublishProfile parameter.

    Here is how I call MSBuild.exe:

    MSBuild.exe NetWIF2.vbproj /p:Configuration=Release /p:DeployOnBuild=true;PublishProfile=WIF_Deploy

    Any idea?

    Thomas

    Friday, December 07, 2012 2:39 PM

Answers

All replies

  • Hi Thomas,

    If we set the PublishProfile = the full name like: the WIF_Deploy.pubxml, can it work well?

    Please upload your project to skydrive and post the link here.

    We want to do some test to reproduce this issue.

    Thank you for your understanding and support.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 10, 2012 9:34 AM
  • Hello Ego,

    If I change my call of MSBuild to..

    MSBuild.exe NetWIF2.vbproj /p:Configuration=Release /p:DeployOnBuild=true;PublishProfile=WIF_Deploy.pubxml

    .. I get the same result. MSBuild ignores the PublishProfile.

    Also I think it is not a problem within our project. It looks like MSBuild did not use the PublishProfile parameter.

    Thomas

    Monday, December 10, 2012 3:33 PM
  • Hi Nettro,

    Did you import MSBuild.Community.Tasks.Targets like:

    <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 13, 2012 7:54 AM
  • Hello Ego,

    thanks for reply. I don't have imported MSBuild.Community.Task.Targets. I also don't have installed MSBuildCommunityTasks. I only have installed VisualStudio 2012 and Azure SDK (enabled publish profile support for WebSite Projects). Do I need to install MSBuildCommunityTasks?

    Thomas

    Thursday, December 13, 2012 9:58 AM
  • Hi Nettro,

    Yes, you should install MSBuildCommunityTasks, if you want to Publish Profile.

    Please install it and try again.

    Best regards, 


    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 2:56 AM
  • I had exactly the same problem. MSBuildCOmmunityTasks was installed and referenced correctly, so that was not the issue. After a day searching on Google, I found the following post to be helpful: http://stackoverflow.com/questions/16176894/how-to-build-visual-studio-2012-publishing-profiles-on-a-build-server-with-msbui#_=_

    Wednesday, July 24, 2013 8:00 AM