1

From a CI-CD prospective, i am trying to find what are the folder & files (bin, obj, .dll etc) that are published to an IIS server while using the msbuild.exe with the publish option. I am not a .NET developer. What governs which files/folders to be pushed to the nodes while publishing after the build?

My application is a fairly simple one. The publish (or the deployment) is more or less a bunch of file copies from the CI server to the IIS nodes. The command used for the build and publish is

bat '"C:\\MSBuild\\12.0\\Bin\\MSBuild.exe" /p:Configuration=DEV /t:Rebuild /p:DeployOnBuild=true /p:PublishProfile=DEV /m:4 src/myapp.sln'

I am trying to create & place the required output folder & files to an file repository after the msbuild process (before publishing). Then i will use these files to subsequent environments (with their web config files). Thus avoid the rebuilding for each environments.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
OK999
  • 1,353
  • 2
  • 19
  • 39
  • You may want to look at the SetParameters.xml that accompanies the deployment packages that are created. You can customize these for each deployment environment. https://msdn.microsoft.com/en-us/library/ff398068(v=vs.110).aspx – jessehouwing Apr 08 '16 at 15:36
  • The SetParameters.xml is for transforming the web.config files for the various projects based on the environments. That part is accomplished with the transformation. I have files & folders that doesn't change with the environments. I am looking to identify these folders and files, so that i can use the same set in other environments. What decides that output of msbuild.exe? (i guess my question is a very lame one) – OK999 Apr 08 '16 at 17:41
  • It just takes the output from the project. And optionally does a bunch of extra compile steps on them. – jessehouwing Apr 08 '16 at 18:51
  • Looks like (atleast my app), the build output for each projects in the solution is placed in a temp folder prior to publishing. "Copying all files to temporary location below for package/publish" – OK999 Apr 08 '16 at 21:03

1 Answers1

1

In this context MSBuild is actually using WebDeploy under the covers to deploy the application. Basically MSBuild compiles any C# OR VB files in the web application project and creates DLLs in the bin directory, then WebDeploy packages up any web server files (HTML/CSS/JS/etc) and the bin folder to the target.

The following post describes how WebDeploy works.

https://dotnetcatch.com/2016/02/25/the-anatomy-of-a-webdeploy-package/

chief7
  • 14,263
  • 14
  • 47
  • 80