Hi all!
I have a problem with Nant built from CVS an hour ago. My build file that
used to work with some older versions of Nant, fails when used with new
version.
The problem can be reduced to a simple *.build file
------------------------------
<project>
<csc target="library" output="aaa.dll" >
<sources basedir="a">
<includes name="*.cs" />
</sources>
<resources basedir="a" prefix="zzz">
<includes name="*.resx" />
</resources>
</csc>
</project>
-----------------------------
where c# sources are located in "${nant.project.basedir}\a" directory. They
can be as simple as a single file with the contents: "public class A { };".
There's also a *.resx file in the "a" directory (any resx file will do).
NAnt produces the following error message (full log is attached):
error CS1566: Error reading resource file 'x:\b\a\MainForm.resources'
At the same time a new file called "MainForm.resources" has appeared in the
directory where my build file is located (but I think it should go to "a"
directory instead).
I think that ResGen task (or its invocation) should be fixed to produce the
*.resource file in a correct place, but I have no idea how to do it myself.
Can you help me?
Jarek
NAnt version 0.8.4 Copyright (C) 2001-2003 Gerry Shaw
http://nant.sourceforge.net
Framework net-1.2 is invalid and has not been loaded : Framework directory
F:\WINDOWS\Microsoft.NET\Framework\v1.2.30703 does not exist.
Framework mono-1.0-linux is invalid and has not been loaded : Framework directory
/usr/local/bin does not exist.
Framework sscli-1.0 is invalid and has not been loaded : Framework directory
C:\sscli\build\v1.x86fstchk.rotor does not exist.
Buildfile: file:///X:/b/test.build
Base Directory: X:\b.
[csc] Compiling 1 files to X:\b\aaa.dll.
[resgen] Starting 'z:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\bin\resgen.exe (/compile
"X:\b\a\MainForm.resx,X:\b\MainForm.resources")' in 'X:\b'
Read in 0 resources from 'X:\b\a\MainForm.resx'
Writing resource file... Done.
[csc] Contents of F:\DOCUME~1\Jaak\LOCALS~1\Temp\tmp1FA.tmp.
/fullpaths
/nologo
"/target:library"
"/out:X:\b\aaa.dll"
"/resource:X:\b\a\MainForm.resources,zzz.MainForm.resources"
"X:\b\a\a.cs"
[csc] Starting 'F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe
(@"F:\DOCUME~1\Jaak\LOCALS~1\Temp\tmp1FA.tmp")' in 'X:\b'
error CS1566: Error reading resource file 'x:\b\a\MainForm.resources' --
'The system cannot find the file specified. '
BUILD FAILED
X:\b\test.build(2,3):
External Program Failed: F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe (return
code was 1):
NAnt.Core.BuildException: X:\b\test.build(2,3):
External Program Failed: F:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe (return
code was 1)
at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask() in
X:\work\nant\src\NAnt.Core\Tasks\ExternalProgramBase.cs:line 234
at NAnt.DotNet.Tasks.CompilerBase.ExecuteTask() in
X:\work\nant\src\NAnt.DotNet\Tasks\CompilerBase.cs:line 363
at NAnt.Core.Task.Execute() in X:\work\nant\src\NAnt.Core\Task.cs:line 145
at NAnt.Core.Project.InitializeProjectDocument(XmlDocument doc) in
X:\work\nant\src\NAnt.Core\Project.cs:line 1064
at NAnt.Core.Project.Execute() in X:\work\nant\src\NAnt.Core\Project.cs:line 631
at NAnt.Core.Project.Run() in X:\work\nant\src\NAnt.Core\Project.cs:line 683
Total time: 0.5 seconds.