visual-studioproject-reference

Why aren't project references being added in visual studio 2019?


I'm trying to build a project downloaded from here to help automate SSIS project builds (SQLSrvIntegrationSrv\sourceCode\sourceCode\main\SSISMSBuild\Project):

When I've downloaded, the following references show up as missing:

I've hunted them down and found them in the folder C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio, and added them as references using browse. Two have been added to the project fine, but the DataTransformationServices one just won't resolve - I check the box next to it, click ok, and nothing happens. No error message, the reference just doesn't resolve and when I just go back into references the box is unchecked again.

enter image description here

Even more frustrating, I tried this on a different machine and none of the three references were resolving properly. DLL version numbers are the same on both machines so can't see what could be going wrong. Does anyone know what this behavior might be caused by?


Solution

  • Had a look in the csproj file, the reference hintpath for all three references was as below:

        <Reference Include="Microsoft.DataTransformationServices.VsIntegration">
          <HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Microsoft.DataTransformationServices.VsIntegration.DLL</HintPath>
        </Reference>
    

    Changed the leading dots and slashes to C:\ as it should be. No idea why visual studio wasn't changing this. Had problems building that went away after restarting visual studio.