Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > NAnt
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
NAnt For discussing the NAnt .NET build tool. When posting a question, please specify the version of NAnt you are using.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the NAnt section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 8th, 2003, 03:56 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default vbc.exe: Where's my App.config?

I'm using NAnt to build VB.Net projects. NAnt constructs the call(s) to the .Net VB compiler (vbc.exe). I have a project that results in an executable and presumably a <myexe>.config file. However, I am not seeing the config file in any of my compiler output directories. I also looked at the vbc.exe help and I don't see anything that looks like it would specify where to put said app.config file.

Anyone have any ideas?

Peter
__________________
-Peter
compiledthoughts.com
twitter/peterlanoie
Reply With Quote
  #2 (permalink)  
Old September 8th, 2003, 04:07 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Peter,

Good to "see" you again ;)

If you add a file called app.config to the root of your project, the compiler will rename this file to YourApplicationName.exe.config and put a copy of it in the bin folder of the debug or release folder.

You can add the file by right-clicking your project and then choosing Add New Item......

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old September 8th, 2003, 04:13 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I guess I failed to mention that my project does already have an app.config file in it. That's why I'm surprised I'm not seeing it. When it's built inside VS, it gets renamed appropriately.

Question slightly related to this: What's the proper home for the EXE that's generated? Should that live in the \bin directory of the application? In the actual distribution of NAnt, the EXE is in bin. In my test EXE projects that I have built only in VS.Net, the EXE is also in the bin, so I'm assuming that's the proper place for them/it.
Reply With Quote
  #4 (permalink)  
Old September 8th, 2003, 04:17 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Also, when compiled in Visual Studio the app.config gets moved and renamed to myproject.exe.config. But is this process being done by VS.Net or by the compiler. It would seem the former is the case so I'll have to do this manually if not creating a exe distribution from VS.
Reply With Quote
  #5 (permalink)  
Old September 8th, 2003, 04:26 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Right, I see.

Couldn't find an option of vbc.exe either, so it looks like you're stuck with manually copying the file to the bin folder before or after your compilation, unless someone else comes up with a good idea....

From what I know about Nant, can't you just call devenv.exe and have Visual Studio do the actual compilation instead of just vbc? That way, VS.NET may copy the file for you. Or would that be the same anyway (I am pretty spoiled, I just use the VS.NET IDE.....)

The BuildIt example that Microsoft provides in the white paper about Team Development uses devenv.exe, if I am not mistaken.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
How to get the directory of app.config cczhangjm C# 2 May 28th, 2007 02:55 AM
How to access app.config in C# ? cczhangjm XML 2 May 16th, 2007 07:43 PM
Chapter 8 - app.config jotto BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 March 21st, 2006 05:31 PM
system don't find vbc.exe file yln BOOK: Beginning ASP.NET 1.0 1 August 2nd, 2004 03:32 PM



All times are GMT -4. The time now is 01:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.