Not able to edit SharePoint project solution .app packaging without Visual Studio IDE and it is making difficult to reach-out the solution to client Production environment

S.P Singh 1 Reputation point
2022-03-09T09:55:08.807+00:00

Environment: -

OS: - Windows 10

IDE: - VS 2019

Error Type: - Packaging the software without VS 2019

Project Type: For SharePoint Online with C#

Priority: - Critical

Description: We have developed Remote Event Receiver for the document library using Visual Studio 2019 IDE and that creates two project (<Project Name>App and <Project Name>Web).

Web project creates a package which publish over the IIS server and that we deployed manually and whatever changes needs to be done on Web.config for interacting SharePoint Online, we easily update and it works fine.

App project creates .app solution where some parameters are dynamic, for reference

  • AppManifest.xml:

<StartPage><Protocol://><Domain Name>/Pages/Default.aspx?{StandardTokens}</StartPage>
<InstalledEventEndpoint><Protocol://><Domain Name>/Services/AppEventReceiver.svc</InstalledEventEndpoint> <UninstallingEventEndpoint><Protocol://><Domain Name>/Services/AppEventReceiver.svc</UninstallingEventEndpoint>

<AppPrincipal>
<RemoteWebApplication ClientId="<Client ID>" />
</AppPrincipal>

  • REReceiverService\Elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers>
<Receiver>
<Name>REReceiverServiceItemFileMoving</Name>
<Type>ItemFileMoving</Type>
<Url><Protocol://><Domain Name>/Services/REReceiverService.svc</Url>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
<Receiver>
<Name>REReceiverServiceItemUpdating</Name>
<Type>ItemUpdating</Type>
<Url><Protocol://><Domain Name>/Services/REReceiverService.svc</Url>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>

So, for the .app packaging following parameters <Protocol://><Domain Name> and Client ID are dynamic. In Visual Studio, we change the parameters and get the required package.

But when we are planning the same for the production, we are stuck and not finding any solution to provide the client, because we don't know how client will change <Protocol://><Domain Name> and Client ID in a .app file or how will they get the build i.e. .app package post changing the required parameters without Visual Studio IDE.

  • Kindly guide as we need some expertise suggestion to fix it. I will be really thankful.

Note: - Manually we tried 7 zip to edit the required files in .app solution, but that is also not working because Elements.xml is in read only mode.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,657 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 30,906 Reputation points Microsoft Vendor
    2022-03-10T02:11:21.54+00:00

    Hi @S.P Singh ,
    As far as I known, we can only modify SharePoint project solution in Visual Studio. Visual Studio provides Packaging tools such as Package Designer and Packaging Explorer. By using the Package Designer, you can create and customize deployment packages. Alternatively, you can use the Packaging Explorer to modify the Features and items in your package file (.wsp). For more information, you can refer to following document
    https://learn.microsoft.com/en-us/visualstudio/sharepoint/creating-sharepoint-solution-packages?view=vs-2022


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. S.P Singh 1 Reputation point
    2022-03-29T10:49:29.45+00:00

    Yes, we have achieved with an independent and optimized way, as our solution was deployed over the IIS we used makecab command to repackage the .wsp solution and rest of that was normal zip handling to edit other file information move wsp to app solution.

    It is worked for us.