I cannot change the TFS workspace - azure-devops

Where I work we have a TFS 2015 server. I need to get in to Get Latest on a project, which is under a different workspace. However, I cannot change workspaces, no matter what I do.
When I get into VS 2019 (version 16.8.5), without opening any project, I then get into Source Control Explorer. From there I click on the Workspace dropdown. I see the "Workspaces..." in the dropdown, then select the workspace which is associated with the folder I'm trying to get to.
Then nothing happens. In particular, the workspace doesn't change.
If I go to File | Source Control | Advanced | Workspaces... where I can see all the workspaces I have. I select the one I want to in the listbox. I click on the Edit... button.
That opens the Edit Workspace dialog box, which shows me the working folders, including the one I need. Then I click on the OK button.
Nothing happens. The workspace hasn't changed. I cannot get to our code in TFS, which I need to do. This is a total showstopper.

Change TFS workspace
Connect TFS project and click the button Source Control Explorer, at the top of the source control explorer window you should have a toolbar with a few buttons. Somewhere on that toolbar there should be a Workspace dropdown. Just select the workspace you want to use from that dropdown. Then we could change the workspace, check the pic below.
If I go to File | Source Control | Advanced | Workspaces...
Since these steps just check the workspace info instead of change worksapce, after you click the OK button, it will back to Manage Workspaces page.
If you still cannot change your workspace from the dropdown list. You could create a new workspace and re-map the TFS code again, it should work.
Update1
Thanks for Rod sharing.
Just get out of VS 2019 and reboot it, then it works.

One of my colleagues suggested that I get out of Visual Studio, then reboot. This worked. Not saying it will work in all situations, but it is at least worth while giving it a try.

Related

How to link Eclipse editor window to Eclipse project

I'm running into an issue in Eclipse where the editor pane is not linked to the project in the Package Explorer window. For instance, if I click on a project in the package explorer and then open a Problems window that is set to Configure Contents > uncheck Show all items > set Scope to On any element in same project, it will show any applicable errors or warnings, but as soon as I open one of the class files with an error/warning in it, in the editor pane, the problems list goes blank as the editor pane does not appear to link the active tab to the active project. Simply clicking the Package Explorer window will then repopulate the problems tab until focus goes back to the editor window/tab.
This used to work with older versions of Eclipse, but ever since I updated Eclipse, it no longer does this and I don't recall which version it was that I had been using. I've also downloaded a completely clean copy of Eclipse Luna (latest version) and simply imported the old projects and still the same issue.
Is there any way to change it so the active tab in the editor points to its associated project? It's quite frustrating having to click the Package Explorer window every time I want to look at a list of problems or tasks for a specific project.
Edit: I've narrowed the issue down to minimized windows only and provided an example of the issue below.
Both windows are restricted to "Show issue on project" rather than showing all issues. Notice how the "Tasks" window works as intended while the "Problems" window does not.
Found the issue... sort of. Apparently, if you minimize the problems tab, then try to access it via the minimized icon for the tab, it loses the correct focusing to tell you what the problems are. My previous version was setup in exactly the same way and had no issues, so they must have changed something that broke this. Going to look at submitting this to the Eclipse team, as a bug.

My edited files not appear in TFS's Pending Changes window

I am using VS2010's TFS and have this problem: after 'Get latest version', and try to edit the file, it does not appear in Pending Changes window. I have to use the option 'Check out to Edit' for every files I want to change. It makes me missing some files when working with a big project. Any one have idea to fix this?
Go to File -> Source Control -> Go Online and it will fix this problem.
I didn't see File -> Source Control -> Go Online option. I fixed it by clicking on item and selecting option to check out for edit. That worked.
Did you already opened the project that you are working on through the Source control window? If you do that and your solution is not yet bound to TFS it will be asked now. So bind your solution and projects and then your changes will be visible and you do not need to do check out to edit. You can also see if this is already done by checking if there are vssscc files next to your solution files.
Had the same issue after a connection problem - this caused VS/TFS to think I had nothing checked out. The solution was just to refresh the status via File, Source Control, Advanced, Refresh Status.
Restart Visual Studio and all could be well!
Go to Solution Explorer > Right click on solution > Click "Go Online"
Right-click on the specified file, then select check-in. whit this action file goes to the pending changes
For me, in the context menu of the solution I had an option to 'Add this solution to source control...'.
If you also have this option you should go and add it again. You can keep same location and Ignore All warnings.
For me only after doing this it started seeing the file changes again.
My solution was also online and apparently nothing else was wrong...
Our TFS had errors so after I got it back it only saw new userControls added not edited ones, this is how I fixed it:
RightClick -> Add Files To Source Control -> Keep Local Version (or server)
It had lost it's connection to the folder
I had the same issue with Visual Studio 2022. Go to the File > Source Control > Go online was solved my issue.
Had the same problem in VS2012, none of the answers above worked.
Fixed by opening "Go to All Changes" and including all missing files from there.
If I exclude any of these again, they do not appear under "Excluded changes", and have to be manually included from "Go to All Changes".
For VS 2017, if you have the red checkmarks next to your files,
open Team Explorer box/window -> Pending Changes,
select your files in Included Changes, provide comment
click on Check In button
In excluded changes, click on 'detected' and you will get a dialog box with all detected changes but not added to source control. Choose the changes u want to check in and then click on promote. You will be able to see the changes in the included section and you can check in.
For me was only solution making new workspace with shorter path without special chars. So I didnt use folders like users and stuff but ProgramFiles. Maybe it was because of Win 7.
And run VS as admin for making directories in ProgramFiles
VS2019 Check that all projects are bound there:
Manage Workspaces -> Edit (the workspace you are using)-> Advanced -> Change Location item from "Server" to "Local". This solve my issue
Pls check the mapping in source control.
Open Team explorer -> Source Control Explorer
Check the Local Path mapping.. if it is not appropriate, map it again with correct path.
In my case, the two files ".cs" that were missing in the "Included Changes" section, I have to follow these steps:
In the "Team Explorer" window - under the "Excluded Changes" section -, select the "Show All" dropdown and select the option "Custom filter".
In the text field that appears after the selection was made, type the name of the file - it's not needed to type the full name.
The file results will show and then, you can right-click over the files found and select "Include".
The included file(s) should now be shown in the "Included Changes" section.

Adding existing project folders to the project explorer in eclipse

Probably a very straight forward solution here, but can't seem to find an answer. I recently changed my eclipse workspace to my dropbox folder, so I can work on my netbook when in college and on my desktop when at home. I copied and pasted all my project folders from the old workspace into the dropbox workspace, changed the workspace location in eclipse, but none of the projects are showing up in the project explorer now. Having refreshed the project explorer many times now to no avail, is there any way to add these projects into the project explorer? Thanks
From the main menu bar, select File > Import. The Import wizard opens.
Collapse or click + in General > Existing Project into Workspace and click Next.
Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
Under Projects select the project or projects which you would like to import.
Click Finish to start the import.
I have had this problem in many versions of Eclipse and followed the process outlined by #vijin-paulraj, but frustratingly kept failing...
Until I noticed that the checkbox at the bottom of the wizard "Copy projects into workspace" is checked by default, and does not have an eventhandler attached to it. So if you do not clear this box before selecting the directory it will tell you that "Some projects cannot be imported because they already exist in the workspace." Clearing the checkbox after this will not trigger a form refresh and the Finish button will remain disabled.
TIP: once the checkbox is cleared, select the directory again will trigger form validation and allow you to proceed.
Try importing existing project:
http://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-importproject.htm
The answer for me was to make sure that I was in the correct working set.
I was in the working set from training and had not placed my new project into a working set at all.
While the above answers will most likely place your project into Eclipse, a working set will exclude you from seeing any project that is not placed in it from the package explorer.
My personal answer was to create a new working set to keep it separate from work, via the context menu from the upside down triangle at the top left of the package explorer.
Yours may be to modify your current set by adding the new project to it. This option is also located in the same menu.
My circumstance could have been avoided in the "new project" wizard, if I had placed it in a set from there.
I hope this has been useful. Please, feel free to ask for clarification.

Show modification (new and edited files) since a given date

How can I ask TFS to show me only modified files (new and edited files) in a workspace (or in a folder) since a given date.
Is it possible? or do I have to go myself through all the history and build my own "modification tree".
Open the Source Control Explorer in Visual studio (View->Other Windows->Source Control Explorer), and select the top folder for your project. Then right-click and view history.
This will show all check-ins for all code in this folder ordered by date. Then select two dates from the list of check-ins, right click and choose "Compare". For example if you wanted to see all of the code changed in the past month click the most recent checkin and the checkin from a month ago.
This will show all of the code changed since those two points in time. You can also choose just the past date to compare against your current code. This works in VS2015 which is what I'm using right now. Good Luck.
Use the command line
tf history -noprompt -server:http://tfsserver:8080/tfs/DefaultCollection $/TeamProjectName/path
-version:D2006-12-01T01:01:01Z~D2006-12-13T20:00:00Z -recursive
-format:detailed -login:DOMAIN\name,password"
change the dates in the version flag to what you need and it should get you what you want.
If you open the menu item File->Source Control->Find In Source Control->Changesets... (you must be in Source Control Explorer for this to be available). This will open the Find Changesets dialog. You can then search for change sets by date on a given source folder.
The down side is that you then have to click the details button on each change set to see which files were changed (Double Clicking closes the dialog).
If you are searching for changes this may be the better way. It will allow more interactive searching. If you are trying to print out a report for others to read (or for Change Documentation) then the command line way shown by Alex is better.
Open the Source Control Explorer in VS10 (View->TeamExplorer->Source Control Explorer) and right click to project and click Compare. You can see different options for view. I normally use "Show items that are different" in order to see difference between local and server.

How to change settings for a Visual Studio 2005 Deployment Project

I have a project containing at least one DLL along with the executable output. I have added a Deployment Project to this solution, which asked me for a name and working directory upon creation like all projects.
I named this "MyProduc_Installer" and have been able to modify all aspects of the installation process except for changing the name of the installer itself. Throughout the install process, the user sees messages like "Welcome to the MyProduct_Installer Installer." Even in the Add/Remove Programs list, this is the application's ill conceived title.
How do I change this setting? I have tried right click/properties, as well as all the View options. I couldn't find anything in the assembly information for the executable project, or solution properties.
I have tried right-clicking on the project in the Explorer to change the properties, but here is what I see:
There is no setting here to change the project title.
If you haven't found the answer to this yet, here is the answer.
Visual Studio has 2 sets of properties for Projects -
1 which you can accesss by selecting the Project in Solution Explorer and then right clicking and selecting 'Properties'.
2nd set of properties is in the 'Properies' window which shows up below the Solution explorer. This is the same property window which is displayed for any of the Form property settings or any other control settings.
The 'Product Name' and other project properties for 'Setup' project can be found in the second property window.
Hope this helps.
AC
The easy way to get to the properties you are interested in is to use the F4 shortcut when the project is highlighted. As stated in previous posts this is a very different list to the one you get by right click and selecting properties.
If you mean a Setup project like for winforms, it's the ProductName property. In Studio, I just click on the project name in the Explorer and I get the property window typical to other projects, and it's right there. Other properties include the AddRemoveProgramsIcon, InstallAllUsers, and RemovePreviousVersions.
I happened across this post, where I was having trouble renaming the Product as well.. In regards to using Click Once Publishing.
Since updating all the old names I couldn't get the Publishing to correct itself.
It was found notepading the project file xyz.vbproj in my case and updating the <ProductName>xyz wrong name</ProductName> element that was still wrong.
It was the only place I could find to update it, since the publishing or any property window didn't expose this.