Web Code Blog

A web repository of coding tips and knowledge base articles

Archive for the ‘Visual Studio’ Category

Using KDiff for your TFS comparison and merging tool

Posted by Stefan Zvonar on January 4, 2011

TFS is a great source control solution, however it can be a pain when trying to merge or even compare code when merging branches together (especially when you cut and paste code into a new IF statement – the code comparison gets shuffled down considerably, making comparing the two changesets very difficult).

Thankfully, KDiff is a free tool which performs much better than the default tools (in my opinion).

You can download and install KDiff from here:

http://kdiff3.sourceforge.net/

Once you have installed Kdiff, it is now time to configure TFS.

Go to Tools -> Options:

Options

Go to Source Control -> Visual Studio Team Foundation Server -> Configure User Tools:

Configure User Tools

You will now want to add two new operations for comparing and merging.

Note, in the following picture examples, replace ‘C:\Program Files\KDiff3’ with the path where you have installed KDiff.


Compare operations

Compare Operator

Note, the arguments are:

%1 –fname %6 %2 –fname %7

Merge operations

Merge Operator

Note, the arguments are:

%3 –fname %8 %2 –fname %7 %1 –fname %6 -o %4

That should be it.  This will now ensure that TFS will use the KDiff tool when comparing any type of file.  Note, you can change these operations to be specific to certain code files (instead of an ‘.*’ extension, you could use ‘.vb’,  for example)

If you would like more information on the arguments used or use a different comparison tool, please read the following informative post:

http://blogs.msdn.com/b/jmanning/archive/2006/02/20/diff-merge-configuration-in-team-foundation-common-command-and-argument-values.aspx

Hope this helps,

Stefan.

For more Web Code, ASP.NET, SQL Server and other development tips, please check back here at webcodeblog.com often.

Posted in Team Foundation Server, Visual Studio | 2 Comments »

Click Once Application Error – The signer’s certificate is not valid for signing

Posted by Stefan Zvonar on November 17, 2010

Problem:

When trying to publish a Click Once application, you recieve the following error:
“The signer’s certificate is not valid for signing.”
Reason:
This is most likely due to the fact that the certificate used to publish the application originally has expired.  Most certificates have a lifespan of about a year, so it needs updating now and then, especially when publishing new versions of the application.

Solution:
To get around this problem, you need to create a new certificate.
Open your project in Visual Studio and go to the Project menu -> Project Properties.  Click on the Signing tab and click on the “Create Test Certificate” button (as shown in the image below).

Create Test Certificate

Create Test Certificate

I left the password blank, but if you do use a password, be sure to remember it a year later, or whenever you need to regenerate another certificate :)
This will place a ????.pfx file in your project.  This file contains the private and public key informaiton.  I simply removed the old file (backed it up first) and renamed my new generated file to the old file name.
You should now be able to publish your Click Once application.

Hope this helps,

Stefan.

For more Web Code, ASP.NET, SQL Server and other development tips, please check back here at webcodeblog.com often.

Posted in .NET, Visual Studio | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.