Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'xxxx' or one of its dependencies. The system cannot find the file specified

Inside VS2005, our whole programming staff gets this error message sporadically and it is always on the BeneControls project. This error message happens multiple times a day and it occurs when going into DESIGN mode for a control. Normally rebuilding the BeneControls fixes the problem but somtime the whole solution has to be rebuilt.

Has anyone else solved this problem yet?

Any recommendations or web sites that outlines what needs to be done?

Sometimes I just wish MS would add a rebuild button to the error message screen.

We are using Visual Studio 2005, VB.NET and DevExpress Controls.

Here is the whole 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 'BeneControls, Version=1.0.3289.23008, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    Hide     

    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(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
    at System.Reflection.RtFieldInfo.get_FieldType()
    at System.ComponentModel.Design.InheritanceService.AddInheritedComponents(Type type, IComponent component, IContainer container)
    at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
    at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
    at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
    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 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host) 

Thanks in advance, Gerhard

like image 669
Gerhard Weiss Avatar asked Jan 02 '09 20:01

Gerhard Weiss


People also ask

Could not load file or assembly * * * DLL or one of its dependencies?

There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.

Could not load file or assembly system Cannot find file specified?

For the alert error ("The system cannot find the file specified.") Right click on [Solution Program name] then select Build Dependencies> & left click on Build Customizations... then true-checkbox {MASM} then click OK button.

Could not load file or assembly Sim or one of its dependencies An attempt was made to load a program with an incorrect format?

“An attempt was made to load a program with an incorrect format.” That means that the assembly, which was to be loaded, was in an unexpected format. The format, in this case, refers most likely to the 64-bit build of an application being deployed to IIS, which is being run in 32-bits.


1 Answers

Version=1.0.3289.23008 - that tells me you version number is constantly changing, have you thought about fixing on a version number during development?

On AssemblyInfo.vb:

Currently it is set to increment:

[assembly: AssemblyVersion("1.0.*.*")]

Change to:

[assembly: AssemblyVersion("1.0.0.0")]

And you have it in a fixed version.

like image 75
Otávio Décio Avatar answered Oct 05 '22 16:10

Otávio Décio