0
votes

If i click to Form1.cs in windows form , i get below exception,

To prevent possible data loss before loading the designer , the following errors must be resolved:

Loading this assembly would produce a different grant set from other instances.(Exception from HRESULT 0x80131401)

Could not find type 'Gizmox.WebGUI.Forms.Form'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

Call Stack :

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

Any help will be greatly appreciated.

Thanks.

3
did you try with a brand new simple fresh project? do you get the same error?Ahmed ilyas
What controls do you have in your form? Native controls only?Sandeep Singh Rawat
in which case, seems that your visual studio could be corrupted. did you also try with a new ASP.NET project?Ahmed ilyas
See if this is the problem support.microsoft.com/kb/2282372Sandeep Singh Rawat
It should tell you which line the problem isSriram Sakthivel

3 Answers

0
votes

this is your problem, your 3rd party component:

'Gizmox.WebGUI.Forms.Form'

uninstall it and reinstall it. one way or another, this component is the culprit

0
votes

From this error: ... for your current platform or Any CPU.

Your project and Gizmox.WebGUI project library probably have been compiled with different platform setting, x86, Any CPU, Mixed Platform or x64.

Whatever it is make sure all projects have the same platform settings. Click Menu: Build > Configuration Manager and set all to the same platform. If Gizmo is already compiled and only as reference then find the platform it was built.

Compile all, close designer and open again.

-1
votes

Since OP prolly isn't still worrying about this, i will give my fix for all of the googlers.

I mainly got this error after deleting something like this from my code:

private void button1_Click(object sender, EventArgs e){
...}

And it would get all mad, because in the Form1.Designer.cs it would have something like this:

this.button1.Click += new System.EventHandler(this.button1_Click);

All it takes to fix this error(at least when i encounter it), is to delete the line from Form1.Designer.cs