> -----Original Message----- > From: Gert Driesen [mailto:[EMAIL PROTECTED] > Sent: Friday, November 12, 2004 11:13 AM > To: Castro, Edwin Gabriel (Firing Systems Engr.); 'Nicklas Norling'; nant- > [EMAIL PROTECTED] > Subject: RE: [nant-dev] <solution> changes > > > > > -----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.
Thanks! > > > 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 don't know yet if this is a problem in NAnt. Once I can compile projects that use some of those cominterops that fit the bill I'll check what NAnt does. > > 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 When I tried compiling earlier today I received those two errors too! I honestly can't say why that's happening. I'll see if I can figure out what's going on over the weekend. I'll report back when I get an answer. I expect that other users have tried to reference another assembly in the same solution as here before and I assume that it has been working so far. I bet there's some funny configuration problem with my stuff... I wonder if it has something to do with the fact that Utilities.dll references Interop.SimpleLib.dll and SimpleLibTests.dll wants to reference both Utilities.dll and Interop.SimpleLib.dll... In relation to the upcoming release I would suggest to release when you're ready as it seems that I'm the only person encountering these problems. The fixes should eventually make it into NAnt but from my point of view I can wait until after the release. --Edwin ------------------------------------------------------- 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_idU88&alloc_id065&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
