Hello,

I'm using nant-0.8.3 for our builds and yesterday I have found a
problem. I know that lots of things have changed in <solution> since
the release, still I hope this problem to fixed in the 0.8.4.
When building solution which uses embedded resource (doc.bmp in the
example below) and the file with this resource is readonly (in
reality, it is just being taken from the perforce during build) the
build fails because of UnauthorizedAccessException. To workaround this
problem I have to set attributes of all resource files to normal
before calling solution task and reset back to readobly after, which
is not so nice and creates problems with non-readonly files in case of
failing solution task (oh, <try><catch><finally> is still in the end
of my todo).

part of the log:

build.csproj:

     [copy] Copying 1 file.
     [copy] Copying E:\Root\Transaction\src\VersionInfo.cs to 
E:\Root\Transaction\src\SupplyChain\Common\VersionInfo.cs.
   [attrib] Setting file attributes for 1 files to Normal.
   [attrib] E:\Root\Transaction\src\SupplyChain\Common\VersionInfo.cs
 [solution] Starting solution build.
 [solution] Included projects:
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\Common.csproj
 [solution] Reference projects:
 [solution] Building Common [Debug]...
 [solution] Copying references:
 [solution]  - System.Drawing
 .....................
     some other references
 .....................
 [solution] Compiling resources:
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersGrid.resx
               [resgen] Starting 'D:\Program Files\Microsoft Visual Studio .NET 
2003\SDK\v1.1\bin\resgen.exe 
("E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersGrid.resx" 
"D:\DOCUME~1\TARASO~1.000\LOCALS~1\Temp\l-rbiwnk\Transaction.SupplyChain.Common.GUI.FoldersGrid.resources")'
 in 'E:\Root\Transaction'
                        Read in 13 resources from 
'E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersGrid.resx'
                        Writing resource file...  Done.
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\GUI\FieldChooser.resx
               [resgen] Starting 'D:\Program Files\Microsoft Visual Studio .NET 
2003\SDK\v1.1\bin\resgen.exe 
("E:\Root\Transaction\src\SupplyChain\Common\GUI\FieldChooser.resx" 
"D:\DOCUME~1\TARASO~1.000\LOCALS~1\Temp\l-rbiwnk\Transaction.SupplyChain.Common.GUI.FieldChooser.resources")'
 in 'E:\Root\Transaction'
                        Read in 46 resources from 
'E:\Root\Transaction\src\SupplyChain\Common\GUI\FieldChooser.resx'
                        Writing resource file...  Done.
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\GUI\InfoTabs.resx
               [resgen] Starting 'D:\Program Files\Microsoft Visual Studio .NET 
2003\SDK\v1.1\bin\resgen.exe 
("E:\Root\Transaction\src\SupplyChain\Common\GUI\InfoTabs.resx" 
"D:\DOCUME~1\TARASO~1.000\LOCALS~1\Temp\l-rbiwnk\Transaction.SupplyChain.Common.GUI.Tabs.resources")'
 in 'E:\Root\Transaction'
                        Read in 82 resources from 
'E:\Root\Transaction\src\SupplyChain\Common\GUI\InfoTabs.resx'
                        Writing resource file...  Done.
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\doc.bmp
 [solution]  - E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersTree.resx
               [resgen] Starting 'D:\Program Files\Microsoft Visual Studio .NET 
2003\SDK\v1.1\bin\resgen.exe 
("E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersTree.resx" 
"D:\DOCUME~1\TARASO~1.000\LOCALS~1\Temp\l-rbiwnk\Transaction.SupplyChain.Common.GUI.TreeFolder.resources")'
 in 'E:\Root\Transaction'
                        Read in 68 resources from 
'E:\Root\Transaction\src\SupplyChain\Common\GUI\FoldersTree.resx'
                        Writing resource file...  Done.
 [solution] Starting compiler...
 [solution] Success! (exit code = 0)
 Target failed, calling onfail target 'SupplyChain.Common.failed'

SupplyChain.Common.failed:

 Target failed, calling onfail target 'build.all.failed'

build.all.failed:

Total time: 6 seconds.

BUILD FAILED

INTERNAL ERROR

System.UnauthorizedAccessException: Access to the path "Common.doc.bmp" is denied.
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

Please send bug report to [EMAIL PROTECTED]
  

-- 
Best regards,
 Ivan                          mailto:[EMAIL PROTECTED]

* The number you have dialed is imaginary. Please rotate your phone 90 degrees and try 
again.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to