I have a web project which has one web.config and other three web configs. web.Debug.config, web.Staging.Config and web.Release.config. I want these three config files into my VSTS CI Build Artifacts. My configs location structure in solution explorer within visual studio as below.
Web.config
|__Web.Debug.config
|__Web.Staging.config
|__Web.Release.config.
For complete my purpose I set the Build Action and Copy to Output Folder properties for these files using Visual Studio. So i tried following combinations but my VSTS CI Build Artifact is not showing these configs.
Build Action = Content
Copy to Output Folder = Copy If Newer
Above combination didn't work. Than i tried following.
Build Action = Content
Copy to Output Folder = Copy Always
But this combination also failed. Can you please let me know the right combination which keep my these three configs in VSTS CI Build artifacts.
First, make sure those changes about
Build ActionandCopy to Output Folderproperties are committed and synced to your Repos, use theCopy Filestask to copy those files from build directory to Artifacts.I have created a sample to do this, you can check the build definition for
Copy Filestask andPublish Artifacttask:Only copy the
\binfolder.The Build Artifacts result:
If above not help you, please share more detailed info about your build definition.
Hope this helps.