Monday 25 February 2013

MackBook Pro bootcamp right button


On my work mack book I am using BootCamp software to switch between Mac and Windows

The biggest problem I have had so far was right button in windows because I thing I am using right click on windows more than anything else.

This is
  1. Go to "Control Panel".  2. Click on the phrase "System and Security"
  3. Then "Boot Camp".
  4. Click on the "Trackpad" tab.




 








  5. In the "One Finger" area, enable the check box next to "Secondary Click" and select your click option to get right click..















  6. Click OK.

This will let you simulate a right click by depressing the bottom-right corner of the trackpad.


Friday 15 February 2013

TFS build using testing files

TFS build using testing files

Desired result

I want to run test that are using test files on server.
I am targeting VS and TFS 2012

Solution

My test solution layout.


Add all your files into folder which is part of your solution.
Set property all files you need for tests to content and copy always.
This will ensure that files are always the latest ones.




Now create test class

    [TestClass]
    [DeploymentItem(@"TestData", @"TestData")]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            Assert.IsTrue(File.Exists(@"TestData\TextFile1.txt"));
        }
    }

and test result

You need to use in, out directory for Deployment Item, this will copy only existing item from your solution. I have not managed to create only empty directory.

Check if your directory has been created in location: ClassLibrary1.Tests\bin\Debug.

You can read up about DeploymentItem


Thursday 14 February 2013

Setup nuget package feed shared directory folder

Setup nuget package in shared folder

I wanted to know how to setup local nuget packages server.

For this example I am using VS2012.

Go to the server(local pc) and create new directory. Setup the folder to be shared. You will end up with format:

\\ServerName\Nugets


Add the server to your nuget packages source.
One of the way I choose to use for opening Nuget package manager

 Now click on settings in left bottom corner.
You will get window with sources for nuget package sources. Insert name of your source (Can be anything you want), add source, your new shared folder, as network resource (See picture below). Click Add and Ok.

This is all you need to do to add new nuget package source to your VS2012.

Used resources for this article:




Wednesday 13 February 2013

Database diagram support objects cannot be installed

Database diagram support objects cannot be installed because this database does not have a valid owner

The error

"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

The fix

The information provided by SSMS was very helpful but anyway.

Reason
the database has lost its owner and needs to be corrected, simply done with:

ALTER AUTHORIZATION ON DATABASE::databasename TO sa 

replace sa and databasename with your variables

Monday 11 February 2013

Changing build agent working directory

Changing build agent working directory


default location after installation is:


Working directory
$(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath)

It is desirable to move this location as the builds will add up and it will be taking a lot of space in you system drive. This is useful too if you have multiple builds and you want to retain build history.


If you had already run any build you will have to move existing folder, as results to your builds are in that directory.


When you have moved the build folder make sure that you check permissions on the build directory.

Saturday 2 February 2013

Copy MEF Plugins to directory

MEF and Plugins directory

I have created a project in which I wanted to use plugins directory.
Now every plugin has multiple dlls that are required,

Step one I want to copy every dll into plugins directory using post build command.


xcopy "$(TargetDir)*.dll" "$(SolutionDir)ConsoleApplication2\bin\debug\plugins\" /Y /I

Common switches used for

/I - treat as a directory if copying multiple files
/Q - Do not display the files being copied.
/S - Copy subdirectories unless empty.
/E - Copy empty subdirectories.
/Y - Do not prompt for overwrite of existing files.
/R - Overwrite read only files.
 
more information you can find when you type: help xcopy into your command line

Removing SpeedBit from firefox

I see you have had same problem as I did.

I have installed a software on my PC and I got unwanted software installed and changed my current configuration.

But how do I remove this now?

Program  in question is SpeedBit.
As this all ready has been written, I do just copy the content here:


Disable Speedbit Toolbar and Extension(Addons).
When you enter a search term in the Firefox location bar and press Enter, Firefox will per default do a "I'm feeling lucky" Google search and redirect you to the first result that matches your search term. This behaviour can be changed by a number of add-ons. If you'd like to restore the previous default behaviour, please follow these steps:
  1. Enter about:config in the Firefox location bar and press Enter.
  2. You should see a warning that making changes to the Firefox configuration can be potentially harmful to Firefox's integrity. Click the I'll be careful, I promise button to continue.
  3. In the Search box at the top, enter keyword as the search term. You should see a few remaining items, one of these is keyword.URL. It should be bold.
  4. Right-click on the keyword.URL setting and select Reset from the dropdown menu.
Now you're done. Please report back if this fixes your problem. Thanks in advance!
You can find more information about the Location bar search feature in the Search the web from the Address Bar article.

Source of this article:

http://support.mozilla.org/en-US/questions/944592