'Get Environment Variable From DOTNET_STARTUP_HOOKS
In my ASP.Net Core project:
- I set Environment Variable in
launchSettings.jsonwith DOTNET_STARTUP_HOOKS to load dll files. - I use
Environment.GetEnvironmentVariable("DOTNET_STARTUP_HOOKS")to check what I get from DOTNET_STARTUP_HOOKS acutally. - After I changed IDE from VS2019 to VS2022. Without any changing on my project, I found that
DOTNET_STARTUP_HOOKSloads 2 following files which I didn't set inlaunchSettings.json.
C:\Program Files\dotnet\SDK\6.0.201\DotnetTools\dotnet-watch\6.0.201-servicing.22124.17\tools\net6.0\any\middleware\Microsoft.AspNetCore.Watch.BrowserRefresh.dll;
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link\Microsoft.WebTools.BrowserLink.Net.dll
Does anyone know what happended and how to let DOTNET_STARTUP_HOOKS stop to call these 2 files?
Thank you...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
