Reference GAC assemblies in new CSPROJ format?
So I found this thread on GitHub which indicates <Reference> not discovering assemblies added to the GAC is expected behavior:
This behaviour is by-design. You can opt back in as shown here. This should not be considered a workaround, but rather a deliberate and supported opt-in where you accept the consequences of having potentially different (and even incorrect) build behaviour on different machines.
The solution is to do the following:
<PropertyGroup>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
</PropertyGroup>
I can confirm this resolves my issue completely even without using a HintPath.
But the natural next question is -- if resolving added assemblies in the GAC will not work by default, why doesn't Microsoft leverage NuGet for the Azure SDK? The only official Azure reference in NuGet is old. Does this mean any Azure project using the new CSPROJ format will need to manually add GAC into AssemblySearchPaths?