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!
cheers!!!
P.S:Please do not hesitate to share your comments.

Comments

Popular posts from this blog

Complex Query in QueryExpression in Microsoft CRM 2011

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Microsoft Power Apps Portal integration with Dynamics 365 CE On-Premise - Step By Step Guide