Visual Studio

Visual Studio

Code and slides for Dev208 at Tech Ed NZ

Here are the slides and demos for the Tech Ed NZ talk Stef and I did on Intro to Workflow 4. It includes the Approval Sample we didn’t manage to fit in. P.S. I know this blog sucks in IE, working on a fix when I get some time. DEV208-GettingStartedWithWorkflow.pptx Intro To WF Demos.zip

Unit Test Workflow 4 Activities : Dependency Injection

At first glance unit testing workflow activities with dependency injection seems like a no-brainer. For example consider the following activity using constructor-based dependency injection. public class SendEmail : CodeActivity { private readonly IEmailClient emailClient; public SendEmail() : this(new EmailClient()) {} public SendEmail(IEmailClient emailClient) { this.emailClient = emailClient; } public InArgument<string> To { get; set; } public InArgument<string> From { get; set; } public InArgument<string> Subject { get; set; } ...

Unit Testing Workflow 4 Activities : The TestContext Tracking Participant

I’m a big believer in using TestContext in MSTest or Console.WriteLine, Debug.WriteLine etc in your favourite Unit Testing framework to give context to passed or failed tests. Especially if you do CI and have only the test results to look at from the build server to try to understand why a build went wrong. Taking this into account I use a TestContext Tracking Participant to get more visibility into my workflow unit tests. This enables me to see what tracking records have been raised against my invoked workflows. In only a few lines of code you can quickly enable...

Unit Testing Workflow 4 Activities : Basics

Unit testing workflows became a lot easier in WF4. The basic approach is the same as for normal code classes except for a few differences which we will cover in the posts in this series. Lets start off with a simple code activity which will return the time in a given city. public class GetCityTime : CodeActivity<DateTime>{ [RequiredArgument] public InArgument<string> City { get; set; } public InArgument<DateTime> LocalTime { get; set; } protected override DateTime Execute(CodeActivityContext context) { string...

Visual Studio 2008 RTM'd

....and commence downloading. http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx http://blogs.msdn.com/somasegar/archive/2007/11/19/visual-studio-2008-and-net-framework-3-5-shipped.aspx  

TFS: Work Item Search

I've been using this plugin now for the past few months. You would not believe the difference it makes. This plugin puts a little search box right into Visual Studio to make it easy to find work items.  It is an addin for Team Foundation Client (Team Explorer) and is accessible from the Team menu when you're connected to a Team Foundation Server and is also avalible from a VS Toolbar.  You just type in some search text and it runs a work item query for you showing you results across the work item store. Source: Codeplex project "Search Work Items"

Useful macro for creating Visual Studio 2005 dependent (nested) items

Check out this useful macro for visual studio 2005 dependent (nested) items. Useful for breaking up large classes into partials when refactoring doesn't make sense. I found it useful when you want, for example one integration test class per implementation class and the test class is getting a bit large. Source: http://www.delarou.net/weblog/PermaLink,guid,a81a2d9d-02de-4fe1-ad8d-ee2fee97cf20.aspx Visual Studio .NET Macro for nesting project itemsThis macro enables you to nest project items inside Visual Studio .NET. Until now, there is no easy way to nest project items through the Visual Studio IDE, you can only do it by manipulating the project (.csproj...

Visual Studio Unit Test and the evil vsmdi

During a recent project we found a recurring problem where the test view of the unit (& integration) test projects would not load and we could not run tests. This was typically seen by the Test View load progress bar sitting at around 99%. This just adds to the list of "features" of VSTS Unit Test that make life oh so irritatingIt is due to the corruption of the *.vsmdi files in the visual studio solution which is caused by auto-merging the content of the file or having the test view property window open when getting the latest version. The...

Creating a custom AJAX control - DateTimePicker

Lately I decided to see how easy was to create AJAX custom controls specifically using the included javascript libraries. I thought it might be useful to try to use the included javascript libraries to enable client side access to the selected value from a custom control. The example I will use is a date time picker which uses the calendar extender from the ajax control toolkit for the date and a simple drop down for the time. Much like outlook, the date is pickable from a textbox and the time in a list of 15 minute intervals. The goal is to...

Enterprise Library 3.0 Released - with some really nice features

The Microsoft Patterns and Practices team have just released Enterprise Library 3.0 - April 2007. This is the full RTM version of EntLib with some really neat new features: Validation Application Block. Allows you to centrally define validation rules using configuration or attributes, and easily validate data from anywhere in your application, including deep integration with Windows Forms, ASP.NET and WCF. Policy Injection Application Block. Provides a powerful approach for separating cross-cutting concerns from business logic using declarative policies that are attached at runtime to methods on your objects. Application Block Software Factory. Dramatically simplifies the process of building application blocks and...

Full Visual Studio Archive