2

I have a new installation of VS2015 (update 2) and the most up to date version of office developer tools installed (not the preview version). When I try to create a new SharePoint Add-in (SharePoint-Hosted, SharePoint Online) I receive the following error:

Unhandled exception occurred while calling method 'ProjectEvents_Initialized' of type 'Microsoft.VisualStudio.SharePoint.AppManifestRefactoring, Microsoft.VisualStudio.SharePoint.Project, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Exception: System.NullReferenceException. Message: Object reference not set to an instance of an object.

This error is shown after the following message in the output window:

"Added Images to Feature1"

In some cases, I am able to publish the add-in (blank add-in, without making any changes to the created project) but none of the designer views work (app manifest designer/package designer/feature designer, etc/). In some cases it fails to publish with the following message (showing the correct path to the package file):

"Error: Failed to resolve the reference for the package file C:\bla\bla\bla\Package\Package.package."

Anyone know what can cause this behavior and how to fix this?

1

I had this issue while trying to create SharePoint 2016 add-ins using VS 2015 professional. This happened since the office developer tool targeted to a SharePoint version different to the one installed.

In the Default.aspx in the app, the assembly versions might be 14.0.0.0 or 15.0.0.0 (since it was 15.0.0.0 and should target to 16.0.0.0 in my case).

Upon research, the solution that worked for me is as follows:

  1. Uninstall the Office developer tools for VS 2015 (which came with the VS 2015 installation).
  2. Restart the Server.
  3. Download and install the Microsoft Office Developer Tools Preview 2 for Visual Studio 2015. (https://www.microsoft.com/en-us/download/details.aspx?id=51683).

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.