Problem
=======
Task solution has problem with library/dll/non-exe projects with App.config
files copied via PostBuildEvent; it fails to copy the App.config in
PostBuildEvent to MyProject.dll.config because 'Access is denied.'
Proof
=====
dll projects (with App.config file) have:
PostBuildEvent = "copy $(ProjectDir)App.config
$(TargetPath).config"
I have two such projects: 'UnitTestsInteractive' and 'UnitTests'. Just to
get further information, I deleted the App.config from the 'UnitTests'
folder before the test. I also have unset ReadOnly flag for both App.config
files.
The following is last bit of NAnt output (with task solution verbose='true')
[first error is 'true' error; second error is as expected when App.config is
deleted]
----------------------------
[solution] Building 'SoftTech.Saturn.ShowerModel' [Debug] ...
[solution] Project is up-to-date.
[solution] Fixing up references...
[solution] Building 'UnitTestsInteractive' [Debug] ...
[solution] Project is up-to-date.
Access is denied.
[solution] [postbuildevent] 0 file(s) copied.
[solution] [postbuildevent] Project error: A tool returned an error
code
from the build event
[solution] PostBuildEvent failed with exit code = 1
[solution] Fixing up references...
[solution] Building 'UnitTests' [Debug] ...
[solution] Project is up-to-date.
[solution] [postbuildevent] The system cannot find the file
specified.
[solution] [postbuildevent] Project error: A tool returned an error
code
from the build event
[solution] PostBuildEvent failed with exit code = 1
BUILD FAILED - 2 non-fatal error(s), 0 warning(s)
D:\GlobalSource\SaturnDotNet\NAnt\SaturnSolution.build(79,10):
Could not find file
'D:\GlobalSource\SaturnDotNet\SatSln_AutoBuild\UnitTests\app
.config' to copy.
Total time: 0.5 seconds.
----------------------------
It looks to me like the App.config file is being 'locked' by task solution,
so that the copy fails. A clue that this is happening is the *second* FNF
message when I removed UnitTests/App.config.
VS works okay with my present PostBuildEvent.
Background
==========
MSDE 2003 7.1.3088
MS .Net FW 1.1 1.1.4322
NAnt 0.85-rc1
I have a VS Solution that I'm porting from 0.84 NAntContrib task Slingshot
to 0.85-rc1 task solution because Slingshot doesn't fail when a solution
file is missing - see my earlier post. Suggestion was to switch 0.85 task
solution.
The 'ordinary' dll projects build okay, but I also have two dll projects
that will be used with NUnit.exe for Unit Testing. These two projects both
have App.config files associated with them, which need to become
MyProject.dll.config.
Suggestion
==========
A) Don't lock App.config until PostBuildEvent is out of the way.
B) Don't copy App.config for library projects. Yes, it's nice, but No, it's
not what VS does (well, not my version - only for EXE projects).
TIA (and thanks Gert for such a rapid response last time)
Bryan White
"Brewmanz"
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users