> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Castro, Edwin Gabriel (Firing Systems Engr.) > Sent: vrijdag 12 november 2004 19:35 > To: Gert Driesen; Nicklas Norling; > [EMAIL PROTECTED] > Subject: RE: [nant-dev] <solution> changes > > Hi Gert, > > I downloaded today's nightly build (2004-11-12) and tried it under my > setup. I'm not getting the UnathorizedAccessException anymore but the > problem with arrays is still there. The fix should be easy: set the > sysarray attribute of <tlbimp> to true. If I create the ComInterop > assemblies by hand I need to set sysarray to true to get equivalent > assemblies to the ones VS.NET creates. > > Here follows a quote from "COM Programming with Microsoft > .NET" page 59: > > [quote] > To generate an RCW in the same way that Visual Studio .NET does, use > TlbImp with the following options: > > tlbimp libname.ext /out:Interop.libname.dll > /namespace:libname /sysarray > [/quote] > > RCW => Runtime Callable Wrapper
I fixed this (in cvs). It will be available in the next nightly build. > In my case some of my typelibs the filename doesn't match the > libname so > I needed to do some complicated bits to find the correct namespace. I > needed to find the library name of the typelib and use that as libname > above. In reality it looks more like this: > > tlbimp typelib.ext /out:Interop.libname.dll > /namespace:libname /sysarray > > where typelib.ext is the filename of the typelib and libname is the > library name for the typelib. I can't remember off the top of my head > how to determine that library name since it was a bit > complicated but I > can look it up if you are interested in knowing! If you're interested in getting this fixed, let me know ;-) I still can't get your repro to compile. I now get the following errors : d:\nant-com-bug\TestSuite\SimpleLibTests\WorkerTest.cs(33,4): error CS0234: The type or namespace name 'SetMultiplier' does not exist in the class o r namespace 'Util' (are you missing an assembly reference?) d:\nant-com-bug\TestSuite\SimpleLibTests\WorkerTest.cs(41,4): error CS0234: The type or namespace name 'ReleaseComObject' does not exist in the clas s or namespace 'Util' (are you missing an assembly reference?) Any idea what might be causing this ? Everything seems to work fine in VS.NET, but I can get it to build using either NAnt or csc directly ... I've cut it down to the following response file (but still get the same errors) : /target:library /define:DEBUG;TRACE /r:"D:\nant-com-bug\TestSuite\build\Interop.SimpleLib.dll" /r:"D:\nant-com-bug\TestSuite\build\Utilities.dll" /r:"C:\Program Files\NUnit 2.2\bin\nunit.framework.dll" "D:\nant-com-bug\TestSuite\SimpleLibTests\AssemblyInfo.cs" "D:\nant-com-bug\TestSuite\SimpleLibTests\WorkerTest.cs" And the Utilities.dll assembly definitely contains a Utilities.Util class ... Weird ! Gert ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
