1

I am attempting to deploy a Visual Web Part (Sandbox Solution) and I am receiving following error:

The name 'InitializeControl' does not exist in the current context".

I was able to deploy a test Visual Web Part with minimal code, however, this solution is not able to build.

I found that the solutions builds before the following:

  1. Add <%@ Register TagPrefix="WebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Localizable="False" %>

  2. Add any <SharePoint:ScriptLink> or <SharePoint:CssLink> attributes in the user control.

Once they are added, the error displays.

In order to deploy, I used the following approach:

Publish solution to the SharePoint Online site

This is after adding the web part to the project, and attempting to build. I've Google'd the error message, and the results are limited.

Please help with any suggestions

Your Answer

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

Browse other questions tagged or ask your own question.