IIS Module to load the Microsoft.Data.SqlClient.SNI.dll from shadow copied location to avoid locked files by IIS during build and deploys.
- Update the version number of the SNI package to correspond to what your dependency using.
- Build and package the project into a nuget-package. If you publish the package, think of reading and understand the license for the different included components.
- Add a reference to the created nuget-package and make a clean build of the solution.
- Ensure that the SNI-dll file not exists in the bin-folder.
- Test your solution to ensure that it is working with the shadow copying of the SNI-dll into the temporary folders for ASP.NET files.
When deploying into production for the first time the SNI-dll will still be there in the bin-folder and block the deployment and you need to do some workaround to get the files updated.