Executing code from code review request without affecting my workspace in visual studio - visual-studio-2012

I see there is an option to execute code from code review request without affecting my workspace using visual studio.
reference:
http://www.visualstudio.com/en-us/explore/team-collaboration-vs.aspx
But, i dont find information on how to do it? any help.

If you are running Premium or higher (which you must be if you can do code reviews) you can use the My Work area of TFS (under Team Explorer) to put your current work on hold before carrying out the code review (which performs in the same way as 1 below) by choosing suspend, when you have finished with the review you can then restart your work which will reset your IDE to the state it was in when you paused your work.
An example of the developer workflow for code reviews and suspending work can be found on MSDN Here
The code review will contain the code in a shelveset, in order to execute code locally it will need to be downloaded to your workspace.
If you were performing the same task without the suspend Feature of my work, you could mimic the behaviour in 2 ways
Shelve all of your current changes / neutralise your workspace before begining the code review
Create an alternative workspace and use this for code reviews, this will leave your normal workspace in its current state.

Related

Azure Devops: check in code changes, but do not change task state?

I'm using TFS on Azure DevOps for source control. Every time, after I check in a code change, the task state will automatically changed to "close". I remember there is a way to prevent the state from changing, say keeping it as 'Active'. But could not find where to set this.
Anyone knows?
thanks
The default setting in Visual Studio is to resolve work items on check in.
To change this behaviour, go to Tools > Options > Source Control > Visual Studio Team Foundation Server and uncheck the box marked Resolve associated work items on check-in

Klocwork - how to scan cross-platform projects?

We have a project with a single code base which we build both on Windows and Linux. And we want to run Klocwork code analysis on both Windows and Linux. Currently our approach is:
We have set up one KW project in the web UI
Inject and build on Linux, push the results to the server, save the report
Inject and build on Windows, push the results to the server, save the report
It somehow works, but the problem is that latter scan effectively overwrites results of the first one. If we save report directly after push, then we can still have a saved copy, but if developers want to triage/analyze the hit which is present only in the first build (i.e. some Linux-specific code), then it's almost impossible because KW has already marked this hit as "obsolete" (because it was not present in Windows scan)
Having two projects is not really an option, because 90% of the code is shared and it will cause huge overhead of developers to triage the same hits twice.
There are multiple options to achieve your goal.
Option 1: There is a tab under projects called Builds. That can give you the build chain report. here you can see the reports of previous builds.
Option 2: Are you using Klocwork desktop tools (Plugins/kwcheck)? If yes, developer will be notified automatically about the new defects/issues that he has produced at his machine. So there may be no question of reviewing Klocwork portal by a developer just to see what are all the issues he has created.
Option 3: I see you have mentioned 90% of the code has been shared. Is that meant, your project needs windows dlls and Linux libraries together to build your project?.
If the Answer is YES, please do let me know. i will think about some possible workarounds.
If the Answer is NO, then creating kwtables is one time job and from second time onwards Klocwork can perform incremental analysis (kwbuildproject ....... --incremental)
Option 4: Creating multiple project is not a bad option. Existing project settings can be replicated and the issue status can be sync. When you push the results to Klocwork server, the results will be pushed from Build Machine to Klocwork web/database server and it creates /projects_root/My_Project/builds/My_Build_Name/ directory. So, maintaining two Klocwork projects wont make much of a difference.
Option 5: Schedule a call with Klocwork support team. They will be happy to assist you with the best possible way.
I hope this helps.

Debug Acumatica Process Failure

I have a client that is trying to run the Validate Customer Balances process in accounts receivable and the process does not finish. What tools are available to debug this?
First of all you need to determine whether the process finishes with an error or is simply taking a long time.
This process has a specific warning stating that balance validation takes a long time:
If you see the process progress indicator spinning, it's most likely just taking a long time. In that case you should either wait until the process finishes or follow the warning to select fewer customer.
If the processes finishes with an error indicator:
Open the trace window and run the process again, error details are usually visible in traces. For example, if you see financial period is inactive in traces then you can resolve it by going to the financial period screen and activating it:
Acumatica's T190 Quick Start In Customization and T270 Workflow API documentations describe the Debugging Process while working with Acumatica.
When you install a new Acumatica version, You must put the Install Debugger Tool checkbox.
You must open Visual Studio project as Admin.
To be able to debug the site's original source code, find web.config file of the Acumatica instance. Setting of Vistal Studio also must be changed as described in documentation.
Change the "False" value to "True".
Go to Debug->Attach to Process... or press Ctrl+Alt+P. Search for w3wp.exe, select the instance you needed and Press Attach.
Then put breakpoints and do debugging as you would do in any other project not related to Acumatica.

How to synchronize source code from one TFS to another TFS

We are maintaining code for one of our clients.
Initially, we copied all the source code that they have and added it to our TFS 2012.
We modify the code any time they need a bug fix and give the client deployment packages.
Now, client wants all the latest code in their TFS 2012 as well.
Is there a way to update their source code with our changes? ...
preferably automatically (i.e. power shell script) and preferably with history of changes.
There are many approaches each with some pros and cons. The following are the main options I would suggest.
Database backup and restore
This is the only path that guarantees full fidelity. It has some technical difficulties (e.g. SQL Server version and editions) and political (how much information you care to expose, how much effort you want to put in sanitizing your data).
Project synchronization
There are some tools, most notably the Integration Platform, that use the API to read and reply the changes from one system to the other. It requires that the syncing tool can see both systems via HTTP(S).
It gives you the flexibility to project only some data (say source code not work items).
Keep in mind that you will always loose something in the process: the Changeset number will never match, some users details.
Dumb dump
Give up conserving full history and be content to share the code.
This is the simplest to implement: get all the code, ship and check into the other system. You can associate release notes in the check-in.
Two simple scripts using TF.exe is all you need.
You can use TFS Integration Tool to achieve the code migration(TFS-to-TFS). TFS Integration Tool moving data between two different servers. The migration is done through the APIs of TFS, and there also some limitations.(Check the above link for more info)
Detail steps please see my answer in this question: Move Team Project to another Project Collection TFS 2013

Visual Studio 2012 Build Process Template Dropdown does not populate

My issue is that I cannot select a build process template after migrating to TFS/VS2012.
I managed to google and find one article which suggest the same problem here,
Possible Bug
Any ideas how I can get the dropdown to load the Build Process Templates or why they may not be getting loaded?
Also, I am able to click New->Copy Template, and copy successfully, but it never populates the dropdown list after accepting.
Possibly the same issue
I recently ran into the same problem but not related to upgrading the server. We were not able to see build process templates when trying to add a new build definition. We are in TFS 2012. This team project also appeared not to have any build definitions. That was expected though because we had not yet used the TFS builds on this team project.
The problem was caused by someone with admin rights setting the "View build definition" and the "View Builds" access rights to Deny for everyone.
By just setting that back to allow on the TFS group, we suddenly could see the build definitions and also were able to select build process templates.
It was really strange that it let us add new build process templates, but we couldn't select them.
Sooo...
I was finally able to get the templates loading by doing the following.
Unmapped the entire TFS project which had been mapped in a sub folder and not at the root.
Deleted files from disk completely
Remapped the TFS project, this time from the root TFS project level
Accepted the "get"
After doing this my build definitions loaded and worked. (Seems to be a mapping issue...bug...)
This may be an extream solution and I am still not sure what happened but it now works.

Resources