[私人筆記]asp.net Core 3.1筆記

asp.net Core 3.1筆記

Core3.1 安裝在Server時要下載 Hosting Bundle 才是給IIS用

web.config 的

<aspNetCore processPath=".\xx.xx.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
   <environmentVariables>
      <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
   </environmentVariables>
</aspNetCore>

ASPNETCORE_ENVIRONMENT 是 Development 時 會去讀取 appsettings.Development.json

ASPNETCORE_ENVIRONMENT 是 Production時 會去讀取 appsettings.json

 

Ref

Unit tests in Entity Framework Core 5

如果內容有誤請多鞭策謝謝