- Open IIS Manager
- Application Pools > Right-click the App Pool > Advanced Settings
- Set the following values:
- (General) Start Mode = AlwaysRunning
- (Process Model) Idle Time-out = 0
- (Process Model) Load User Profile = False
- (Recycling) Regular Time Interval = 0
- (Recycling) Specific Times – clear all values from the TimeSpan[] Array
- Click OK
Expose internals in csproj with InternalsVisibleTo
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>ClassLibrary1.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
Update 2024
<ItemGroup>
<InternalsVisibleTo Include="ClassLibrary1.Tests" />
</ItemGroup>
Resolve dependencies manually in .NET Core
var serviceProvider = services.BuildServiceProvider();
using (var scope = serviceProvider.CreateScope())
{
var app = serviceProvider.GetRequiredService<ISomeInterface>();
app.SomeMethod();
}
Windows GAC location
C:\Windows\Microsoft.NET\assembly