@@ -67,6 +67,20 @@ you're quickly starting and stopping your application. The `Auto` mode will writ
6767source code for missing types to the ` Internal/Generated ` folder under your main application
6868project.
6969
70+ ::: tip
71+ If you're using the ` Auto ` mode in combination with ` dotnet watch ` you need to disable the watching of
72+ the ` Internal/Generated ` folder to avoid application restarts each time codegen writes a new file.
73+ You can do this by adding the following to the ` .csproj ` file of your app project.
74+
75+ ``` xml
76+ <ItemGroup >
77+ <Compile Update =" Internal\Generated\**\*.cs" Watch =" false" />
78+ </ItemGroup >
79+ ```
80+
81+ :::
82+
83+
7084At production time, if there is any issue whatsoever with resource utilization, the Wolverine team
7185recommends using the ` Static ` mode where all types are assumed to be pre-generated into what Wolverine
7286thinks is the application assembly (more on this in the troubleshooting guide below).
@@ -356,7 +370,7 @@ and you can configure different behavior for production versus development time
356370using var host = await Host .CreateDefaultBuilder ()
357371 .UseWolverine (opts =>
358372 {
359- // Use "Auto " type load mode at development time, but
373+ // Use "Dynamic " type load mode at development time, but
360374 // "Static" any other time
361375 opts .Services .CritterStackDefaults (x =>
362376 {
@@ -377,5 +391,5 @@ using var host = await Host.CreateDefaultBuilder()
377391
378392Which will use:
379393
380- 1 . ` TypeLoadMode.Auto ` when the .NET environment is "Development" and try to write new source code to file
394+ 1 . ` TypeLoadMode.Dynamic ` when the .NET environment is "Development" and dynamically generate types on the first usage
3813952 . ` TypeLoadMode.Static ` for other .NET environments for optimized cold start times
0 commit comments