Microsoft Visual Studio gives an error while loading form in design time

if you are facing an error :
"One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes"
while Microsoft Visual Studio loading the form in Design Time. You have to initialize all properties which belong to form.You will probably get "object reference not set to an instance of an object" in the details of the error.

Please Initialize all objects with "new" keyword or set them existance once. If you do not know main responsible of causing this error.Please follow the below to ask Visual Studio.

  1. Open a new Visual Studio instance.
  2. Open any source file. This is required to see Debug menu so that Visual Studio lets you attach to a process.
  3. Attach the old Visual Studio instance to the newest one. The Visual Studio process is called devenv.exe with the name of loaded project. You only need to attach to managed code. Set Visual Studio to break on Common Language Runtime exceptions - Thrown and User-handled via Debug > Exceptions
  4. Close the problematic form, and reopen it.
  5. This should result in an exception caught inside your code in the second instance of Visual Studio!
P.S:Please do not hesitate to share your comments.


Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in