Formview options disappear in code behind Visual Studio 2010

0

I have several .aspx Web sites created with Visual Studio 2010. I recently updated them from .net3.5 framework to .net4.0. I installed NuGet Package Manager to install the app_browsersUpdate package so the sites would work properly in IE10. Web sites connect to various internal SQL databases.

Since the update (I believe, alas it could be some other cause), I am unable to use new references to Formview controls in code behind. (I use VB). For example, I have a Web page containing Formview1. In the code behind page, in the dropdown at the top of the page, there lists General, the the name of the Web page, then Page Events. There is no longer any reference to Formview1 (or any other controls I added, like Gridviews). This is universal to all Web sites I open in Visual Studio 2010. If I manually add the Sub with, for example, FormView1_ItemUpdated, it causes an error at run time.

I also have a copy of Visual Studio Express 2013 for Web that I can use. The Web pages work fine in that version. I can see and reference Formview1, etc, without issue. What happened to Visual Studio 2010?


I haven't resolved the issue, but do have additional info. I found some of my Web sites work fine. The difference in the problem sites seems to be an error in the aspx page line, starting with <%@ Page Title = ...

On the problem page, the Page line is underlined with the following error: C:\mylocalpath\page.aspx: ASP.NET runtime error: The pre-application start initialization method preApplicationStart on type Microsoft.VisualStudio.WebPageInspector.Runtime.Loader.RuntimeLoader threw an exception with the following error message: Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=14.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7fl1d50a3a' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A).

So far researching that error has not given me a clear path to fix. I will update if I find an answer. The structure of that line is the same as the Web sites that are working normally.

asp.net
vb.net
visual-studio-2010
asked on Stack Overflow Feb 29, 2016 by Scott P • edited Mar 2, 2016 by Scott P

1 Answer

0

Finally figured it out. In the problem Web sites, I have a line in the web.config file for a local domain account. . I added that account as a local admin account on the PC I was using Visual Studio on. Once I added that account, all back to normal.

answered on Stack Overflow Mar 2, 2016 by Scott P

User contributions licensed under CC BY-SA 3.0