Why doesn't MSBuild copy as I would expect

后端 未结 4 2246
忘掉有多难
忘掉有多难 2021-02-09 10:20

I\'m needing to script my build. I\'m using MSBUILD because of it\'s integration with VS.net. I am trying to copy some files from the build environment to the deployment folder

4条回答
  •  无人共我
    2021-02-09 10:38

    Just a gem we found as we were debugging MSBuild issues around copying:

    http://blog.scrappydog.com/2008/06/subtle-msbuild-bug-feature.html

    ItemGroups are parsed before Targets, so any Targets that create new files (e.g. compiles!) won't be picked up when an ItemGroup is referenced further along the script.

    Eric Bowen also describes a work-around for this "feature", the CreateItem task:

    
        
            
        
        
    
    

    Many kudos to him!

提交回复
热议问题