转换时,Msbuild不会复制web.config文件

时间:2011-07-27 08:45:32

标签: iis msbuild publishing webdeploy

msbuild发布后,TransformWebConfig文件夹为空。以下是teamcity日志

[09:31:43]: [CollectWebConfigsToTransform] GetPublishingLocalizedString 
[09:31:43]: [GetPublishingLocalizedString] Found The following for Config tranformation:
{0}
[09:31:43]: [it\it.vbproj.teamcity] PipelineTransformPhase 
[09:31:43]: [PipelineTransformPhase] GetPublishingLocalizedString 
[09:31:43]: [GetPublishingLocalizedString] Publish Pipeline Transform Phase 
[09:31:43]: [it\it.vbproj.teamcity] AutoParameterizationWebConfigConnectionStringsCore
[09:31:43]: [AutoParameterizationWebConfigConnectionStringsCore] Skipping target
"AutoParameterizationWebConfigConnectionStringsCore" because it has no inputs. 
[09:31:43]: [it\it.vbproj.teamcity] CopyAllFilesToSingleFolderForPackage (1s) 
[09:31:43]: [CopyAllFilesToSingleFolderForPackage] GetPublishingLocalizedString 
[09:31:43]: [GetPublishingLocalizedString] Copying all files to temporary location below for package/publish:obj\Deploy-Dev\Package\PackageTmp.

目录中存在Web.config文件。只是不明白为什么不挑选它。此外,发布目标后包含web.deploy和web.release文件,而不是web.config文件。请帮忙。

1 个答案:

答案 0 :(得分:14)

经过几次解决后,弄清楚web.config属性设置为Do not Copy,将其更改为始终复制,其次将Build action设置为none,将其更改为content。希望它会帮助某人。