VS Power Tools for SharePoint - InitializeControl does not exist in the current context
-
22-10-2019 - |
Question
I don't think this qualifies as a 3rd party product, so I'm posting here.
I have a clean VM with VS2010 SP1 installed. I then installed the VS Power Tools for SharePoint. I'm attempting to create a Visual Web Part (Sandboxed Solution), but I keep running in to an error.
The name 'InitalizeControl' does not exist in the current context
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. I found Waldek's post here , but the situation of the length of text is not my problem. I haven't entered any text in yet .
I also noticed that a designer file isn't being generated (ascx.g.cs
). I think it's supposed to be there.
Solution
This was a brand new VM that I began using. The issue was with permissions. My local user account did not have permissions to the Content Database for the site I was trying to connect to. Once I granted db_owner
permissions, I was able to validate the address, and my designer file was generated.