You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within a Project, if I use NuGetReferenceSwitcher to switch from a NuGet to a Project Reference for NuGet Package X, and then use NuGetReferenceSwitcher to revert back to the NuGet reference, the .csproj file has an extra line added immediately following the <ItemGroup> ,<Reference Include="X"> nodes as follows:
<SpecificVersion>False</SpecificVersion>
I would expect the csproj file to remain completely unchanged after reverting back to the original NuGet package reference.
Coding fix was to modify ProjectModel.AddReference() to reset the SpecificVersion flag to true.
// ReSharper disable once SuspiciousTypeConversion.Globalif(_vsProject.References.Add(assemblyPath)isReference4reference){reference.SpecificVersion=true;}
where Reference4 is a new Interface I created following the instructions here