J
Jack Jackson
This is driving me crazy and I am stuck. I'm using VS2005 and VB.
I have four projects, each of which creates a .dll.
Proj1 has no project references.
Proj2 has a project reference to Proj1.
Proj3 has a project reference to Proj2 and Proj1.
Proj4 has a project referecne to Proj3, Proj2 and Proj1.
Proj4 contains a class Class1 derived from System.Windows.Forms.Form,
and another class Class2 derived from Class1.
Proj5 creates an .exe. It has a form inherited from Class2.
Originally all projects had the default version of 1.0.0.0, and
everything worked fine.
I then changed the version of Proj1 to 1.0.0.* and rebuilt everything.
While the .exe runs fine, I can't view the design view of any class
that is derived from Class2. The error I get is below at the bottom
of the post. Closing VisualStudio doesn't help.
If I change the version of Proj1 back to 1.0.0.0, everything again
works fine. The same thing happens if I change the version of Proj2,
Proj3 or Proj4.
In addition, if I create a new project, add Proj1, Proj2, Proj3 and
Proj4 as references and try to add a class based on an inherited form,
I get an error message box:
"Unable to load assembly xxx. Ensure that the file is a valid .NET
Framework Assembly."
for each of Proj2, Proj3 and Proj4.
For some reason the IDE can't load classes from anything that depends
on Proj1 once its version is changed, yet everything works fine at
runtime.
I am at my wit's end with this. Any ideas?
The IDE gives this error when I try to view the Design view of any
class derived from Proj4's Class2:
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.
The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the
following classes in the file: Proj4 --- The base class
'ZForms.Class1' could not be loaded. Ensure the assembly has been
referenced and that all projects have been built.
Hide
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost
host)
I have four projects, each of which creates a .dll.
Proj1 has no project references.
Proj2 has a project reference to Proj1.
Proj3 has a project reference to Proj2 and Proj1.
Proj4 has a project referecne to Proj3, Proj2 and Proj1.
Proj4 contains a class Class1 derived from System.Windows.Forms.Form,
and another class Class2 derived from Class1.
Proj5 creates an .exe. It has a form inherited from Class2.
Originally all projects had the default version of 1.0.0.0, and
everything worked fine.
I then changed the version of Proj1 to 1.0.0.* and rebuilt everything.
While the .exe runs fine, I can't view the design view of any class
that is derived from Class2. The error I get is below at the bottom
of the post. Closing VisualStudio doesn't help.
If I change the version of Proj1 back to 1.0.0.0, everything again
works fine. The same thing happens if I change the version of Proj2,
Proj3 or Proj4.
In addition, if I create a new project, add Proj1, Proj2, Proj3 and
Proj4 as references and try to add a class based on an inherited form,
I get an error message box:
"Unable to load assembly xxx. Ensure that the file is a valid .NET
Framework Assembly."
for each of Proj2, Proj3 and Proj4.
For some reason the IDE can't load classes from anything that depends
on Proj1 once its version is changed, yet everything works fine at
runtime.
I am at my wit's end with this. Any ideas?
The IDE gives this error when I try to view the Design view of any
class derived from Proj4's Class2:
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.
The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the
following classes in the file: Proj4 --- The base class
'ZForms.Class1' could not be loaded. Ensure the assembly has been
referenced and that all projects have been built.
Hide
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost
host)