TFS2015 modified Scrum Template Tfs_Warehouse DimWorkItem System_WorkItemType always null - templates

We use a modified Template based on the Scrum template. Basically there are some new fields introduced we are need for our deployment process.
After some time we looked into reporting and take a look in the Tfs_Warehouse database and notices that the Field System_WorkItemType is null all the time.
We can also see this effect on the original Scrum Template which we left in it's original state. Does someone ever had a similar effect.
On our test environment for TFS 2017 we can not reproduce the problem but we are unable to switch to TFS 2017 anytime soon.

Pleas try following below steps to fix that:
Make sure the field System.WorkItemType is in use. For example:
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
witadmin listfields /collection:http://server:8080/tfs/CollectionLC /n:System.WorkItemType
Manually process the TFS data warehouse and analysis services
cube to force sync the data.
Check the issue again after the sync.
If that not work, just try to Rebuild the data warehouse and cube, then check it again.
If that still not work, just try to create a new team project with the default Scrum template, check if the issue occurs there.

Related

I accidentally deleted part of my code in c++ Visual Studio

I deleted part of my code, and accidentally saved.
I tried looking at my history and my source explorer, but those were both greyed out.
Help?
Thanks
I'm not sure if you can pull your deleted code out of the void, but you should look into version control software, like Git, to keep a lock on each version of your programs. I know it doesn't solve your problem now, but it will help a ton in the future if you make changes often!
Go to "Edit" → "Undo" to undo recent changes.
Or, go into your version control system's log and revert to an older committed version.
Or, restore from one of your off-site backups.
The most important was already said. However, here some relevant complements:
The Edit -> Undo (or Ctrl+Z) has to be done file by file if you have several files in your project.
The Undo works after a Save, provided that you've set the focus in the editor's window (and not the solution explorer's). However, once you've left Visual Studio, it's lost forever!
The AutoRecover setting in the Environment section of the Option dialog box ensures that a copy of your unsaved work is saved every couple of minutes and keep it a couple of days (in your document folder under Visual Studio 20xx\Backup Files...). Unfortunately, it is designed to protect you against a crash; so the files are removed when you save, and it won't help you (I mention it only in case you were aware of the backup files and hoped to get a solution with it).
If you're working with windows 10 and have activated the file history backup you may luckily look at older versions in the explorer. This will not help if you have done changes and deleted them without a backup in-between (e.g within one hour at least).
You may not like this suggestion because the VS IDE is very comfortable, once you're used to it. But some programming editors allow you to set the configuration to make a backup of the files before you save them (e.g. such as for example emacs or atom). The purpose is exactly to prevent the kind of problems that you've just mentioned.
The best approach to avoid loosing previous work is of course the source code version control, with the corresponding discipline. It's easy to setup: a right-click on your solution in the solution explorer to activate this feature on your project, then at each significant change, again a right-click on the solution to commit the changes. With git, you don't even need to create a central repository if you're working alone on smaller projects. The local repository is sufficient to archive the successive versions of your code and find them back. But again, it's no magic: if you've made a lot of changes and didn't commit them, it won't retrieve them...

VSTS building all branches

I'm moving CI setup from TeamCity to Visual Studio Team Services (was VS Online) switching to the built in Team Services Git. It all seems good but in TC I was able to set it up to automatically build all branches on check-in. This gave lots of benefits and significantly streamlined my process.
Team Services seems to insist that I have a branch filter, does anyone know how I can make turn this into a "build all branches" situation (or why I shouldn't build all check-ins on all branches!)
Oops, sorry I figured it out. Basically, the drop down box to select the branch has a search function into which you can type anything. If you hit return twice it will take this as the filter. If you pass in "*" it will work.
UPDATE
You only have to type in a * and it'll allow it with one enter. It's still on the Triggers tab.

VSTest.console Filter native c++ unit tests by attribute

I'm currently running into the following problem:
We introduced Unit-Tests into our native c++ application by using the native microsoft unit test framework included in Visual Studio 2015 Microsoft::VisualStudio::CppUnitTestFramework.
To start the unit tests inside visual studio we use the Test-Explorer as can be seen in image 1. By adding a method attribute to a Test-Method (as shown in image 2) the Test-Explorer allows to sort and filter by attribute (as can be seen in image 3).
All this works without a problem. We started having a problem when we tried to implement these unit tests into our continous integration system (CI).
To start Unit-Tests from a console we use vstest.console.exe, which is located in: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe. The official documentation can be found Here.
The following screenshot shows how the tests succeed when using the console:
Adding a logger and outputing files to .trx works well too. What does NOT work however is applying a filter to determine tests with specific attributes. According to the documentation something like that should be possible by using the /TestCaseFilter:-switch. The following screenshot however shows the resulting error:
It translates to: "No tests matched the filter because it contains one or more properties that are not valid (TakesLong). Specify filter expression containing valid properties (TestCategory, Priority, FullyQualifiedName, Name) and try again."
Does anybody know this problem or has an idea on how to fix it? Ultimate goal is to be able to exclude certain tests (Take very long / need a hardware dongle etc.).
Best regards, LorToso
I ran into this problem too, and sadly it looks like we're just out of luck. vstest.console.exe only supports a limited number of filters for both C++ and C#.
The approach I think I'm going to move towards is to segregate tests into different modules so I can run unit tests for nightly and CI builds and integration tests (like needing a database) only for releases.
Alternatively, you could split them up by namespace in the same module and use the FullyQualifiedName filter. Unfortunately, there is no '!~' condition either so you might have to work around that somehow.

vtiger crm development setup

The problem is that the source code distribution is not exactly the code that runs after installation. The installer, which runs when the site is accessed for the first time, generates a lot of code. Also, a running system stores some data in php source code (e.g. user profiles - under the /user_privileges directory) rather than in the database. So, I have the following unsatisfactory possibilities.
(1) Put the original source code under VC and edit it. In this case I have to do a fresh install and run the installer every time to see how my changes are working.
(2) Put the installed source code (after the installer has run) under VC, and edit it. In this case I have immediate feedback, but I can't use that code for new installations. I also have to exclude everything that the running system writes in the source tree from the VC.
Any suggestions?
I am working with Vtiger CRM version 6.0Beta, but any tips relevant to version 5 would help.
Thanks.
Choice 1 is appropriate. VC must always track the source code, not the products of any interpreter or processing. I feel your pain. It is so easy to tweak that Vtiger source code, and VC tends to be left by the wayside.
Get familiar with GIT. Really, it is what you want. Look here, I already did it.
Copy the original code in one branch
Copy the modified code into another branch
Make a diff or better, run git format-patch
Install (checkout) your new Version
Check the patches and apply them, if necessary.
Bonusses
Have a private and a public remote for your repo, so that you can keep track on the crumpy files in user_privileges and friends in private, but share code with others
Have an absolutely beautiful backup with daily rollback by just setting up a branch, a remote and a cronjob.
Beeing able to replicate the live situation within minutes for local development
Painfree Updates !!
I know, this is no easy task, but once done, it will make your live pretty much easier.

Automatically export a visual studio 2012 template

I'm wanting a way to 'automatically' export templates from Visual Studio 2012.
I'm aware you can do it manually by selecting File->Export Template and then fill out the wizard's questions for each project you have in your solution, but it takes a long time (typing... etc). I want to automate this in code.
I've spent quite a bit of time researching this to no avail; hence my question here!
Investigation 1:
You 'could' do this with macros, however it is a bit ugly and not really professional. (How would you get the list of projects you have in your solution any way?)
Investigation 2:
Apparently it is possible by tapping into the Visual Studio's automation objects; I can get at the function to export the project, however it only launches the Export Template Wizard resulting in you having to manually type in all the details anyway.
See this link
Investigation 3:
You can execute a file called 'Projectgen.exe', which helps the creation of the wizard's options (so you don't have to type them), however apparently it belongs to another company and, after contacting them, they were not willing to give me the file. (Not only that, it was designed for earlier versions of Visual Studio and calling an out-of-proc EXE is always not very nice) See this link
There was a similar question to this at Visual Studio 2012 - Export Template automation but no real answer.
There MUST be a cleaner way to do this! Id be happy to share what knowledge I have... Thanks!
I ended up creating a CodedUI recording and with some modifications I was able to automate the whole multi-project export process.