--- Description ---
The Resgen task is not using the dynamic prefix (passed
through the <resourcefileset>) properly.
Currently it is just prefixing the value of the dynamic
prefix to the resource filename while creating a
.resource file. It does not resolve the complete
subfolder names to generate the appropriate .resource
file.
--- Steps To Reproduce ---
(see attached repro)
1) Create a resource file Foo.en-us.resx, under the
relative project path .\Bar\
2) Compile the resource file using the following NAnt task
<resgen>
<resources prefix="Example" dynamicprefix="true">
<include name="**\*.resx" />
</resources>
</resgen>
3) Execute NAnt.exe 0.85 in the project root directory
--- Expected Result ---
A file named "Example.Bar.Foo.en-us.resources" should
be created in the subdirectory .\Bar\
--- Actual Result ---
The file is incorrectly named
"Example.Foo.en-us.resources" ; the dynamic prefix from
the subdirectory "Bar" is missing.
--- Suggested Fix ---
The function ResourceFileSet::GetManifestResourceName()
gets the correct resource name. It should be used by
the ResGen task.
Edit project file
".\src\NAnt.DotNet\Tasks\ResGenTask.cs" line # 346:
Current Line #346:
> FileInfo outputFile = GetOutputFile(new
FileInfo(filename), Resources.Prefix);
Fixed Line # 346:
> FileInfo outputFile = new FileInfo(
Resources.GetManifestResourceName(filename, filename));
Gert Driesen
Tasks
0.85
Public
|
Date: 2005-02-24 19:13 Logged In: YES |
|
Date: 2005-02-23 23:30 Logged In: YES |
| Filename | Description | Download |
|---|---|---|
| repro.zip | Bug Repro Archive | Download |
| ResGenTask~fix.cs | Fixed ResGenTask.cs | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2005-02-24 19:13 | drieseng |
| resolution_id | None | 2005-02-24 19:13 | drieseng |
| assigned_to | nobody | 2005-02-24 19:13 | drieseng |
| close_date | - | 2005-02-24 19:13 | drieseng |
| File Added | 122821: ResGenTask~fix.cs | 2005-02-23 23:30 | stj3570 |
| File Added | 122810: repro.zip | 2005-02-23 22:36 | stj3570 |