title: VS2019 class constructor with different signatures requires all signatures types be included as references by calling program
body: <p>This has been reported via VS2019 feedback mechanism, but I need a solution quicker. Code snippets are below. Apologies for not knowing how to format this better.</p>
  
  <p>Library class has three constructors, the calling test program in same solution which is .NET V4, is required to have a reference to System.Web when it is not needed. When System.Web is referenced and imported, problem occurs that VS2019 V16.6 thinks Newtonsoft.Json V9.0.1 is being referenced. This is on the critical path for a WS2008R2 (VS2010) to WS2019 (VS2019) migration. Problem not seen on WS2012 or WS2016, both with VS2010.</p>
  
  <p>Severity    Code    Description Project File    Line    Suppression State
  Warning The primary reference “C:\Users\grollman\Documents\Visual Studio 2019\Projects\WriteToQB\WriteToQB\bin\Debug\WriteToQB.dll” could not be resolved because it has an indirect dependency on the assembly “Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed” which was built against the “.NETFramework,Version=v4.5” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.0”.   TestWriteToQB   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2081</p>
  
  <p>Library class</p>
  
  <pre><code>Public Sub New()
  m_Page = Nothing
  dicWinFormsCache = New Dictionary(Of String, String)(StringComparer.OrdinalIgnoreCase)
  InitCRCTable()
  End Sub
  
  Public Sub New(objPage As System.Web.UI.Page)
      m_Page = objPage
      InitCRCTable()
  End Sub
  
  Public Sub New(dicIn As Dictionary(Of String, String))
      dicWinFormsCache = dicIn
      InitCRCTable()
  End Sub
  </code></pre>
  
  <p>calling test program error statement:
  Severity    Code    Description Project File    Line    Suppression State
  Error   BC30652 Reference required to assembly ‘System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ containing the type ‘Page’. Add one to your project. WriteToQB   C:\Users\grollman\Documents\Visual Studio 2019\Projects\WriteToQB\WriteToQB\clsWriteToQB.vb 25  Active</p>
  
  <p>calling test program</p>
  
  <pre><code>Dim m_objclsDataFunctions As clsDataFunctions.clsDataFunctions
  Public dicSettings As New Dictionary(Of String, String)
  
  Private ReadOnly Property objclsDataFunctions As clsDataFunctions.clsDataFunctions
      Get
          If IsNothing(m_objclsDataFunctions) Then
              'Dim applicationCache As System.Web.Caching.Cache = System.Web.HttpRuntime.Cache
              m_objclsDataFunctions = New clsDataFunctions.clsDataFunctions(dicSettings)
          End If
          Return m_objclsDataFunctions
      End Get
  End Property
  </code></pre>