Type AxAXISMEDIACONTROLLib.AxAxisMediaControl is not defined

0

I have had a project in VisualBasic.NET to take a look and when I open it and try to compile it, I miss the error:

Type AxAXISMEDIACONTROLLib.AxAxisMediaControl is not defined

It tells me that it is on line 1 of Designer.vb

However, I go to that line and there is no error in it, in fact, the error it indicates does not seem to make much sense because in the code it recognizes me that it is defined since I can do F12

 Private Sub InitializeComponent()
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
    Me.Button1 = New System.Windows.Forms.Button
    Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown
    Me.Button2 = New System.Windows.Forms.Button
    Me.Button3 = New System.Windows.Forms.Button
    Me.AxAxisMediaControl1 = New AxAXISMEDIACONTROLLib.AxAxisMediaControl
....

when doing F12 I get the properties and others ...

Imports System
Imports System.ComponentModel
Imports System.Runtime.InteropServices
Imports System.Windows.Forms

Namespace AxAXISMEDIACONTROLLib
    <AxHost.Clsid("{7458o5c8-d0e1-8927-8586-624c14o10a8d}")> <DefaultEvent("OnError")> <DesignTimeVisible(True)>
    Public Class AxAxisMediaControl
        Inherits AxHost

    Public Sub New()

    <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> <DispId(60)>
    Public Overridable Property AudioConfigURL As String
    <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> <DispId(63)>
    Public Overridable Property AudioFile As String
    <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> <DispId(163)>
    Public Overridable Property AudioOnlyRTPDelay As Integer
    <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> <DispId(61)>
    Public Overridable Property AudioReceiveURL As String
    <DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> <DispId(64)>
    Public Overridable Property AudioTransmitMute As Boolean

Edit: When I open the screen I get these two errors:

1.   Hide Call Stack 


at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
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.PerformAdd(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)  

and

2.   Hide Call Stack 

at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c)

    
asked by U. Busto 04.07.2017 в 12:46
source

1 answer

0

Finally I have managed to solve the problem. It turns out that the error Visual Studio shows is not descriptive at all and in my case the problem was that the Target Framework of one of the projects was 2.0 when referring to a .dll that was compiled in 4.0 Thank you all for the help.

    
answered by 12.07.2017 / 15:09
source