I have a TFS git repository in my paket.dependencies file:
git http://mytfs1server:8080/tfs/2015Projects/_git/DEV-Commons
Withing that repository, there is a file "src/Tools.fs"
In the paket.references file, how do I tell Paket to add a reference to a file within that git repository so that Paket can add it to the fsproj file?
Paket seems not to support this at the moment. There is single file dependency functionality for GitHub, but general git dependencies are handled differently.
You can achieve the same semi-manually though. The way it works for GitHub is that it adds the referenced file as a link to the project. As long as you have the repo dependency in paket.dependencies, Paket will clone it under paket-files
folder and you can link to the file stored there (Paket will need to clone the whole repo, but you'll find your file there).
This way you will get the same behavior in VS and other IDEs. You will lose some Paket support as there will be no information in paket.references that the project depends on the linked file. But for this kind of dependencies there usually is no problem with this being a transitive dependency for something else, which would require version conflict resolution. You can pin specific commit in paket.dependencies for git dependencies anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With