VS 2010 SP1, ASP.NET Controls - Error Creating (Object reference not set)http://forums.asp.net/t/1700547.aspx/1?VS+2010+SP1+ASP+NET+Controls+Error+Creating+Object+reference+not+set+Thu, 21 Jul 2011 06:45:18 -040017005474510204http://forums.asp.net/p/1700547/4510204.aspx/1?VS+2010+SP1+ASP+NET+Controls+Error+Creating+Object+reference+not+set+VS 2010 SP1, ASP.NET Controls - Error Creating (Object reference not set) &lt;div&gt; <p>Using VS 2010 SP1, I am unable to add controls from the ASP.NET Toolbox to a web form using Microsoft.NET 4.x. When I add a standard control (e.g &lt;ASP:BUTTON&gt;), I get &quot;Error creating Control&quot;, &quot;Object reference not set to an instance of an object&quot;. This error only occurs w .NET 4.x.&nbsp; I am able to add controls using 3.5.</p> <p>Background: I noticed this problem after installing Win 7 SP1.&nbsp; I had fits installing Win 7 SP1. I finally ending up repairing my Win 7 before I could install SP 1.&nbsp; After installing Win 7 SP1, I installed numerous updates to the system.</p> <p>Then, I discovered that VS 2010 was broken.&nbsp; I finally installed VS 2010 SP1, after failing (many times). To succeed, I performed a total uninstall of VS 2010 (using VS2010_Uninstall-RTM.ENU.exe).&nbsp; I repaired VS 2010. I installed Microsoft.NET update NDP40-KB2468871-v2-x86.exe (before VS 2010 SP1 because it kept hanging SP1).&nbsp; Then, I installed VS 2010 SP1.</p> <p>Now, the Microsoft.NET Framework 4 has problems.&nbsp; I have reset the Toolbox numerous times (Toolbox | Reset Toolbox) and (Tools | Choose Toolbox Items | Reset). I have the error under Target Frameworks &quot;.NET Framework 4&quot; and &quot;.NET Framework 4 Platform Update 1 (KB2478063)&quot;.&nbsp; Under Framework 4, web controls are version 4.0.0.0 (and 4.0.1.0 under Update 1). (Choose Toolbox items indicates that the toolbox items point to the GAC).</p> Under 3.5, if I add a button control, VS adds an assembly reference to web.config; and I can see the referenced object in the Object Browser (browsing the solution).&nbsp; <p>Under 4.x, if I add a button control, VS adds NO assembly reference to web.config; and I CANNOT see the referenced object in the Object Browser.&nbsp; However, if I select the object (button) in the designer, i can see its Properties (e.g ID) in the Properties window.</p> <p>I tried various steps recommended by MS Community support, <a href="http://social.msdn.microsoft.com/Forums/en-US/Offtopic/thread/aaeb16d8-f638-47a7-afca-731964cfedce"> here</a>.They have redirected me to the dedicate ASP.NET Forum.</p> <p>THANKS!</p> <p>VS 2010 info indicates VS 2010 indicates:</p> <p>Microsoft Visual Studio 2010<br> Version 10.0.40219.1 SP1Rel<br> Microsoft .NET Framework<br> Version 4.0.30319 SP1Rel<br> <br> Installed Version: Professional<br> <br> Microsoft Office Developer Tools&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Office Developer Tools<br> <br> Microsoft Visual Basic 2010&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual Basic 2010<br> <br> Microsoft Visual C# 2010&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual C# 2010<br> <br> Microsoft Visual C&#43;&#43; 2010&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual C&#43;&#43; 2010<br> <br> Microsoft Visual F# 2010&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual F# 2010<br> <br> Microsoft Visual Studio 2010 Team Explorer&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual Studio 2010 Team Explorer<br> <br> Microsoft Visual Web Developer 2010&nbsp;&nbsp; 01018-587-3135277-70019<br> Microsoft Visual Web Developer 2010<br> <br> Crystal Reports Templates for Microsoft Visual Studio 2010&nbsp;&nbsp; <br> Crystal Reports Templates for Microsoft Visual Studio 2010<br> <br> Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2542054)&nbsp;&nbsp; KB2542054<br> This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.<br> If you later install a more recent service pack, this hotfix will be uninstalled automatically.<br> For more information, visit http://support.microsoft.com/kb/2542054.<br> <br> Microsoft Visual Studio 2010 Professional - ENU Service Pack 1 (KB983509)&nbsp;&nbsp; KB983509<br> This service pack is for Microsoft Visual Studio 2010 Professional - ENU.<br> If you later install a more recent service pack, this service pack will be uninstalled automatically.<br> For more information, visit http://support.microsoft.com/kb/983509.<br> <br> Microsoft Visual Studio 2010 SharePoint Developer Tools&nbsp;&nbsp; 10.0.40219<br> Microsoft Visual Studio 2010 SharePoint Developer Tools<br> <br> Update for Microsoft Visual Studio 2010 Professional - ENU (KB2495593)&nbsp;&nbsp; KB2495593<br> This update is for Microsoft Visual Studio 2010 Professional - ENU.<br> If you later install a more recent service pack, this update will be uninstalled automatically.<br> For more information, visit http://support.microsoft.com/kb/2495593.</p> <p>Thanks in advance for your help.</p> &lt;/div&gt; 2011-07-16T13:02:00-04:004517512http://forums.asp.net/p/1700547/4517512.aspx/1?Re+VS+2010+SP1+ASP+NET+Controls+Error+Creating+Object+reference+not+set+Re: VS 2010 SP1, ASP.NET Controls - Error Creating (Object reference not set) <p>may I know the error message you see on your end?</p> 2011-07-21T06:45:18-04:00