Hi Ian,
It was a case of RTFM on my side. I played with the VSCONV.XSLT which doesn't generate the imports. Then I copied the lines from the project files ... with a vb background case sensitive stuff gets me quite often off guard. With the hints from the list I figured it out.
The other error: Once I included both AxInterop.... and Interop... it worked. So thx a lot for the help.
One caveat: when you generate Interop code with AXIMP you need to omit the output file in order to get both (the Interop... and the AxInterop) files. Nant doesn't support that yet. Also it is not named like in VS AxInterop.myoxc.dll and Interop.myocx.dll but myocx.dll and Acmyoxc.dll. The later is just a rename task. For the first I run exec:
<exec program="aximp">
<arg value="C:\WINDOWS\system32\wmp.dll"/>
<arg value="/keyfile:mykey.snk"/>
</exec>
<move todir="build/${configuration}/client">
<fileset>
<include name="*.dll"/>
</fileset>
</move>
Thx for the help!
:-) stw
Ian MacLean <[EMAIL PROTECTED]> wrote on 20/02/2005 19:32:56:
> [EMAIL PROTECTED] wrote:
>
> >
> > Hi there,
> > I'm trying to get VBC working with my project. I use heavily COM
> > interop. I'm using nant-0.85-rc2.
> > This is my vbc task:
>
> [snip]
>
> >
> > When I run the task the resources get created and then I get tons of:
> > error BC30002: Type 'xxx' is not defined.
> >
> > What puzzles me if I look at xxx they are all core classes:
> > EventArgs, Exception, IComparable, Hashtable, Now, Val, Right, Int,
> > Xml.Serialization.XmlSerializer, IIf, Format, vbCrLf
> >
> maybe you need an imports node :
> <imports>
> <import namespace="Microsoft.VisualBasic" />
> <import namespace="System" />
> <import namespace="System.Collections" />
> <import namespace="System.Data" />
> <import namespace="System.Diagnostics" />
> <import namespace="System.Drawing" />
> <import namespace="System.Windows.Forms" />
> </imports>
>
> > In addition I get
> > error BC30466: Namespace or type 'Interop' for the Imports
> > 'AxMicrosoft.MediaPlayer.Interop' cannot be found.
> > [vbc]
> > [vbc] Imports AxMicrosoft.MediaPlayer.Interop
> > [vbc] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > despidte i put the include there: include
> > name="bin/AxInterop.AxWMPLib.dll
> >
>
> can you check the namespace in AxInterop.AxWMPLib.dll with ildasm to
> verify that it is actually " AxMicrosoft.MediaPlayer.Interop" ?
>
> Ian
>