Forum » Programiranje » [Visual Studio 2005] problemi z activeX komponento
[Visual Studio 2005] problemi z activeX komponento
ql000 ::
Uporabljam visual studio 2005 in programski jezik C#. Imam aplikacijo, v kateri je neki viewer, ki sem ga uvozil iz activeX komponente. To komponento sem registriral z ukazom (v Run meniju): regsvr32.exe "c:\Program Files\view Scan\viewscan.ocx", potem sem pa še dodal pot do te komponente v path. Hec je bil v tem, da sem dosedaj to activeX komponento uporabljal brez problema. Danes pa pridem na fax, zalaufam projekt v Visual studiu in me pričaka naslednji error:
Could not load file or assembly 'Interop.VIEWSCANLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Hide
at AxVIEWSCANLib.AxViewscan.AttachInterfaces()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
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.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
V čem je finta, če pa lahko normalno prevedem projekt in ga tudi normalno zaženem. Poizkusil sem že vse živo od ponovne registracije te activeX komponente, naknadnega dodajanja dll-ov, ki so del te komponente. Problem je tudi v tem, da ko dodam vse te knjižnjice v projekt, jih visual studio vidi, ampak ne morem pa dodat komponente v toolbox.
Could not load file or assembly 'Interop.VIEWSCANLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Hide
at AxVIEWSCANLib.AxViewscan.AttachInterfaces()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
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.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
V čem je finta, če pa lahko normalno prevedem projekt in ga tudi normalno zaženem. Poizkusil sem že vse živo od ponovne registracije te activeX komponente, naknadnega dodajanja dll-ov, ki so del te komponente. Problem je tudi v tem, da ko dodam vse te knjižnjice v projekt, jih visual studio vidi, ampak ne morem pa dodat komponente v toolbox.
ql000 ::
Da zaključim zgodbo. Očitno ima Visual Studio zanimiv bug. Po tedenskem googlanju, testiranju vseh možnih rešitev ipd. sem našel precej zanimivo rešitev problema. Ko odprem projekt v VS se mi pojavi zgoraj opisan error. Grem v meni Build --> Clean, pa ga ponovno zbildam (zanimiva beseda ne ?). Iz menija File izberem Close Solution, in potem ponovno odprem projekt. In zadeva normalno deluje. Čudna so pota ActiveX komponent.
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | UserControl v Wrappanelu WPFOddelek: Programiranje | 1142 (964) | hurlimannxt |
» | [C#] DeserializacijaOddelek: Programiranje | 1857 (1460) | Cvenemir |
» | [c#] Vprasanje glede BackGroundWorker classa in spreminanja gui elementaOddelek: Programiranje | 784 (710) | Ericssony |
» | null reference exception na čudnem mestu C#Oddelek: Programiranje | 1298 (1235) | krho |
» | VC# Zapis podatkov na diskOddelek: Programiranje | 2496 (1752) | matej_jack |