locked
TFS build and creating a SharePoint 2013 .app file

    Question

  • Hi TFS Service Forum!

    Is it possible to build an SharePoint 2013 App from the TFS Service build servers ?

    (Trying to create the .app file from a custom TFS build template through a Powershell Script with this command:

    msbuild /t:Package <project> /p:Configuration=Debug /p:Platform="Any CPU" /p:OutputPath=<outputpath>

    Also tried to use the /p:IsPackaging=True in the build definition as msbuild argument when building the solution.

    But In both cases I get this error:

    (PerformPackageValidation target) ->

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018: The "ValidatePackage" task failed unexpectedly. [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018: System.InvalidOperationException: The project service does not contain the specified project: f3dd99d2-7717-4662-a372-8ee711a85e97. [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018:    at Microsoft.VisualStudio.SharePoint.Tasks.ValidatePackage.OnCheckParameters() [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018:    at Microsoft.VisualStudio.SharePoint.Tasks.BuildTask.Execute() [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(387,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\a\src\AutoHostedApp\AutoHostedApp\AutoHostedApp.csproj]

    The error above could be cause, the Visual studio component that creates the .app file, isn’t installed. When looking in this folder:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools

    Then this file is missing : Microsoft.VisualStudio.SharePoint.Apps.Common.targets filen.)

    Best regards

    David


    David Nykjaer, 2ndC

    Monday, January 21, 2013 8:52 PM

Answers

All replies

  • Hi David,

    Thank you for your post.

    According to your description of the issue, hope you use local MSBuild build the application, and let's know the result.

    Regards,


    Lily Wu
    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.

    Wednesday, January 23, 2013 7:53 AM
    Moderator
  • Hi Lily,

    Thanks for your reply!

    We are using the local instance of MSBUILD on the TFS build instance, but it seems like its failing, because it’s missing the “Office 2013 and SharePoint 2013 Developer Tools Preview for Visual Studio 2012 RTM” installation.

    We tried adding the MSBUILD SharePoint targets in source control and pointing to those targets in the .cproj, but it fails.

    So how would we solve the above problem, and having the Team foundation Service build instance creating the .app file?

    Best regards

    David


    David Nykjaer, 2ndC

    Thursday, January 24, 2013 6:55 AM
  • Hi David,

    If you need install  “Office 2013 and SharePoint 2013 Developer Tools Preview for Visual Studio 2012 RTM” on build machine to support the build. I think you need configure on-premises build machines, install above things to support the build. You can download TFS express to install build service. More information about configure on-premises build machine, you can refer to Deploy and Configure a Build Controller.

    Regards,


    Lily Wu
    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, January 24, 2013 8:09 AM
    Moderator
  • Hi David,

    Since we haven't heard from you for a long time, I assume you have got useful information yet. I mark useful reply as answer. If you have any concerns, please feel free to reopen it or submit a new question. Thanks for your understanding. 

    Regards,

    Lily Wu
    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.

    Tuesday, January 29, 2013 1:31 AM
    Moderator
  • Hi Lily

    Thanks for your help on this.

    I posted a "wish for visual studio SharePoint components" on tfs.visualstudio.com build-server images. I someone agree with me, they can click on the link, and give the idea a vote:

    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3595362-add-support-for-building-sharepoint-2013-apps-on-h

    Best regards

    David Nykjaer, 2ndC


    David Nykjaer, 2ndC

    Wednesday, January 30, 2013 12:57 PM
  • The tfs.visualstudio.com build-server images have now been updated as requested according to the documentation :-)

    Best regards

    David Nykjaer, 2ndC.

    Wednesday, March 06, 2013 7:53 PM