Love This!

Share/Save

Tags: ,

Automate Build for a ClickOnce Application Hosted on CodePlex using MSBuild

This is what I wanted my automated build to do:

Get the latest version from CodePlex
Update the version number in AssemblyInfo.cs
Build the project
Check-in the updated AssemblyInfo.cs
Label the project with the version number
Publish the ClickOnce package to my webserver

In order to achieve this I used the CodePlex Source Control Client (cpc.exe) [...]

WCF Performance Optimization Tips

I wound up work on my last project and thought of sharing some performance challenges we faced when the product went live.
Keep in mind though that optimization options heavily rely on your application design and its usage scenarios.
Usage Scenario
The usage scenario for which the following optimizations worked are as follows. The WCF services are hosted [...]

Silverlight

Silverlight  2.0 just went live. If you are a .NET developer building ASP.NET or WinForms/WPF applications this is a HUGE deal. Your .NET code can now run within a browser and across platforms (including Mac and on Linux using Moonlight) without requiring the .NET framework installed.
I have never spent much time learning AJAX but I [...]

WCF Add Service Reference gotcha with Windows Server

We recently switched from developing in Vista to Windows Server 2003. Someone had the bright idea that we should develop in the same environment the application is going to be hosted on. Go figure.

What that meant is that you run into wierd issues like this one. When trying to add a Service Reference to a [...]

Making use of the ‘??’ operator in C#

The ?? operator was introduced to C# in 2.0 and I made a mental note to myself to use it when possible.

Recently I had to do some tinkering with good ole Request.Form and Request.QueryString and I kept trying get the neurons to connect and figure out the shorter way of doing it. I knew there [...]

No color coding for Classic ASP in Visual Studio 2008

This seems to be a bummer. Color coding and intellisense for VBScript code in Classic ASP pages have been deprecated in VS 2008.
There is a workaround for making it work for files with the .vbs extension but no solution for .asp pages. Hopefully someone would come up with a hack to get it working [...]

Moq: Linq to Mock

Daniel Cazzulino just announced the birth of Moq, now this is mocking done right.
 
// ShouldExpectCallWithArgumentvar mock = new Mock<IFoo>();
mock.Expect(x => x.DoInt(1)).Returns(11);mock.Expect(x => x.DoInt(2)).Returns(22);
Assert.AreEqual(11, mock.Instance.DoInt(1));Assert.AreEqual(22, mock.Instance.DoInt(2));
 

Lambda is starting to make my mouth water.
Share/Save

The Dangers of Static Events In User Controls

Static events in user controls can lead to all sorts of weird behavior in your application. Especially when they are hosted in forms that are loaded and unloaded during the lifetime of your application.
public partial class FlexiAddress : UserControl
{
public static event EventHandler<AddressChangedEventArgs> EventAddressChanged;

The danger here is that unless you unhook from [...]

VSTS – Multiple tests with ID <guid> found

When you trying to run your tests and you come across this error message “Multiple tests with ID <guid> found”, simply hit the Refresh button on the Test Manager window and you should be all set.
Share/Save

Archives