Re: Help with buildfile compiling a C#-library containing references to libraries in a sub-directory
"Heintz, Aleksander" <[email protected]> Wed, 22 Jun 2011 08:19:23 +0200
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <[email protected]> |
Thank you very much. I thought there were some option to enable this at compilation you see, but it seems I was mistaken. However, a quick question if you don't mind. The App.config file needs to be available at run-time, no? Or only at compilation-time? The question is if I need to copy it to the build-dir or not, and what to do with several dll's that end up in the same directory. I know this is off-topic, but this is the only place I've been able to get a good question. What I mean is more or less this: If I create 1 App.config, then after compilation (of all parts and dlls) move that App.config to the build-dir, will all dll's in that dir automatically find libraries in the probing-path? On Tue, Jun 21, 2011 at 11:14 PM, Dominik Guder <[email protected]> wrote: > Hi Aleksander, > > this is basically off topic since Assembly resolving is generally part of > .Net itself and not specific to nant. > > Nevertheless, you could do following: add a <probing> entry to your > app.config eg. <probing privatePath="lib\ShouldFluent;**lib\AnotherLib" /> > > or try following in your code (untested): > AppDomain.CurrentDomain.**SetupInformation.**PrivateBinPath = > @"lib\ShouldFluent;lib\**AnotherLib"; > > IMHO both folders must reside below AppPath. > > To get an insight what is happening you might take a look at fuslogvw.exe > which is a log viewer for fusion (.net assembly resolver) > fuslogvw.exe should be somewhere in your sdk\bin folder > > hth > Dominik > > Am 21.06.2011 07:29, schrieb Heintz, Aleksander: > >> That works, but I would like to be able to maintain some hierarchy of >> the files. Isn't that possible? >> >> On Tue, Jun 21, 2011 at 1:28 AM, Christopher Brandt >> <[email protected] <mailto:xtopher.brandt@gmail.**com<[email protected]>>> >> wrote: >> >> Have you tried moving all of the dependencies (ie, >> Should.Fluent.dll ) into the same directory as the executable? >> --- >> Chris. >> >> Continuous improvement is better than delayed perfection. - Mark Twain >> >> >> On Mon, Jun 20, 2011 at 12:13 PM, Heintz, Aleksander >> <[email protected] <mailto:[email protected]>> wrote: >> >> I'm having trouble by trying to write a buildfile that can >> compile and test my application. The compilation works great, >> however, I get a runtime-error during the testing saying that >> .NET is unable to load the assembly I included. Now, my >> folder-structure looks something like this: >> >> /project.build >> /lib >> /ShouldFluent >> /Should.Fluent.dll >> /src >> /sources... >> >> > > -- > The answer to the great question of life, > the universe and everything is 42 (Douglas Adams) > -- /Alxandr ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users