Dans mon dossier de Nant j'ai (chemins raccourcies):Comment obtenir VS2010 Web.config Transformations fonctionnant à partir de NAnt?
<echo message="#### TARGET - compile ####"/>
<echo message=""/>
<echo message="Build Directory is ${build.dir}" />
<exec program="${framework}\msbuild.exe"
commandline="..\src\Solution.sln /m /t:Clean /p:Configuration=Release" />
<exec program="${framework}\msbuild.exe"
commandline="..\src\Solution.sln /m /t:Rebuild /p:Configuration=Release" />
<exec program="${framework}\msbuild.exe"
commandline="..\src\Solution.sln /m /t:TransformWebConfig /p:Configuration=Release" />
qui se traduit par:
Build FAILED. "C:\..\src\Solution.sln" (TransformWebConfig target) (1) -> C:\..\src\Solution.sln.metaproj : error MSB4057: The target "TransformWebConfig" does not exist in the project. [C:\..\src\Solution.sln] 0 Warning(s) 1 Error(s)Time Elapsed 00:00:00.05
La solution et les projets associés sont tous VS2010 et l'application Web a même la bonne référence dans le fichier .csproj:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
Cela ne devrait-il pas fonctionner?
Réglage 'UseWPP_CopyWebApplication = true' est l'affaire - merci! –