I tried to use unshelve /migrate command of tfpt to move the shelves of one branch to another. I have used the command which is given below,
tfpt unshelve /migrate /source:"$/Project name/branch name" /target:"$/Project name/branch name" "shelvesetname"
But gives the error as "Unable to determine the workspace"
Is there any solution for this?
Can anyone give the examples of how to give target and source paths?
How to do unshelve with migrate in Visual studio 2012 interface ?
Are both branches mapped in a workspace on your local machine?
If not, map them.
If so, are you running the command from within the workspace?
i.e. "$/Project name/branch name" is mapped to "C:\TFS\Project Name\branch name"
so run the command from "C:\TFS\Project Name\branch name"
Finally you could try running tf workspaces before running the command
Related
I am trying to clone a github repository from my account in my Android studio, but each time I try to clone it by
VCS -> get from version control -> URL, an error message pops up with message:
"Clone: Unable to create destination directory".
What can I do?
Go to your Android Studio installation directory (usually Program Files/Android/Android Studio).
Go to the bin folder.
Right click studio64.exe (or studio.exe if you're using the 32bit
version) and run it as an administrator.
Now clone should work just fine.
I'm sure there is a better solution out there but right now, this should work.
Check your folder path.
In my case, my directory name had whitespace, so I changed the folder name from namu nikam to namunikam.
After that, github cloned the project.
The project error message was:
Cmd doesn't allow us to run commands with any space in between
Sometimes we use underscores between words, like namu_nikam.
I have a PowerShell script that works all the time when I use from my local machine (I have azCopy installed):
AzCopy `
/Source:C:\myfolder `
/Dest:https://mystorageaccount.blob.core.windows.net/mystoragecontainer `
/DestKey:<storage-account-access-key> `
/Pattern:"myfile.txt"
Using azure pipeline (Microsoft Hosted agent) this script fails with
"AzCopy.exe : The term 'AzCopy.exe' is not recognized as the name of a cmdlet, function, script file, or operable program."
I have tried different agents but still the same error.
Which agent I must use to use azCopy?
Am I missing the obvious?
Is there another way of doing this always using powershell?
To copy files to Azure with AzCpoy you can use build-in task Azure File Copy, you not need use PowerShell:
In addition, you can install the Microsoft Azure Build and Release Tasks extension that give you another task "Azure Copy File Extended" with more options.
Agree with Shayki Abramczyk, the Azcopy task he provided can also be used to achieve copy file. This is another way, you can consider give it a try :-)
Back to this issue. According to error message, I think it's because the missing SDK in hosted agent.
Until now, Microsoft does not install Azure.Storage.AzCopy in every hosted agent. So, the agent you used may does not support this.
We provide seven different agents for user use, but only Hosted VS2017, Hosted Windows 2019 with VS2019 and Hosted Ubuntu 1604 has been installed the SDK which support Azcopy.exe.
So, you can try with these three agents to execute your azcopy command with powershell.
Edit:
Becaues the executable file (azcopy.exe)is in local. So, where is your AzCopy.exe located? For me, it's C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy.
So, in script, you need to execute cd command to change directory to the file where AzCopy.exe located first.
cd “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy”
Note: DO NOT lost double quote here, or you will get x86 is not recognized. If file path located not same with mine, just change file path with yours.
And then, because of using Powershell, you may need to use powershell syntax. Here is the complete format example which modify it based on your script:
$source="C:\MyFolder"
$dest="https://mystorageaccount.blob.core.windows.net/mystoragecontainer"
$pattern = "myfile.txt"
$destkey = <key>
cd “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy”
$azcopy = .\AzCopy.exe /Source:$source /Dest:$dest /DestKey: $destkey
/Pattern: $pattern
Please try with it.
For people like me, landing to this thread because they have this error by calling AZ copy in a PS Script, it's confirmed AZ Copy in not installed in Last (VM2019) version of Windows Hosted. But according to MS, binary is present in the Image, so you don't have to install it, but just to use the right path.
For more information about packages installed (or saved) on VM, you can check this Git Repo
I've set up a new workspace in /Users/sylwester/test and checked for get all revisions and switch to workspace. Every time i start p4v and select my workspace after login I get this error. The command it says it has performed is:
p4 changes -s submitted -l -m 100 /Applications/...
The p4v executable is of course in the /Applications/ directory but my workspace in /Users/sylwester/test. To be sure it was not fixed at a later version i upgraded p4v to 2017.2 (P4V/MACOSX1011X86_64/2017.2/1518788)
It sounds like you have a filter somewhere (probably the history or submitted changelists tab?) that specifies /Applications/... as the path. If you clear or fix that I'd expect the error to go away.
I renamed my computer name, and now my TFS workspace is broken in Visual Studio 2012.
When I type:
tf workspaces /computer:ABOTONJIC-PC /owner:* /format:detailed
Workspace : ABOTONJIC-PC
Owner : wrongowner#test.com
Computer : ABOTONJIC-PC
Comment :
Collection : netuse.visualstudio.com\DefaultCollection
Permissions: Private
Location : Local
File Time : Current
But I need to have :
Owner : realowner#test.com
Computer : NEW-PC
Then I try:
tf workspaces /updateComputerName:ABOTONJIC-PC /collection:netuse.visualstudio.com/DefaultCollection
No workspace matching *;wrongowner#test.com on computer NEW-PC found in Team Foundation Server netuse.visualstudio.com/DefaultCollection.
So my question are :
How to update computer name in my workspace?
Why TFS still shows "wrongowner#test.com" in workspace although there is new email registered as "realowner#test.com"?
Install Team Foundation Sidekicks. It's free.
Open the Workspace Sidekick, click Search, and select your workspace from the list.
Click the blue computer icon to Update Workspace Computer Name and you're done.
I installed Sidekicks. It did not work for this issue, but this did:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"
I had the same issue, also a VisualStudio.com account.
I've tried what the prompt told me :
Like so :
tf workspaces /updateComputerName:MyOldComputerName
but I got back :
The /collection option must be specified whenever /updateComputerName
or /updateUserName is specified.
In order to get the collection name I ran :
tf workspaces
which listed my collections and I got the name of my collection (...myusername.visualstudio.com...)
Then I ran :
tf workspaces /collection:http://myusername.visualstudio.com /updateComputerName:MyOldComputerName
Didn't work as I got this:
TF31002: Unable to connect to this Team Foundation Server:
http://myusername.visuals tudio.com/defaultcollection. Team Foundation
Server Url: http://myusername.visualstudio.com/defaultcollection.
Possible reasons for failure include:
- The name, port number, or protocol for the Team Foundation Server is incorrect
- The Team Foundation Server is offline.
- The password has expired or is incorrect.
Technical information (for administrator): The remote server returned
an error: (404) Not Found.
Then I noticed that I've typed http instead of https, corrected, retried and it worked!
In
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>
run in CMD as admin this command
tf workspaces /collection:https://SERVER_NAME.visualstudio.com/DefaultCollection /updateComputerName:OLD_COMPUTER_NAME
To get this to work in Visual Studio 2017 use the following (new location)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe workspaces /collection:https://youraccountnamehere.visualstudio.com /updateComputerName:OLD-COMPUTERNAME
Hope this saves someone some time!
Look at this link
Vaccano said :
This command did the trick:
tf workspaces /updateComputerName:MyOldComputerName
/s:"http://MyServer:8080/tfs/MyCollection"
It had to be run from the computer I wanted to assign the workspace to (that is how it gets the new computer name.
>
tf workspaces /updateComputerName:REPLCATEOLDCOMPUTERNAMEHERE /collection:REPLACETFSURL
example:
tf workspaces /updateComputerName:DESKTOP-42CLO97 /collection:https://testuserxx.visualstudio.com
VS2017
Open Command prompt and type as shown in below
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
and type the following code with your credential
tf workspaces /updateComputerName:OldComputerName
/s:"https://tfsServerName"
In CMD prompt
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>tf
workspaces
/updateComputerName:OldComputerName/s:"https://tfsServerName"
You can add new workspace then use vs 2017 delete your previous workspace:
What worked for me was typing
tf workspaces /updateComputerName:MyOldComputerName /collection:"anything".visualstudios.com/DefaultCollection/
Open the visual studio command prompt and type the following command
tf workspaces /updateComputerName:oldcomputername /s:http://tfservername:port#/tfs
for example
tf workspaces /updateComputerName:abc-PC /s:http://mytfsserver:8080/tfs
You can run the following command before and after running the above command, this is just to check the workspaces information on your computer.
Remember: run all these commands on client computer (which is renamed) and not on the computer where TFS server is installed.
If user name is also changed then run the following command
tf workspaces /updateUserName:oldUserName /s:http://mytfsserver:8080/tfs
Hope it will help.
Visual Studio 2010, in my project I made a custom build step which renames a dll file and copies it to other folder. So, Alt+F7, Config props, Custom Build Step / General, command line:
copy /y $(TargetPath) $(TargetName).node
It didn't do anything. Then I also added
ping bat.femei.ro -n 1 -w 5000
It still didn't do anything. It simply flashed a command prompt window for a split second then the window went away. I googled as much as I could concluding that there might be a problem with the folder where the batch file is generated.
I did my best to screenshot that split second with the command prompt and after a boring F7-PrintScreen-PasteInPaint session finally I got
C:\Users\FURAT\AppData\Local\Temp\blablablablablablablablabla.exec.cmd is not recognized as internal or external...
I double checked the directory. It has Everyone permissions set to Allow both Read & Write operations. What's wrong? How do I fix this?
I was unable to find any knobs to tweak temp folder path. It's not Env and it's not in the config either.
What did work however was running VS2010 as Administrator. Now the Custom Build Step works.