Share

NAnt - A .NET Build Tool

Tracker: Bugs

9 Solution task doesn't compile resources for VC++ - ID: 1077712
Last Update: Comment added ( drieseng )

The <solution> task when given a VC++ solution, it
doesn't compile the resource file that belongs to the
solution.


Hani Atassi ( haniatassi ) - 2004-12-02 16:51

9

Closed

Fixed

Gert Driesen

Tasks

0.85

Public


Comments ( 4 )

Date: 2004-12-04 17:58
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

I committed your patch to cvs.

Thanks a lot for your contribution !!!

One little remark: it might be best to extend RcTask instead
of passing options using the Options attribute, that way
people that use <rc> can take advantage of it too (without
falling back to the "options" attribute).


Date: 2004-12-03 17:36
Sender: haniatassiAccepting Donations

Logged In: YES
user_id=590187

Got another comment and fix. My code doesn't work if you
are trying to call an NAnt of a project from a different path.

Actually, I forgot to add the following line:
rcTask.BaseDirectory = fileConfig.ProjectDir;

But it doesn't seem that it has any effects. So, to fix the
problem, I need to add the full path of the RC file as the
following:

rcTask.RcFile = new FileInfo(Path.Combine
(fileConfig.ProjectDir.FullName, rcFile));

I attached the new fix..

Thanks,



Date: 2004-12-03 00:40
Sender: haniatassiAccepting Donations

Logged In: YES
user_id=590187

Attached is a VC++ solution with the problem. The project
has a resource file that contains version information. After
running the NAnt script, the output file won't have a version
because the resource file hasn't been compiled.

I tracked down the problem to the file “VcProject.cs”. I added
the required changes to fix the problem and attached the file.
I added the comment // {date} (ha) at the lines of the
changes..

It works fine with me, let me know how it goes.. :)


Date: 2004-12-02 16:56
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

Can you attach a small repro to this report ?

Any chance you'd like to contribute the changes necessary to
support resources in VC++ ? ;-)


Attached Files ( 2 )

Filename Description Download
NAntResourceFile.zip Contains a sample of the problem and a fix for NAnt.VSNet Download
VcProject.rar A new fix for the problem. Download

Changes ( 7 )

Field Old Value Date By
status_id Open 2004-12-04 17:58 drieseng
resolution_id None 2004-12-04 17:58 drieseng
assigned_to nobody 2004-12-04 17:58 drieseng
close_date - 2004-12-04 17:58 drieseng
File Added 111177: VcProject.rar 2004-12-03 17:36 haniatassi
File Added 111096: NAntResourceFile.zip 2004-12-03 00:40 haniatassi
priority 5 2004-12-02 16:52 haniatassi