Search code examples
dll-injectionazure-artifacts

How to consume a VSTS artifact DLL from another pipeline in my VSTS MSTest pipeline


I am trying to use a DLL artifact from a developers build pipeline in my VSTS MSTest build pipeline. I need to reference this DLL but I get an error - Error CS0246: The type or namespace name 'Adv' could not be found (are you missing a using directive or an assembly reference?)

I am able to download the DLL's/Artifacts successfully to the agent using Download Build Artifacts option in my pipeline.

How can I get my build in the VSTS pipepline to use the downloaded DLL artifacts on the agent and get rid of this error?


Solution

  • I found out you need to use the copy files option to get the DLL's where you want them. I first tried \bin\debug but the problem there was the build creates these areas automatically and it overwrote my file copy. I noticed in the build log it was considering looking here for the DLL's - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0.

    I updated the copy files to copy there and the solution builds just fine now.