 |
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
|
|
|

September 8th, 2003, 03:56 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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
|

September 8th, 2003, 04:07 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|

September 8th, 2003, 04:13 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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.
|

September 8th, 2003, 04:17 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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.
|

September 8th, 2003, 04:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|
 |