473,626 Members | 3,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run NAnt from my own application

I have figured out how to get this running by using Ant.Console as a
starting point for calling NAnt. I had to include NAnt.Core,
NAnt.DotNet & NDoc.Core in my project and it worked correctly.

But, since I already have NAnt installed on my system, I was hoping
that I would not need to include references to NAnt.Core, NAnt.DotNet
& NDoc.Core

I removed the references and set my path environment varible to point
at the NAnt\bin folder but there is a failure at this line:

Assembly nantCore =
AppDomain.Curre ntDomain.Load(" NAnt.Core");
Unhandled Exception: System.IO.FileN otFoundExceptio n: File or assembly
name NAnt.Core, or one of its dependencies, was not found.
File name: "NAnt.Core"
at System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurit y, Boolean
throwOnFileNotF ound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName
assemblyRef, Boolean stringized, Evidence assemblySecurit y,
StackCrawlMark& stackMark)
at System.Reflecti on.Assembly.Int ernalLoad(Strin g assemblyString,
Evidence assemblySecurit y, StackCrawlMark& stackMark)
at System.AppDomai n.Load(String assemblyString)
at Test.External.A nt.HelperArgume nts.CallConsole Runner() in
c:\_application svs\mftest\exte rnal\ant\antcon troller.cs:line 215
at System.AppDomai n.DoCallBack(Cr ossAppDomainDel egate
callBackDelegat e)
at Test.External.A nt.AntControlle r.execute(Strin g[] args) in
c:\_application svs\mftest\exte rnal\ant\antcon troller.cs:line 113
at Test.Form1.btnR unAnt_Click(Obj ect sender, EventArgs e) in
c:\_application svs\mftest\form 1.cs:line 547
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G&
msg)
at System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth ods+IMsoCompone ntManager.FPush MessageLoop(Int 32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32
reason, ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at Test.Form1.Main () in c:\_application svs\mftest\form 1.cs:line 425

Cheers Dave
Nov 15 '05 #1
0 2094

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1567
by: hoochiegooch | last post by:
Hi, all. I have a couple of questions about NAnt. 1. Is there a better way to invoke NAnt from a C# "Master Test Rig" than shelling out? IOW, how should an ASP.NET web app or Windows Service kick off a NAnt build session? 2. We have some test tools that can
0
424
by: muesliflakes | last post by:
I wish to run Nant from my own application. I have included NAnt.Core and NAnt.DotNetTasks and calling out to NAnt as follows. StringWriter consoleOut = new StringWriter( ); Console.SetOut( consoleOut ); ConsoleDriver.Main( new string { "-buildfile:" + txtBuildFile.Text } );
2
2492
by: Ireneus Broncel | last post by:
Maybe I am wrong here, but I have a problem with nant that I don't unterstand, I'm trying to compile an example ConsoleApp Project with net-1.1, and get the errror: log4net:ERROR LogLog: Exception while reading ConfigurationSettings. Check your .config file is well formed XML. System.Configuration.ConfigurationException: Unknown configuration section appSettings (c:\Development\NET\Tools\nant-0.85-rc3\bin\nant.exe.config line 8) at
2
1031
by: Ashish | last post by:
hi all, is there anyway one can run nant builds from a web application ? Ideally I would like to run the nant build and pipe the nant output back to the user... any help/pointers would be much appreciated. tia -ashish
12
18789
by: michael sorens | last post by:
So I have compiled a .dll file from a Visual Studio 2005 project containing a few dozen c# files. Now I want to automate this build using ant (have not yet looked at nant, but the rest of my complex build is done with plain ant). Could someone point me to any tutorial or other guide for doing this? I would even settle for just how to do it from a command-line.
0
2107
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the nant file which is causing the problem, the object code that is not being built and the error message which is being produced. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that...
1
6168
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that Master is referring to the PanelManager reference. nant file ------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?>...
1
2061
by: Crash | last post by:
Hi all, Is there a newsgroup for NANT? Or is there some place I can post NANT questions? In case this newsgroup is Ok for NANT questions, here is my issue: Windows XP VS 2003
1
2835
by: Sam | last post by:
This is probably the wrong group to post this in, but I'm not sure where it should go. If you have suggestions as to another group to post it let me know. In our Nant build file for our application. I want to first delete 2 folders if they exist. These folders then later get created. If the folders exist, I do not get errors, but if they do not, the build fails. <delete dir="${build.root}" />
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.