How to clone TFS-2018 nuget feed? - tfs

I have local corporate TFS 2018 server and Nuget on it.
I create a nuget-feed.
This feed i will use for 1 iteration.
Then, i need to create next feed,for next month. It is out buisness process.
So, how to clone nuget packages from old feed to new? Or, can i clone feeds?
Thank you!

You'll have to write some scripts using the REST APIs to accomplish it. There's no way to clone a feed at present.
I'd suggest not doing it and correcting your business process. There's no reason to do this. You can add tags to specific package versions to correspond to releases, if that's your ultimate goal.

Related

Is there a way to search and pullup App Releases using TFS CLI?

I have just begun using TFS command line version. I love it. However, I need to know how to find an App Release that is associated/assigned to a given Branch (A) and (B) how to retrieve that App Release using TFS Command Line.
Is there a way to do this?
Thank you!!
I am lost on this one, after having spent a fair amount of time search the TFS Help files (tf vc help, etc.), Google, DuckDuckgo, etc.
tf vc help
I would like to see the App Release using TFS Command Line.
Just as Daniel suggested in the comment.
We recommend to use Rest API to fetch such kind of information.
You could either use some 3rd-party extension to Auto App Version.
Or you could link work items to a release or use Rest API to query release info in an 3rd-party/powershell task.
Kindly refer this blog-- Auto-generating release notes in Azure DevOps pipelines
tf.exe command which is used to run version control commands. Also have some limitations, it only work with TFVC not work with git.

git-tfs one checkin for multiple tfs projects

At my work, we have a number of separate TFS projects that are combined together to form our Visual Studio solutions. These separate TFS projects are maintained so that we can reuse code across multiple solutions. Admittedly, this was a bad idea, as now when we have to branch we must branch each TFS project individually (we even wrote an app to do this). We end up with a project structure that looks like this:
$/Production/[superproject]/MAIN
$/Production/[superproject]/dev/[branch]
$/Production/[dependency1]/MAIN
$/Production/[dependency1]/dev/[branch/
where [superproject] requires [dependency1] within the solution. We end up mapping all these projects to the same workspace.
I would like to use Git-TFS in order to use Git in my day-to-day development. So far, the best way I have found to do this is to have a "master" git repo with a submodule for each TFS project. This way I can branch, diff, etc by using git submodule foreach.
Unfortunately, our policy regarding checkins is to have one changeset for a task, even if the changeset spans multiple TFS projects. This is fine if all my changes are constrained to one TFS project (i.e. one git submodule), but when I have changes across multiple submodules for one task then I don't know what to do. My current plan is to shelve each individualy using git submodule foreach 'git-tfs shelve mytask_$name' and then pull each into my TFS workspace, checking in from there. That only works for whatever TFS branches I have already mapped, which defeats half the purpose of using Git in the first place.
Has anyone encountered a similar problem? Are there any solutions already out there, perhaps using the TFS command line & a script? If not, I suppose I will spend some time creating a pull request for git-tfs. I am open to using Git-TF if the problem is solved there.
Thank you all in advance.
I think there is an effort in this way here : https://github.com/git-tfs/git-tfs/pull/350
you could have a look and contribute ;)

Get the history of TFS for expired trial version

I installed the Basic TFS trial version and now it got expired.
It is mandatory for me to get the history of TFS.
Where does it store the history? Does it store it in the SQL Express?
Is there any way to get the saved history?
Digging through the database is not trivial. You'd have to piece the history back together and de-deltify all the blogs.
It would be much easier just to get your TFS instance working again so that you can get the files out of it. TFS Express 2012 is now available, and has no such time restriction. It's free for up to 5 users. You may be able to upgrade your existing installation.
If you are still able to do a get, you could hook up git-tfs. Once you execute the git-tfs clone, you will be able to view the history using git. You can look at this tutorial for more information.
Did you consider trying querying the TFSWarehouse and use and automatic script to recreate history ?
Reference: Export TFS 2010 History to Excel or Text Document

Invoke Nuget From the VS2010 DTE

I have created an VS Addin that creates a new project conform my specs and file structure.
It does all the heavy lifting as cloning repos from mercurial, adds the needed references to assemblies and projects in the solution.
Now I want to bring it one step beyond.
Is there a way to invoke Nuget from my add-in.
If so then I can install my "standard" packages right after the new solution is created without my personal intervention.
In Nuget there is a reference TO the DTE, but is there a way to use it FROM the DTE.
Use NuGet.CommandLine. You can read how to use it here.
Also make note that NuGet 1.5 brings some new features, though I'm not sure how relevant they are for you.

Where can I get large sample TFS repositories?

I'm building a tool to integrate with TFS and it needs to properly parse TFS logs (from the tf.exe history command) and checkout different revisions (again using tf.exe). It works great on the test TFS server I have, but I want to test it on a broad range of large repositories to make sure my parsing works properly.
I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member.
Are there any collections of open source code hosted on public TFS servers? Are there any other publicly available servers I could use for testing?
I would suggest using svn2tfs and choose any relatively active project on SourceForge. There are plenty of projects on SF to choose from that use SVN and not CVS. You might even get a bonus out of it and help the svn2tfs project work out any kinks.
Since you mention tf history command, I assume you want to collect/parse logs on the project's (and its files) history of checkins.
So in addition to large repository, you also need a good amount of history, am I right? If yes, then here's your set of problems:
Most projects on codeplex use Mercurial, not TFS. So even if you get access, you cannot use TFS with them.
As you mentioned, they require you to a be a member for you to access the source.
Even if you get access or find a public server (unlikely), you still would need good amount of history.
If I'm correct in my assumptions so far, here's the easiest (bit tedious though) way out:
Go to any large projects's such as Nuget or Wix
revisions
Download any old revision (go back as far as you want the history for). You can download zipped src files without being a member.
In your test server, checkin the code (src) to create the baseline.
Download the next revision.
Checkout files in your server and overwrite them with the newer revision's files.
While checkin, use the history.txt (sample) to create checkin comments
Repeat this process few times.
Voila!! You now have a large repository with lot of history!
Hope this helps.
Have you tried some of the larger projects on Codeplex?
http://www.codeplex.com
If you only need read access you should be able to play around with the various repositories.
I don't have a huge amount of tfs experience, but I would assume there are migration tools that let you ingest code repositories from other products (e.g svn or hit).
If so, you might want to find a svn/git repo for a sizable foss project, and try importing that.
"I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member."
This solution appears to be the general consensus amoung SO'rs. I've read some of the Codeplex TFS connection problem threads (you linked to below) and I hope the comments in this thread resolves the issue:
Connecting to Codeplex TFS as a Coordinator or Developer.
I'm wondering if you can use git-tfs project to import an existing Git project into TFS.
Download and install git-tfs
Create a new TFS project
Clone the TFS project to a Git project using git-tfs ("git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project")
Import a existing Git project of your choice into your fresh new Git project (I don't know the command but I think it's possible).
Use git-tfs to checkin to TFS Server ("git tfs checkintool")
=> Do it makes sense ? And works ?
For more information:
http://lostechies.com/jimmybogard/2011/09/20/git-workflows-with-git-tfs/

Resources