Strange pending edit on visual studio? - visual-studio-2019

When I open a model.bim file in Visual Studio and then I close it without making any changes I see this:
Why do I see a pending edit on the .layout and the .smproj? how can I avoid it?

I'm guessing that .smproj is updated because .layout is updated.
.layout could be updated if you changed anything in the measure grid or the diagram view. If the file didn't exist before, I believe it gets created automatically.
See this link for more information on the .layout file.
We save out a lot of view state information for tabular models. Some
of this view state information is something that you would want to
share with other developers in a shared development environment. The
position of measures in the measure grid and the position of tables
and connectors in the diagram are two such examples.

Related

How to move project to another users project area in TFVC

Our TFS is not set up to be used in the traditional way since we moved it from Visual Source Safe which had a user\project hierarchy. Now I need to do a Move command to give another user a project that he is taking over from me and I want to use Move so it will preserve history. I understand that the parent of what you are moving must have mapping set up in order to get the option to Move activated and I've done that but it gives an error when attempting the move.
I hope the picture gives a better understanding. Help! Please!
Unfortunately, the 'Move' option will only move source files without their history information. TFS doesn't provide any feature to move items with history. You could use some other tools like TFS Integration tool.
Actually, when you use the 'Move' option to move, TFS first copy your files to your target place then delete the original files, so it looks like a migration.
That's why the history can't be seen after moving. The old history is still under the original place.
In addition, when you 'Move', the parent folder should be mapped and the target place folder should also be mapped.

Adding field to work item in TFS results in permission error

In TFS I have a started a Scrum project, but I want to add some fields to a Work Item.
So I'm following this tutorial on how to add Estimate and Completed work hour fields to a Work Item.
I added one field in the layout, like shown in the tutorial. But when I try to save it I then get the following error:
TF237113: You don't have enough permissions to complete the import operation.
I think I have all the needed permissions. I changed all my user permissions and also the permissions I have in the TFS project that I'm working on.
But so far no luck. Even when I try to add a field in the Layout tab that already exists, then it still gives me that error. Anyone any idea what I can try to solve this error?
It looks like you're using Visual Studio Online (Since I can see that you have a Windows Live ID), Visual Studio Online doesn't support process template customization at all at the moment. This is due to the fact that they release new versions of the service every 3 weeks or so, and having to consolidate and test all customization across all projects would be a major pain.

TFS 2010: history lost after moving a folder

In order to clean up my project structure, I moved a folder into another (new) folder through the TFS Power Tools Shell-Extension (Rename/Move).
After checking the history at the new place, the move is the only entry. (I tried one folder up, down, even on single files in the moved folder.. same result.)
I had also put on some labels on versions of the folder before the move, since there were some important states of the code I wanted to get back to.
So.. what went wrong, and how can I either get the history or at least find out the label names again and check out those versions?
Turns out it is pretty easy.
In Visual Studio 2010, go to Tools->Options. There you can find the option to show "deleted" items (roughly in the middle of the dialog box). The old folder got deleted during the move - it will be displayed again after activating that option. (They will be kind of grayed with a red cross.)
Labels seem to have disappeared, though, so I had to go by version.
In the Source Explorer you have the normal operations again - like View History or Get.
DISCLAIMER: For reference of everyone that gets here, this answer is not fixing #Andreas problem, just giving some context on why this happens and offering a couple of workarounds.
Seems that losing history when moving folders in TFS 2010 is not a bug, is a "feature". (still happening in TFS2012. From this MSDN link you can read official Microsoft answer:
Thanks for the feedback here. The previous comment about this being by design is correct, and there is an option on the command line. In the UI, history of folders is recursive - always. This is because most of the time, users care about the history of the contents of the folder. Files on the other hand dont have the concept of recursive history - you always see the history for the file itself. Now, from the command line, there is an option to show recursive history (/r) and if you run tf history on a folder without the recursive option, you'll see the changes to the folder itself. This would include changes such as a rename for the folder itself.
Workaround to get history once lost: As you can see there, you have a workaround using tf history.
Workaround to avoid losing history: If you want to avoid losing history in folders instead of using move feature, you can use TFS Integration tool to migrate code from one folder to other preserving history, migrating from $/TFSCode/FolderA to $/TFSCode/FolderB. It is a little bit overkill but if the history is pretty important for you is much better than looking for it in deleted folders
It is true that the folder history is lost, but the individual file history is actually not lost. It is hidden under the little "expand me" arrow at the far left on a file history line. Expand it on the oldest history entry for a file, or anywhere you see it, and you will see history of that individual file also from an old location that no longer exists.
At the top of History window you can edit Source location, put the old name and get the full history before it has been moved.
Also, is good to mention that you can get the full history back by moving/rename the branch back to the old location/name.

TFS: Applying a label at checkin?

I'm evaluating TFS as a replacement source control option for company, and documenting how our current processes would change or stay the same if we start using it.
We use labels fairly heavily in our current product, not just for creating snapshots of a given build, but also for targetting specific modifications for future builds. Our standard is to always check-in each file with a label of the release version it's intended for.
Our current software has an option for "Label" right on the check-in screen, so checkin/label is a one-step process. Is there a way to do this with TFS? I see that you can open the source control explorer and label things after the fact, but if users are going to have to go clicking around to find the right changeset to label after the fact, I want to be sure to document that...
I'm not aware of a way of auto labelling every check in, but a couple of options spring to mind.
You can set up a list of text fields that must be filled in (in the check in notes section of the pending changes dialog), and even make these fields compulsory, so it would be easy to add a "for version" note to every check in. IIRC this is set up by right clicking on the team project in team explorer and going to the source control options.
TFS raises events for actions like check ins, so you can use the TFS api to handle the event on your server and add a label automatically. You could even pick up the check in notes to tell your code what the label should be.
This may be where you need to change your current processes. With TFS (or other version control systems), all the developers targetting a particular release should all be working with the same branch in TFS, i.e., you have a dedicated branch for each parallel development stream. Thus the need for labels is reduced. This is a much better approach than using labels, because you can look at a branch and see what will be in that release, without having to sift through labels to see if a particular change applies to the release.
I suggest having a look at the Visual Studio Team Foundation Server Branching And Merging Guide.

Non-editable Work Item Type in TFS 2010

Is there any possibility to create a custom Work Item Type in TFS 2010 that is read-only after the first save?
We would like to implement a very simple code review solution based on a custom review work item associated to a changeset.
The idea is that after the work item is created, it can not be altered afterwards (not even by the original creator).
I've tried setting the System.ChangeDate to FROZEN but that isn't supported and unfortunately the first save is also a change, so setting it to EMPTY or READONLY doesn't work either.
Did you have a look at the community solution for code review for TFS 2010 http://teamreview.codeplex.com/
The most complete solution for Team System Code Reviews: a specific work item type and a Visual Studio add-in for a completely in IDE code review experience. TeamReview exploits the advantages of Team System and VSX to reduce waste and surface new business value from code reviews
HTH
Chees, Tarun
You might want to look at the work item type's workflow. You can make changes to fields in both the states and the transitions.
You could try to modify the transition from New to To Do (or whatever the first state is called for your WI).
In those transitions, you can freeze or make read-only the fields that you want to freeze.
Hope this helps,
Assaf.

Resources