title: Deploying custom SSIS connection manager failing with '...is not recognized as a valid connection manager type'
body: <p>I have made a custom SSIS Connection Manager (.NET 4.6.2):</p>
  
  <pre><code>namespace HelloWorldCm
  {
      using Microsoft.SqlServer.Dts.Runtime;
  
      [DtsConnection(
          ConnectionType = "HELLOWORLD",
          DisplayName = "Hello World Connection Manager",
          Description = "Connection manager for Hello World")]
      public class HelloWorldConnectionManager : ConnectionManagerBase
      {
          public override DTSExecResult Validate(IDTSInfoEvents infoEvents)
          {
              return DTSExecResult.Success;
          }
      }
  }
  </code></pre>
  
  <p>I'm referencing <code>Microsoft.SQLServer.ManagedDTS</code> version <code>14.0.0.0</code> which in my understanding is SQL Server 2017. Locally, if I register it in the GAC and copy to my <code>/Connections</code> folder I can use SSIS from within Visual Studio, and add the Connection Manager into my <code>DTSX</code>. </p>
  
  <p>I can save / build etc and it's working fine - so I then copy the Connection Manager and DTSX to my VM running SQL Server 2017. I once again register in the GAC and copy to the <code>/Connections</code> folder. </p>
  
  <p>I then <code>Import Packages...</code> into my <code>Integration Services Catalogs</code>, select the DTSX and press <em>Next</em>. This then tells me that:</p>
  
  <blockquote>
    <p>One or more selected packages are not ready.</p>
  </blockquote>
  
  <p>And when I look at why I see:</p>
  
  <blockquote>
    <p>The connection type "HELLOWORLD" specified for connection manager "Hello World Connection Manager" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.</p>
  </blockquote>
  
  <p>I've been trying to get this to work now for quite some time, so I'll list what I've tried:</p>
  
  <ol>
  <li>Tried 'Any CPU' version</li>
  <li>Tried 'x86' version</li>
  <li>Tried 'x64' version</li>
  <li>Tried DTSX with a dummy Task as well</li>
  <li>Restarting the server (after any deployment)</li>
  </ol>
  
  <p>I'm sure others. What I've also done is create a Custom Task, which simply printed 'Hello World' to the logs, this was compiled as 'Any CPU', deployed in the same way (to the same locations) and SSIS didn't seem to have any problems finding it and accepting the DTSX. So I'm reasonably confident 'Any CPU' should be good enough. </p>
  
  <p>I'm not sure where to go now - as far as I can see I've got the right references, the right .NET version, and deployment is the same as for the task.</p>
  
  <p>I've put the <code>dtsx</code> below in case it's something in there:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"
    DTS:refId="Package"
    DTS:CreationDate="6/11/2019 1:09:07 PM"
    DTS:CreationName="Microsoft.Package"
    DTS:CreatorComputerName="CHRIS"
    DTS:CreatorName="CHRIS\cskar"
    DTS:DTSID="{0F2D59A1-461B-46ED-8765-75484C06253C}"
    DTS:ExecutableType="Microsoft.Package"
    DTS:LastModifiedProductVersion="15.0.1100.123"
    DTS:LocaleID="2057"
    DTS:ObjectName="Package1"
    DTS:PackageType="5"
    DTS:VersionBuild="1"
    DTS:VersionGUID="{E688A11B-234E-4F39-991E-BAA0A37642E6}"&gt;
    &lt;DTS:Property
      DTS:Name="PackageFormatVersion"&gt;8&lt;/DTS:Property&gt;
    &lt;DTS:ConnectionManagers&gt;
      &lt;DTS:ConnectionManager
        DTS:refId="Package.ConnectionManagers[Hello World Connection Manager]"
        DTS:CreationName="HELLOWORLD"
        DTS:DTSID="{9E82E067-2A0A-4C9C-931D-FD59FD159B5C}"
        DTS:ObjectName="Hello World Connection Manager"&gt;
        &lt;DTS:ObjectData&gt;
          &lt;InnerObject&gt;
            &lt;TargetServerVersion
              Type="3"
              Value="150" /&gt;
          &lt;/InnerObject&gt;
        &lt;/DTS:ObjectData&gt;
      &lt;/DTS:ConnectionManager&gt;
    &lt;/DTS:ConnectionManagers&gt;
    &lt;DTS:Variables /&gt;
    &lt;DTS:Executables /&gt;
    &lt;DTS:DesignTimeProperties&gt;&lt;![CDATA[&lt;?xml version="1.0"?&gt;
  &lt;Objects Version="8"&gt;
  &lt;/Objects&gt;]]&gt;&lt;/DTS:DesignTimeProperties&gt;
  &lt;/DTS:Executable&gt;
  </code></pre>