Removing references from renamed VSTS project (not TFS) - azure-devops

I had deleted a project from VSTS and would like to use the same name again for my project but when I try to create the project, I get this error:
All of the desktops that this message is referring to are gone e.g. old employees, virtual desktops, etc.
How do I get past this error? I'd hate to retire a project name because of old desktops or ex-employees that will never access this project again.
UPDATE:
When you know what you're doing, everything is easy and questions like mine are frowned upon, so much so that someone suggested this post should be closed. Very nice!
So, I'm told both TFS and VSTS work the same way and I should go learn what I need to learn from the other post. According to the linked post, I need to go run TF command which according to the answers is located in Visual Studio 20xx/Common7/IDE folder. I go there and TF.exe is NOT there. I then start searching my computer to locate this executable and my computer can't find it. I then Google it and here's what I see on Microsoft's documentation. What gives?????

Regarding VS2017, the Tf.exe is in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer, you also can call TF command in Developer Command Prompt for VS 2017.
On the other hand, you also can remove workspaces through Visual Studio directly (Manage workspaces and check Show remote workspaces option)

Related

How to deploy an Office VSTO add-in using Visual Studio 2017

I've created an Outlook add-in, debugged and works fine. I want to be able to package it up for distribution. This is for a very limited audience 5-10 people. What are the steps to doing so?
I tried Build | Publish which appears to work (using options of local filename and CDROM install location), but creates a massive 1.5MB setup.exe file and when it is executed, takes forever (it appears trying to contact some remote server and times out and pops an error, although the add-in appears to be registered).
Looking online, I found references to creating a SetupProject or using InstallShield Limited addition, but none of those appear to apply to Visual Studio 2017.
I'd be happy if I could just provide my DLL and a .reg file -- this is for a small set of 5-10 power users.
What is the simplest way to deploy this add-in?
The easiest way is Build | Publish. Just disable any online activities if you don't want it. You can do that in Project -> Settings -> Publish. Check your "Updates" settings for example.
You can download a Visual Studio project type from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects
This will allow you to deploy the package, but it's somewhat buggy in my opinion. Also, the link above does not have any documentation. You have to go to another page for that and the answer is buried in the comments:
https://msdn.microsoft.com/en-us/library/ybshs20f(v=vs.90).aspx
The ClickOnce has worked more consistently for us, however. Just right-click and select Publish on the Project.
It is a long ways off from the old InstallShield LE process, which allowed you to customize the entire process including images, click-through licensing, etc.
But the InstallShield LE had it's own set of issues, and seems to have been all but abandoned.
It may be worth looking at other 3rd-party tools like WiX (http://wixtoolset.org/) to get things installed correctly, or even manually writing your own installer to get things put where they need to be.

nuget - package restore not working

My aim is to have package restore working on a build server so that I don't have to check in binaries. At the moment, I'm simply trying to get it to work on my own machine using Visual Studio.
Here's what I've done so far:
Followed the instructions here http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages, including both setting the Tools-Options flag and the environment variable (belt and braces)
Installed the NuGetEnablePackageRestore package as suggested here NuGet package restore consent without NuGet
Checked everything in (the .nuget solution folder and its contents), but not the binaries I want to reference, because that's the whole point of the exercise
Here's what I'm doing:
Check out solution
Verify that nunit.framework.dll and moq.dll are not present in the checked out solution
Build the solution
Visual Studio complains that Moq is missing. I search for the dlls in the solution directory and find that:
nunit.framework.dll is present in the appropriate bin folders
Moq.dll is nowhere to be found
But there's more. This is truly mysterious, but if I do a fresh checkout, disconnect from the internet and build, I get precisely the same results - nunit.framework.dll is there, but moq.dll is not. The build process has conjured nunit.framework.dll literally from nowhere.
So it's something of an understatement to say that I am completely baffled. Can anyone suggest answers to the following questions:
Why is package restore not downloading Moq?
Where on earth is the build process getting nunit.framework.dll, if not the internet?
In vs, Options, Package Manager... there's a section "Package Cache", if you click on the "Browse" button it will take you to the location of the nuget cache in your machine.
Okay, I noticed in the documentation that enabling package restore was supposed to modify project files in order to add a new target. My project files did not have this change. Right-clicking the solution title in VS and selecting 'Manage NuGet packages...' then added the required changes and everything built as it should.
I checked, and package restore still appears to work when I have no internet access, so I'm still mystified about that. Does NuGet maintain some kind of cache of binaries outside the solution?

Team foundation server on the Mac with Vim

I'm using Vim on a Mac for front-end development and was recently hired at the company that uses Team Foundation Server as their version control system.
I would hate to have to switch to using Visual Studio on Windows because I'm so used to Vim and the Mac.
I found this and was hoping that would be a possible solution. I would still like to avoid editing code in Eclipse. However I wouldn't mind opening Eclipse to do version control stuff.
I'm very unfamiliar with Eclipse and Team Foundation Server (not VCS in general) and I need some advice on how to actually use it.
I'm able to connect to the server and find the project I have to work on, but from here I'm lost. This is the window I'm stuck at.
Anyone who are in a similar situation and could offer some help?
You've done the hard bit I think, firstly you should be able to safely ignore the Work Item and Build "folders" unless someone explicity tells you to use work items, at which point they can show you what you need to know as it works exactly the same as in Visual Studio.
If you double click on the Source Control folder it will open a new window which will show you the source "tree". To be able to Get, Checkout and add source files to the tree you'll need to set up a workspace. Once you've done this then you can get the code and check out.
With Team Explorer Everywhere You also have the option of using the tf command line in the Mac terminal. This would eliminate the need for eclipse. (I'm assuming that as a Vim user you're not afraid to use the terminal)
Another option might be svnBridge however I think you need the server version if you're using a Mac, and this requires a site to be installed in the TFS application server which might not be an option.
Finally TFS now offers support for integration with GIT.

Unable to add Solution to TFS 2010 due to existing (invisible)binding

I have a smallish utility library I made that I had created in TFS Beta 2 to test out TFS. I now have TFS rc1 installed(and Beta 2 uninstalled) and am trying to add my Solution to TFS.
I get an error saying that it is already bound to my old TFS, which was on a different system then this one. Strangely, when I go into Source Control and look at the bindings it says there aren't any. Also, I manually deleted the .vss and .vsc files and it still does it.
Ideas? I looked through the numerous other SO topics related to this but unless I missed one none of them are dealing with my issue.
Ideas?
Grab the TFS Sidekicks from Attrice. They have a workspace sidekick, you can pretty quickly find your old machine and unbind/delete that workspace from TFS.
Once you install:
VS Menu Bar
Tools
Team Foundation Sidekicks
Workspace Sidekick
Owner will defult to you, just clear machine name
Search
Select old workspace, click the red X to delete
I had old server entries too and I fixed it by using the workspace sidekick mentioned here and then using the command line to get the rest that the tool couldn't find.

What do you do if the file in TFS is locked by someone else?

Someone left the organisation but before leaving, he locked all the files for an unknown reason.
How do you unlock them all so that the other developers can work?
For the following operation, you will need to be either a project administrator for the project you want to undo the check-in on or a Team Foundation Administrator if you want to do this across all projects.
If you still have the username of the person, you can simply do something like this:
Open up Visual Studio command prompt (Start -> Programs -> Microsoft Visual Studio 200X -> Visual Studio Tools -> Visual Studio 200X Command Prompt)
Run the following command:
tf lock /lock:none
/workspace:WorkspaceName;USERNAME
/recursive $/
To get the list of workspaces for a user, just run the following command from the same prompt:
tf workspaces /owner:username
For more commands, check tf /?
If the developer has left the organization, then the best thing to do is to delete their workspaces. This will unlock the files for you but also free up some resources on the server.
See the following blog post I did on the topic when it happened to me a few years ago.
http://www.woodwardweb.com/vsts/unlocking_files.html
You can either delete the workspace using the command line (tf.exe) or you can use the excellent TFS Sidekicks from Attrice.
This was the only way I resolved this, which involved deleting the user's workspace.
If the error message says "The item $/... is locked for check-out by someUser:1 in workspace someMachine123." then I use the command:
tf workspace /delete /server:http://machinename:8080/tfs/DefaultCollection someMachine123;someUser:1
There is just a single space between the collection URL and someMachine123;someUser:1.
Note that I payed attention to the fact that the error message mentioned the user as someUser:1, so I mimicked that in the command. It was not enough to just run the command with someUser only. I'm not sure what the :1 is all about but point being, mimick the error message.
Note the server has to be the fully qualified collection path, which you can find by going to Team Foundation Server Administration Console->Application Tier->Team Project Collections, the bottom pane will show a URL for the collection that is selected in the upper pane.
I also had a problem because I accidentally tried to use plural workspaces instead of just workspace because there is a similar command that is plural.
first you need to have the right to do this. If you have that the easiest is to use TFS sidekicks from attrice http://www.attrice.info/cm/tfs/
Here's an explanation of using TFS permissions.
Having the "Unlock other user's changes"
permission set to Allow is required to
remove a lock held by another user.
I needed to add /collection:collectionURL otherwise the workspace could not be found:
List item
tf loc /lock:none /workspace:WorkspaceName;UserName /collection:collectionURL
Have a system administrator reset that users password, log on as that user, unlock all files...
I would think this is the solution to almost all 'someone who is no longer at this organization' questions...
It is better to delete the workspace of that user from the server. example
tf workspace /delete /server:your_tfs_server workspace;username
Sometimes this is masking an different problem with a completely different application is locked by another user, but you cannot even create a New Folder for the new project you wish to merge into ( target won't allow the creation and incorrectly stating that someone has a file locked in their name) but then you dig deeper and another project is the culprit.
So a completely different project can be the problem with it having files locked by someone else.
Method that worked for me, my account has administrator permission on TFS and project :
In Visual studio 2015:
Go to Team Explorer
Click right on your solution and choose Open in source control
exporer
On left side click right on your solution
Choose Advanced
Choose Lock...
On left side click right on your solution
Choose Advanced
Choose Unlock (Now you can choose unlock)
Right now, every dev can easily commit his changes :)
by using TFS permissions,
Open up Visual Studio command prompt,Run the following command:
tf undo /workspace:workspaceName;DomainName\UserName $/file path in your solution
Use this solution as the very last resort.
I’m using TFS 2012. I went to the TFS database and ran the following queries. And it worked! Of course be very careful when messing with the database, take backups, etc.
The database is called Tfs_<<your_TFS_collection_name>>. Ignore the Tfs_Configuration MSSQL database. I'm not sure but if you don't have a Tfs_<<your_TFS_collection_name>> database, settings might be in the Tfs_DefaultCollection database. Locks are stored in tbl_PendingChange.LockStatus.
/*Find correct row*/
SELECT LockStatus, PendingChangeId, *
FROM tbl_PendingChange
WHERE TargetServerItem like '%<<fileName>>%'
/*Set lock status to NULL (mine was set to 2 initially)*/
UPDATE tbl_PendingChange SET LockStatus = NULL WHERE
TargetServerItem like '%<fileName>>%'
AND PendingChangeId = <<PendingChangeId from above>>