You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Overview of shadow copy logic when enabled. See https://github.com/dotnet/aspnetcore/pull/28357 for more context
255
+
256
+
* On first request, ANCM goes through its startup sequence, starting dotnet and sending the request into managed code. During this sequence,
257
+
* ANCM will copy the contents of the app directory to another directory which is user specified. The path to this directory can be absolute or relative.
258
+
259
+
* Logs and log files will be written to the app directory rather than the shadow copy directory. app_offline will also only be watched in the app directory.
260
+
* The current directory will be set to the app directory as well as the AppContext.BaseDirectory.
261
+
262
+
* On publish of new content to the app directory, ANCM will start debouncing file change notifications for dlls, waiting for a steady state.
263
+
* This is done by resetting a timer each time a dll is changed, eventually triggering the timer once there are no dll changes. Afterwards, shutdown is started,
264
+
* causing the process to recycle.
265
+
266
+
* Subfolders are created under the user specified shadowCopyDirectory, where the highest int value directory name will be used each time.
267
+
* It will start at subdirectory with name '0' and increment from there. On shutdown, because dlls are still locked by the running process,
268
+
* we need to copy dlls to a different directory than what is currently running in the app. So in the case where the directory name is '0',
269
+
* we will create a directory name '1' and write the contents there. Then on app start, it will pick the directory name '1' as it's the highest value.
270
+
271
+
* Other directories in the shadow copy directory will be cleaned up as well. Following the example, after '1' has been selected as the directory to use,
272
+
* we will start a thread that deletes all other folders in that directory.
0 commit comments