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 <ASP:BUTTON>), I get "Error creating Control", "Object reference not set to an instance of an object". This
error only occurs w .NET 4.x. I am able to add controls using 3.5.
Background: I noticed this problem after installing Win 7 SP1. I had fits installing Win 7 SP1. I finally ending up repairing my Win 7 before I could install SP 1. After installing Win 7 SP1, I installed numerous updates to the system.
Then, I discovered that VS 2010 was broken. 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). I repaired VS 2010. I installed Microsoft.NET update NDP40-KB2468871-v2-x86.exe
(before VS 2010 SP1 because it kept hanging SP1). Then, I installed VS 2010 SP1.
Now, the Microsoft.NET Framework 4 has problems. I have reset the Toolbox numerous times (Toolbox | Reset Toolbox) and (Tools | Choose Toolbox Items | Reset). I have the error under Target Frameworks ".NET Framework 4" and ".NET Framework 4 Platform Update
1 (KB2478063)". 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).
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).
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. However, if I select the object (button) in the designer, i can see its Properties (e.g ID) in the Properties
window.
I tried various steps recommended by MS Community support,
here.They have redirected me to the dedicate ASP.NET Forum.
THANKS!
VS 2010 info indicates VS 2010 indicates:
Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel
Installed Version: Professional
Microsoft Office Developer Tools 01018-587-3135277-70019
Microsoft Office Developer Tools
Microsoft Visual Basic 2010 01018-587-3135277-70019
Microsoft Visual Basic 2010
Microsoft Visual C# 2010 01018-587-3135277-70019
Microsoft Visual C# 2010
Microsoft Visual C++ 2010 01018-587-3135277-70019
Microsoft Visual C++ 2010
Microsoft Visual F# 2010 01018-587-3135277-70019
Microsoft Visual F# 2010
Microsoft Visual Studio 2010 Team Explorer 01018-587-3135277-70019
Microsoft Visual Studio 2010 Team Explorer
Microsoft Visual Web Developer 2010 01018-587-3135277-70019
Microsoft Visual Web Developer 2010
Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010
Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2542054) KB2542054
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2542054.
Microsoft Visual Studio 2010 Professional - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.
Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.40219
Microsoft Visual Studio 2010 SharePoint Developer Tools
Update for Microsoft Visual Studio 2010 Professional - ENU (KB2495593) KB2495593
This update is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2495593.
DeadlyDirk
0 Points
1 Post
VS 2010 SP1, ASP.NET Controls - Error Creating (Object reference not set)
Jul 16, 2011 01:02 PM|LINK
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 <ASP:BUTTON>), I get "Error creating Control", "Object reference not set to an instance of an object". This error only occurs w .NET 4.x. I am able to add controls using 3.5.
Background: I noticed this problem after installing Win 7 SP1. I had fits installing Win 7 SP1. I finally ending up repairing my Win 7 before I could install SP 1. After installing Win 7 SP1, I installed numerous updates to the system.
Then, I discovered that VS 2010 was broken. 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). I repaired VS 2010. I installed Microsoft.NET update NDP40-KB2468871-v2-x86.exe (before VS 2010 SP1 because it kept hanging SP1). Then, I installed VS 2010 SP1.
Now, the Microsoft.NET Framework 4 has problems. I have reset the Toolbox numerous times (Toolbox | Reset Toolbox) and (Tools | Choose Toolbox Items | Reset). I have the error under Target Frameworks ".NET Framework 4" and ".NET Framework 4 Platform Update 1 (KB2478063)". 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).
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).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. However, if I select the object (button) in the designer, i can see its Properties (e.g ID) in the Properties window.
I tried various steps recommended by MS Community support, here.They have redirected me to the dedicate ASP.NET Forum.
THANKS!
VS 2010 info indicates VS 2010 indicates:
Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel
Installed Version: Professional
Microsoft Office Developer Tools 01018-587-3135277-70019
Microsoft Office Developer Tools
Microsoft Visual Basic 2010 01018-587-3135277-70019
Microsoft Visual Basic 2010
Microsoft Visual C# 2010 01018-587-3135277-70019
Microsoft Visual C# 2010
Microsoft Visual C++ 2010 01018-587-3135277-70019
Microsoft Visual C++ 2010
Microsoft Visual F# 2010 01018-587-3135277-70019
Microsoft Visual F# 2010
Microsoft Visual Studio 2010 Team Explorer 01018-587-3135277-70019
Microsoft Visual Studio 2010 Team Explorer
Microsoft Visual Web Developer 2010 01018-587-3135277-70019
Microsoft Visual Web Developer 2010
Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010
Hotfix for Microsoft Visual Studio 2010 Professional - ENU (KB2542054) KB2542054
This hotfix is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2542054.
Microsoft Visual Studio 2010 Professional - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.
Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.40219
Microsoft Visual Studio 2010 SharePoint Developer Tools
Update for Microsoft Visual Studio 2010 Professional - ENU (KB2495593) KB2495593
This update is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2495593.
Thanks in advance for your help.
</div>necro_mancer
Star
8169 Points
1595 Posts
Re: VS 2010 SP1, ASP.NET Controls - Error Creating (Object reference not set)
Jul 21, 2011 06:45 AM|LINK
may I know the error message you see on your end?
Professional SQL 2008 R2 Service