VS2005 cannot find project in solution when opening designer

G

Gary Marshall

Hi

We have three developers working on a project in Visual Studio 2005 SP
1. Two of the developers are not experiencing the following problem.
The other one has the situation below:

The solution contains a number of projects, three of which seem to be
involved in the problem we are experiencing:

Solution
\--- Project Network
\--- Project BaseClasses
\--- Project Implementation

BaseClasses references on Network. Implementation references Network
and BaseClasses. All references are set up as project references.

Implementation has forms that inherit from a standard form design in
defined BaseClasses.

When the forms are opened on the computer that exhibits the problem,
the following message appears:

- beginning of error message -
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.

Could not load file or assembly 'Network, Version=1.0.2965.18149,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.

at System.Signature._GetSignature(SignatureStruct& signature, Void*
pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle,
IntPtr declaringTypeHandle)
at System.Signature.GetSignature(SignatureStruct& signature, Void*
pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle,
RuntimeMethodHandle methodHandle, RuntimeTypeHandle
declaringTypeHandle)
at System.Signature..ctor(RuntimeMethodHandle methodHandle,
RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RuntimeConstructorInfo.get_Signature()
at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
at System.RuntimeType.FilterApplyMethodBaseInfo(MethodBase methodBase,
BindingFlags bindingFlags, CallingConventions callConv, Type[]
argumentTypes)
at System.RuntimeType.GetConstructorCandidates(String name,
BindingFlags bindingAttr, CallingConventions callConv, Type[] types,
Boolean allowPrefixLookup)
at System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr,
Binder binder, CallingConventions callConvention, Type[] types,
ParameterModifier[] modifiers)
at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder,
Type[] types, ParameterModifier[] modifiers)
at System.ComponentModel.Design.DesignSurface.CreateInstance(Type
type)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateInstance(Type
type)
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type
componentType, String name)
at
System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type
type, ICollection arguments, String name, Boolean addToContainer)
at
System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type
type, ICollection arguments, String name, Boolean addToContainer)
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)
- end of error message -

We have tried:
- rebuilding the solution
- creating the inherited forms on the machine exhibiting the problem
- creating the inherited forms on the working machines
- removing and re-adding the references
- setting the project reference "Copy Local" setting to both True and
False

In all cases, the solution builds correctly and runs without problem,
but the designer fails to open the forms. If the inheritance is
removed from the forms, everything works correctly. The base form can
be opened without a problem in the designer.

The base form class has methods that make use of classes defined in
Network, but there are no design components that make use of classes
in Network.

Network is a managed C++ project (compiled with /clr). BaseClasses and
Implementation are both C# projects.

What should we be trying next to resolve this problem?

Regards
Gareth Marshall
 
F

Fredo

How are the projects referenced in relationship to each other when you add a
reference from one project into another?

The best way to do it for projects in the same solution is to right-click on
the "References" folder in Solution Explorer, click Add Reference, and then
go to the Projects Page.

The error your getting makes me think that someone did it from the Browse
page and refereneced the built DLL. This can lead to problems, particularly
when you get more than 2 projects involved.

Gary Marshall said:
Hi

We have three developers working on a project in Visual Studio 2005 SP
1. Two of the developers are not experiencing the following problem.
The other one has the situation below:

The solution contains a number of projects, three of which seem to be
involved in the problem we are experiencing:

Solution
\--- Project Network
\--- Project BaseClasses
\--- Project Implementation

BaseClasses references on Network. Implementation references Network
and BaseClasses. All references are set up as project references.

Implementation has forms that inherit from a standard form design in
defined BaseClasses.

When the forms are opened on the computer that exhibits the problem,
the following message appears:

- beginning of error message -
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.

Could not load file or assembly 'Network, Version=1.0.2965.18149,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.

at System.Signature._GetSignature(SignatureStruct& signature, Void*
pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle,
IntPtr declaringTypeHandle)
at System.Signature.GetSignature(SignatureStruct& signature, Void*
pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle,
RuntimeMethodHandle methodHandle, RuntimeTypeHandle
declaringTypeHandle)
at System.Signature..ctor(RuntimeMethodHandle methodHandle,
RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RuntimeConstructorInfo.get_Signature()
at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
at System.RuntimeType.FilterApplyMethodBaseInfo(MethodBase methodBase,
BindingFlags bindingFlags, CallingConventions callConv, Type[]
argumentTypes)
at System.RuntimeType.GetConstructorCandidates(String name,
BindingFlags bindingAttr, CallingConventions callConv, Type[] types,
Boolean allowPrefixLookup)
at System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr,
Binder binder, CallingConventions callConvention, Type[] types,
ParameterModifier[] modifiers)
at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder,
Type[] types, ParameterModifier[] modifiers)
at System.ComponentModel.Design.DesignSurface.CreateInstance(Type
type)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateInstance(Type
type)
at
System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type
componentType, String name)
at
System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type
type, ICollection arguments, String name, Boolean addToContainer)
at
System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type
type, ICollection arguments, String name, Boolean addToContainer)
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)
- end of error message -

We have tried:
- rebuilding the solution
- creating the inherited forms on the machine exhibiting the problem
- creating the inherited forms on the working machines
- removing and re-adding the references
- setting the project reference "Copy Local" setting to both True and
False

In all cases, the solution builds correctly and runs without problem,
but the designer fails to open the forms. If the inheritance is
removed from the forms, everything works correctly. The base form can
be opened without a problem in the designer.

The base form class has methods that make use of classes defined in
Network, but there are no design components that make use of classes
in Network.

Network is a managed C++ project (compiled with /clr). BaseClasses and
Implementation are both C# projects.

What should we be trying next to resolve this problem?

Regards
Gareth Marshall
 
G

Gary Marshall

Hi

How are the projects referenced in relationship to each other when you add a
reference from one project into another?

The best way to do it for projects in the same solution is to right-click on
the "References" folder in Solution Explorer, click Add Reference, and then
go to the Projects Page.

The error your getting makes me think that someone did it from the Browse
page and refereneced the built DLL. This can lead to problems, particularly
when you get more than 2 projects involved.

It's hard to say how they were added, given that we have a number of
people working on the projects. I have removed all the relevant
references and added them again, but the problem is still happening.
 
R

Ramki

HI Gary,

Am also getting the same problem while viewing the designer of the
windows form (UI project in C#)

C# project has references to wrapper class(to contact with C++
classes).

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.

Could not load file or assembly Wrappers.CLI, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
Hide

at BaseClass..ctor()

The reference had been added through project browse folder only.

Thanks and Regards,
Ramki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top