I'm trying to create a build in TFS 2017. However, the project file has referenced dll's in a separate folder. This folder is subst'd as S: drive when building locally. The project file contains references to S:\x.dll and S:\y.dll.
When building local, the user would need to execute the following subst s: "%CD%" (this batch file is inside the folder which needs to be subst'd.)
How can I achieve the same in a build agent? Or am I obliged to transform the way of referencing dll's?
Regards
Daniel is right, for this kind of external dlls, the best and clean way is via the package management solution such as NuGet. There is an excellent extension called-- Package Management in TFS. It's not hard and will not take too much time to do this.
Package Management is an extension that makes it easy to discover, install, and publish packages. It's deeply integrated with other Team Services and TFS hubs like Build so that package management can become a seamless part of your existing workflows.
For more details, you could have a look at this tutorial-- Package Management in Team Services and TFS
If you insist on using a quick solution. Unlike using a subst drive, you could checking-in the external DLLs in the source control . Create an "Externals
" folder within the project folder and place external DLLs there. Use this path to reference the external DLL. This should work with other developers as well as when they checkout they will have the DLL and proper relative path in csproj. It's a solution when we don't have nuget in TFS. A sample showed in this quesiton: TFS dll and references issues