I have a common library that I'm developing. Let's call it My.Common.
Version 1 of My.Common has been uploaded to my intranet Nuget server and is in use in several other libraries, such as My.Logging and My.Navigation.
While working on an .Net Core application that uses My.Common, My.Logging, and My.Navigation via Nuget, I've discovered a bug in My.Common. So I need to fix My.Common for Version 2. The bug affects a functionality used directly by the application - it has no effect on the other libraries, they can continue to use Version 1.
I open up the code for My.Common, attempt a fix, and compile. In the application, I removed the Nuget package for My.Common and add reference to the My.Common DLL in its bin folder.
Here is when I discover that I'm not seeing the changes to My.Common in my application. In the Properties window for My.Common, the path is showing as:
C:\Users\foo\.nuget\packages\my.common\1.0.0\lib\netcoreapp2.0\My.Common.dll
Here's how the reference looks in the .csproj:
<ItemGroup>
<Reference Include="My.Common">
<HintPath>C:\Projects\My.Common\bin\Debug\netcoreapp2.0\My.Common.dll</HintPath>
</Reference>
</ItemGroup>
Even though I've added it as an assembly reference, it is being overridden and served from its Nuget package!
Since the assembly and Nuget package have different versions, I thought I could solve this by getting more explicit about the version.
<ItemGroup>
<Reference Include="My.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>C:\Projects\My.Common\bin\Debug\netcoreapp2.0\My.Common.dll</HintPath>
<SpecificVersion>true</SpecificVersion>
</Reference>
</ItemGroup>
When set to true, Visual Studio appears to be unable to find the assembly at all - Path is blank in Properties and the application fills with "(are you missing an assembly reference?)" errors.
It seems extreme that I would need to get local copies of My.Logging and My.Navigation, replace THEIR My.Common Nuget packages with assembly references, compile, and then replace all the Nuget packages in the original application with assembly references.
What can I do to get Visual Studio to actually use the local assembly reference?