I’m trying to use an alternative core framework library while still targeting .NET Framework 4.0. When I add a manual reference to the alternate file, Visual Studio instead creates a reference to the same named file in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\.
Can I disable this behavior?
If the dll is already in the GAC, removing existing dlls will not work.
Try to mark the reference as
Specific Version = true(Right click -> Properties).EDIT:
After you have added the reference (even if the wrong one was actually added), edit your csproj file, find the reference, and edit it with your specific dll properties: