Skip to content

Commit 40fcff7

Browse files
committed
Add Startup code
1 parent 525bce7 commit 40fcff7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/containers/edit-and-refresh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ To quickly iterate changes, you can start your application in a container. Then,
7676
}
7777
```
7878

79+
Modify the `Startup` method as follows:
80+
81+
```csharp
82+
public Startup(IConfiguration configuration, IWebHostEnvironment webHostEnvironment)
83+
{
84+
Configuration = configuration;
85+
Env = webHostEnvironment;
86+
}
87+
```
88+
7989
For more information, see [Razor file compilation in ASP.NET Core](/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1).
8090

8191
1. Set **Solution Configuration** to **Debug**. Then, press **Ctrl**+**F5** to build your Docker image and run it locally.

0 commit comments

Comments
 (0)