none
Visual Studio 2015 not updating SharePointProjectItem.spdata (SP2016 Add-In project)

    Question

  • I'm currently developing my first app (SharePoint 2016 Add-In) which is to provision some branding elements to a site.

    The issue i'm currently facing is that when i add a file to a module, (eg an Image to the Images module), and update the relevant module's elements.xml file Visual Studio is not updating the corresponding SharePointProjectItem.spdata file which then causes deployment errors. If i update the spdata file manually it fixes it, but considering that this is a hidden file i don't think its meant to be manually updated.

    Below is the spec i'm running, and the elements and spdata files.... In the example shown i've had to manually add the bold/italic line.

    SharePoint 2016 RTM

    Microsoft Visual Studio Professional 2015
    Version 14.0.25123.00 Update 2
    Microsoft .NET Framework
    Version 4.6.01055

    Installed Version: Professional

    Office Developer Tools for Visual Studio 2015 ENU   14.0.23930
    Microsoft Office Developer Tools for Visual Studio 2015 ENU

    SharePoint Client Components 16.0.4351.1000

    <?xml version="1.0" encoding="utf-8"?>
    < Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <Module Name="Images">
        <File Path="Images\AppIcon.png" Url="Images/AppIcon.png" ReplaceContent="TRUE" />
        <File Path="Images\UK_Ire_logo.png" Url="Images/UK_Ire_logo.png" ReplaceContent="TRUE" />
      </Module>
    < /Elements>

    <?xml version="1.0" encoding="utf-8"?>
    < ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
      <Files>
        <ProjectItemFile Source="Elements.xml" Target="Images\" Type="ElementManifest" />
        <ProjectItemFile Source="AppIcon.png" Target="Images\" Type="ElementFile" />
        <ProjectItemFile Source="UK_Ire_logo.png" Target="Images\" Type="ElementFile" />
      </Files>
    < /ProjectItem>

    Thanks

    Martin

    Monday, May 23, 2016 12:23 PM

Answers

  • Hi Lana,

    Yes, both issues were linked. Everything works now after building a new dev box.

    Regards
    Martin

    • Marked as answer by mmc071dotnet Tuesday, May 24, 2016 11:27 AM
    Tuesday, May 24, 2016 11:27 AM

All replies

  • Hi Martin,

    Thank you for your post again.

    Currently, we are not so sure if it is related to template problem.

    From your another post, the problem is about the designer missing, so I suspect the cause of the issue is pending on the VS and the installed tools itself.

    Please follow the steps I mentioned in the another thread to make sure that there is nothing wrong with your VS and the office developments tools.

    Then if the problem about not updating sharepoint item still exists, then we could do the further troubleshooting.

    Best Regards,

     

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, May 24, 2016 8:47 AM
    Moderator
  • Hi Lana,

    Yes, both issues were linked. Everything works now after building a new dev box.

    Regards
    Martin

    • Marked as answer by mmc071dotnet Tuesday, May 24, 2016 11:27 AM
    Tuesday, May 24, 2016 11:27 AM
  • Hi Martin,

    Glad to hear you have had your issue resolved. And thanks for sharing us your solution and result here.

    Have a nice day:)

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Wednesday, May 25, 2016 5:27 AM
    Moderator