1

I cannot find anywhere to specify what site to connect to when creating a new app for SharePoint online.

It seems to default to https://mysite.sharepoint.com, however, I want to retrieve lists from e.g. https://mysite.sharepoint.com/sites/site1.

I tried changing the Site URL property for the project, but I get an error when Visual Studio is uninstalling the app (Error occurred in deployment step 'Uninstall app for SharePoint': Value cannot be null. Parameter name: AppSiteDomainPrefix).

0

I'm not sure exactly what you're asking about, programmatically reading lists on a different site, or deploying a project to a different site. The site url property for the project would be for deployment, but you cannot deploy to just any site, it has to be a site based on the development template, or one that allows sideloading of apps, which is not on by default. So, build the app on a test site, then deploy it to the app catalog, and then you can install it on any other site you want.

0

Not sure if this was the solution you had but for anyone else who comes here via a search engine for the error AppSiteDomainPrefix, this error seems to be quite misleading in that all the issue is is Visual Studio has had an issue installing/uninstalling the current app and you just need to manually uninstall the app from the site before hitting F5 in Visual Studio again.

I hit this error when I switched the URL to deploy to from Visual Studio (like Jocke) and got the standard sideloading of apps error. Silly me. So I ran the script to enable sideloading of apps, hit F5 again and got the error in this question (Error occurred in deployment step 'Uninstall app for SharePoint': Value cannot be null. Parameter name: AppSiteDomainPrefix).

It turned out although I'd had the sideloading error the app had been installed in some way, so had to be manually deleted first from site contents as per this blog post. Hitting F5 now allows the app to successfully installed to the site collection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.