Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > NAnt
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2003, 03:56 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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
 
Old September 8th, 2003, 04:07 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.
 
Old September 8th, 2003, 04:13 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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.
 
Old September 8th, 2003, 04:17 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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.
 
Old September 8th, 2003, 04:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.