How to participate in the "Team System Users Group - Virtual Edition"
17 September 08 08:47 AM | dmckinstry | 3 comment(s)

After asking fellow MVPs to help us drive visibility to the new Team System User Group (Virtual Edition), we ran across some hosting issues.  Last night we had a router issue and this morning we've had a cable cut.  The provider has an 8-hour response time so hopefully we'll be back soon.  But in the mean time, http://www.tsug-ve.com is down!  Please be patient and check-back.  We hope to see many of you at our inaugural meeting tomorrow!

The TSUG website has instructions and I will generally send our an invite before the meeting.  In case you're not able to sign-up at the site before then, here is what you need to do to participate:

  1. Make sure you have SecondLife and LiveMeeting installed and configured.
  2. The meeting is Thursday, Sept 18th at 6PM (Pacific time - GMT-08:00).
  3. Sign into both LiveMeeting and SecondLife a little early - we will try to start on time and you may want to socialize with fellow VSTS enthusiasts.  If you haven't played with SecondLife, plan to spend a few minutes going through the tutorial before you get started.
  4. Be prepared to switch back-and-forth (Alt-Tab) between SL and LM.  We will do demos in LiveMeeting and many slides and interaction in SecondLife.

Important links:

We hope to "see" you there!

A new VSTS Users Group – In Your Neighborhood!!!
08 September 08 07:32 AM | dmckinstry | 2 comment(s)

Chewing Glas (aka Paul Hacker) and Daven Finesmith (aka Dave McKinstry) are proud to announce a new users group forming in your area:  the Team System User Group (Virtual Edition)!!!!  In addition to the few user groups focused on Visual Studio Team System in major cities, now all Visual Studio Team System enthusiasts and users can join together to share stories and learn.  Like most user groups, we will meet on a monthly basis, socialize a little, and have presentations.  We plan to have demo-rich presentations and support an interactive format allowing attendees to participate and ask questions.

Unlike the ‘classic’ user group, you will be able to participate regardless of your location!  You no longer have to live in one of the handful of cities world-wide to join and participate in a Team Systems community!  In addition, we can now pull from a broader pool of excellent presenters from around the globe!

Our initial meetings will all be in English and are targeting an Americas-friendly time zone.  But other times and places are possible.  If you are interested, visit our web site:  http://www.tsug-ve.com/.  Sign-up and we’ll contact you with additional meeting information.  It is free to join and none of the underlying technologies require fees beyond what you already pay for your computer and network access!  We will not use your contact info  for anything other than user group communications (approximately once per month).  Our first meeting is September 18th at 6PM (Pacific Time / SLT).  We hope to see you there!!

"Not a test class" - Backward unit test compatibility from VS 2008 to VS 2005 Team System
01 September 08 04:56 PM | dmckinstry | 2 comment(s)

Awhile ago I was working with a client and received an error message "UTA052: MyNamespace.MyTest is not a test class" after converting a unit test project created in Visual Studio 2008 to Visual Studio 2005 Team Edition.  (Actually it was a VS 2005 nUnit/BizUnit test project converted to VS 2008 MSTest and then to VS 2005 MSTest.) The path I chose wasn't necessarily supported but it was necessary.  The nearest help I could find was from MSDN Forums: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3820523&SiteID=1&mode=1.  Luckily I figured out the cause of the problem and a solution.  If you have run into this message and said to yourself "but it IS a test class," read on...

The scenario that led to my this problem was the conversion of a VS 2005 nUnit project to VS 2008.  As expected, when I opened the VS 2005 project with VS 2008, Visual Studio successfully converted the project to Visual Studio 2008 format.  I then went through the required search-and-replace and reference changes to modify the nUnit tests to be Microsoft-format tests.  This was the easy part.

Next, I had to convert the project back into Visual Studio 2005 format. Why? The original conversion to 2008 was a convenience that I knew I'd have to undo...  The test project was in support of BizTalk 2006 R2, which is developed in VS 2005, not 2008.  I wanted to maintain the test project in the same tools as the test target.

In many cases, you can revert a VS 2008 .NET 2.0 project to VS 2005 by simply changing a few characters in the .SLN, .VBPROJ and/or .CSPROJ files.  In the following snippet, changing the "10.00" to "9.0" may result in converting the solution back to Visual Studio 2005.  A similar exercise may be necessary for the project files but I'll leave the specifics to you.

image

After bringing the solutions and project back to Visual Studio 2005, I did some minor cleanup and recreated the VSMDI and TestRunConfig files.  The solution compiled without issue but when I tried to run the tests I received the aforementioned message: "Error xxx UTA052: MyNamespace.MyTest is not a test class".  Of course the source code looked fine.  So after all that, what is the punchline?  I had the wrong reference.  I was referencing the 9.0 version of Microsoft.VisualStudio.QualityTools.UnitTestFramework.  Since my system had both Visual Studio 2005 and 2008 installed and the 9.0 DLL is compatible with .NET 2.0, I didn't have any issues with compilation.  But the 2005 version of MSTest did no recognize the 8.0 version of the testing tools, hence the error.

Although this may be a niche problem, hopefully this blog posting will help someone else trying to perform similar unit test surgery find the solution faster.

Warning: TFS 2008 SP1 and WSS 2.0
29 August 08 08:24 AM | dmckinstry | 1 comment(s)

I usually try to avoid the "me too" style blog posts, but this one seemed like a good idea - especially since some of my clients will run across it and may not easily find the solution.

I've been asked numerous times about any unexpected side effects of installing TFS SP1 and so far I've been able to say there were no issues.  But there is an exception depending upon your TFS configuration.

If you are running TFS 2008 with Windows SharePoint Services (WSS) 2.0 on the same server, you need to be aware of a compatibility issue.  WSS 2.0 doesn't play nicely with .NET Framework 3.5 SP1.  The symptoms and a workaround are documented on the Microsoft SharePoint Team Bloghttp://blogs.msdn.com/sharepoint/archive/2008/08/27/net-framework-3-5-sp1-issue-on-windows-sharepoint-services-v2-0.aspx.

A few hints for DB Pro startup time
03 April 08 11:07 AM | dmckinstry | 1 comment(s)

When I work with clients and show them how Visual Studio Team System Database Edition can impact their SQL Server development process most of them are very impressed.  I've helped several clients get going with these tools.  One common concern, when you get past the Northwinds-like databases into large and complex databases is the startup time for loading Visual Studio solutions that include database projects.

There are some ways to significantly tool improve performance.  First, if you are using Visual Studio 2005 Team Edition for Database Professionals, make sure you install SR1 and the Post-SR1 roll-up releases.

If you are using Visual Studio 2008, these fixes aren't yet available. However one specific fix can be easily performed manually with great improvements on the startup time.  When I first read Gert's blog posting on database compatibility level I didn't realize that it would impact project startup performance.  However it does!!!!  On my test case I was able to cut the startup time almost in half (~8 minutes down to <4.5 minutes).  Note that this was a large database with thousands of objects - it did a good job proving the performance improvement.

A couple of final common sense hints...  Try to clean up your projects.  The warnings and errors slow things down as well.  Also, decouple your database projects.  That is, if you can realistically have a solution with a single database project it will obviously startup and operate faster than one with a dozen database projects.

What we know about "Rosario"...
28 March 08 04:36 PM | dmckinstry | 1 comment(s)

Over the past few weeks I've been presenting a series of Technical Briefings on Visual Studio 2008 Team System.  At the tail of the briefing I demo and discussed what we officially know about  next version of Visual Studio Team System, code named Rosario.  I could only show and talk about these futures based on what was officially documented from Microsoft and what I could surmise from the publicly available VPC.

If you want to see the specifications for proposed functionality, the following specifications are available from the Rosario Specifications site on MSDN:

Although some of these were originally posted late last year, some were posted as recently as a month ago.  I hope Microsoft continues to show us where they are going.  It helps us provide the feedback they need and helps us plan for the future.

And on that note, this is the future...  There is no released product for Rosario, no announced release date and no licensing for the CTP VPC.  There are some great features coming up but not enough to diminish what is available today.  VSTS is already a great product and when it becomes available Rosario will only make things better!

A final P.S. - If you're waiting on the content posting to the "SkyDrive" from the tech briefings I'm afraid you'll need to wait a little longer.  Tara and I are still playing catch-up from the time on the road!

Extending the Nov 07 Rosario CTP Virtual PC
22 March 08 12:41 PM | dmckinstry | 3 comment(s)

I've been demonstrating the capabilities of Visual Studio Team System recently in a series of tech briefings.  In addition to what is available today, I've been showing some of what the future might hold using the November 2007 Community Technology Preview (CTP) of code name "Rosario".

Unfortunately, about a week ago the Visual Studio preview time-bombed and my demos became far less compelling.  Actually, the CTP wasn't really scheduled to be obsolete yet and legally it can be extended for continued investigation or, in my case, demonstrations.  I did the time honored trick of setting the clock of the Virtual PC's host back to a time before the expiration and managed to keep the demos alive.

At some point we can expect Microsoft to release another CTP without this problem.  In the mean time, if you have the CTP and want to keep playing, Jeff Beehler offered me this little trick...  You can turn off the synchronization of the VPC to the host machine by modifying the *.vmc (in this case Nov2007RosarioCTP.vmc).

To do so, edit your VMC and add the following within the  <preferences><integration><microsoft> node:

<components>
  <host_time_sync>
    <enabled type="boolean">false</enabled>
  </host_time_sync>
</components>

A few side notes:  First, the release date on the Rosario CTP download page has been updated so this trick might only be needed for people who have already downloaded the image and don't want to re-download the 4.8GB image.  Since I haven't downloaded the newer image I can't confirm this assumption.

Second, TFS doesn't like going back in time.  If you are going to set the clock back on the VPC to allow it to keep working, don't set it back to a time before the last activity in the VPC TFS.

Finally, this trick isn't to get around licensing issues.  Since this is a prerelease, the trick is only to keep us up and running until Microsoft gets a new version for us to play with.

Enjoy!

Filed under: ,
Making good on a non-resolution...
19 March 08 09:25 AM | dmckinstry | 1 comment(s)

As I indicated in my first post of the year, I have given up New Year's Resolutions, but I do have intents for this year...  In specific, getting back into community involvement and speaking.

Last week through an unexpected shuffle I ended up presenting on VSTS Technology Briefings this week and next week.  These are free events sponsored by Microsoft and Notion Solutions and cover the breadth in VSTS 2008 and beyond in a demo-rich full day presentation.  My collegue and fellow MVP, Mike Azocar, did the first two in briefings in Florida.  I did one yesterday in Charlotte, NC and have three more scheduled in the southern US over the next week.

If you're in the area and want the latest on Team System 2008 and beyond, check out one of the following:

Thanks to Doug Turn for blogging easy access to the links and an idea of the schedule.  Note that the actual schedule was modified slightly to include Visual Studio 2008 Team System - Database Edition.

And if you're near Little Rock instead, I'll be there on speaking on VSTS Database Edition and Unit Testing with Visual Studio 2008 Professional.  That is, at the Little Rock Tech Expo 2008!

Hope to see you around!  Enjoy!

Team Build with SSIS Validation
08 January 08 08:58 AM | dmckinstry | 1 comment(s)

As I work with different clients, helping them understand how Team Build and Team Edition for Database Professionals can help, a frequent request I get is "How does SQL Server **** Services work with it?"  (With **** being 'Integration', 'Reporting', etc.).  My general answer is "These already have Visual Studio integration so you don't need special tools for version control and work item integration."  However, if you've been using Team System you already know that Version Control and work items are not the entire story.

As I've described in previous posts (parts 1, 2 and 3), Team Build can be used to very effectively create and execute change scripts against a target database as part of you application build process.  In fact, you can also automatically generate test data and execute unit tests against the resulting database. 

So how does this tie into other SQL Services such as SQL Server Integration Services? The basic answer is 'not well'.  To "Build" the other SQL Server services you generally need to 'EXEC' into Visual Studio (i.e., DEVENV) to cause the 'compilation' of the to occur.  If you want more details on this process, check out Buck Hodges' blog.

As described in the title of this post, I am not even trying to 'Build' the SSIS packages.  SQL Server can access SSIS packages (i.e., *.dtsx) directly from the file system and that is how my client was using SSIS.  However, they did want to verify that the packages would still work after changes occurred to any of the related SQL Server databases or even the packages themselves!

Building an SSIS Validation Unit Test

We looked into a few possible ways to exercise or validate SSIS packages as part of the build process.  The clear answer in our case was to build a unit test which called on the SSIS object model.  This would allow us to either validate the structure of the SSIS packages against the target data sources or actually execute them.

Building a unit test to validate SSIS starts with a standard test project in Visual Studio; I use MSTest with Visual Studio Team System but nUnit or similar unit test frameworks should work as well.  Your unit test project needs to reference the SQL assemblies: Microsoft.SQLServer.DTSRuntimeWrapper and Microsoft.SQLServer.ManagedDTS.  Of course, you will need to have the appropriate SQL Server components installed on both your development environment and your build environments for this to work.

Once you've created the test project, you'll need two classes to support SSIS validation.  First you will need a unit test class.  Although this is obvious, it may not be obvious that you may only need a single unit test class, regardless of how many SSIS packages need validation.  Second, you need a support class to sink the events from the SSIS engine.

SSIS Event Support Class

The SSIS Event Handling Class will provide an interface between the unit test and the SSIS validation or execution being performed by SQL Server.  Although you could force fit this back into the unit test class, I chose separate it to make it easier to understand.

The following snippet demonstrates a minimal implementation of the SSIS Event Handling class; I've included a few comments in areas that you're likely to expand on:

using Microsoft.SqlServer.Dts.Runtime;
// Additional “using” statements omitted for brevity

// This class receives events from SSIS, logs them to the “console”
// and stores them in a list for consumption by the unit test.
namespace SSISTestFramework
{   // “DefaultEvents” base class is from the SSIS Runtime
    internal class SsisEventSupport : DefaultEvents
    {
        private List<string> errors = new List<string>();
        public List<string> ErrorCollection
        {
            get { return errors; }
       

        public override bool OnError(DtsObject source, int errorCode, string subComponent, string description, string helpFile, int helpContext, string idofInterfaceWithError)
        {
            Console.Write(" *** {0} ", description);
            errors.Add(description);
            return base.OnError(source, errorCode, subComponent, description, helpFile, helpContext, idofInterfaceWithError);
        }
    }
}

You can use this block as a starter to build your own class.  You may want to override some of the other events from by the DefaultEvents class to gather more information about what is happening during SSIS validation and execution.

SSIS Unit Test Class

Of course, the event handling class is nothing without something to wire it to the SSIS engine.  The unit test class will configure SQL Server Integration Services engine to reference the SSIS package, validate it and report the results through the event handling class.

As before, a code-snippet is worth a thousand words so here is a minimalist implementation:

using Microsoft.SqlServer.Dts.Runtime;
// Other 'using' statements omitted for brevity

namespace SSISTestFramework
{
    [TestClass]
    public class SsisValidation
    {
        public SsisValidation() { }
        // Other 'standard' unit test stuff such
        //
as test context omitted for brevity

        // You may want to databind the package file to easily
        // validate different packages with a single test.
        [TestMethod]
        public void ValidatePackage()
        {
            string packageFile = @"C:\SomePath\SomePackage.dtsx";
            bool validateOnly = true

            // Note: the WriteLine is valuable for getting
            //
status on test runs with multiple packages.
            Console.WriteLine("Validating \"{0}\"...", packageFile);
            List<string> failures = ValidateExecutePackage(packageFile, validateOnly);            // Verify no errors were passed back from SSIS.
        
   Assert.AreEqual(0, failures.Count,
                packageName + " failed SSIS Validation.");
            Console.WriteLine("... Completed validation");
       

        // This support method simplifies call SSIS
        private static List<string> ValidateExecutePackage(string packageName, bool validateOnly)
        {
            // "Wire up" the SsisEventSupport object.
            IDTSEvents events = new SsisEventSupport(); 

            try
            {
                // The SSIS (*.dtsx) file is an XML document.  We
                // load it into memory to pass off to the
                // SSIS object model.
                XmlDocument doc = new XmlDocument();
                doc.Load(packageName); 

                Package pkg = new Package();
                pkg.LoadFromXML(doc, events); 

                // NOTE: It is possible to reference the 'pkg' object
                // to substitute connection information for testing
                // purposes.  Leave null for existing connections.
                Connections cons = pkg.Connections; 

                // You can execute or simply validate the structure based
                // on the validateOnly flag
                if (validateOnly)
                    pkg.Validate(cons, null, events, null);
                else
                    pkg.Execute(cons, null, events, null, null);
            }
            catch (System.IO.FileNotFoundException)
            {
                Assert.Fail("Failed to access package: " + packageName);
           
     // Return the error list from SsisEventSupport.
           
return ((SsisEventSupport)events).ErrorCollection;
        }
    }
}
Filed under:
2008 New Years Resolution (NOT)
07 January 08 01:19 AM | dmckinstry | 3 comment(s)

Some people are good at following through on New Years Resolutions - others are not.  The only "New Years Resolution" that I've ever managed to keep was to "never again make a New Years Resolution".

On January 1st I received an email notification from Microsoft that my MVP status had been renewed.  It probably shouldn't be too surprising - I think I've helped more people across the United States understand how to successfully adopt my current technology tool of choice, Visual Studio Team System, than I have historically.  But 2007 year was different for me.  I spent far more time in corporate settings educating the corporate development teams than in the "community."

Since joining Notion Solutions, I have spent more time flying around the country helping people with technology. As a result I've had to give up my leadership over the Dallas .NET Users Group and have had less time to focus on speaking engagements, user groups, publications and other community activities.  And frankly, I miss it...

I'm not going to break the one good New Years Resolution that I have managed to keep (i.e., No more New Years Resolutions), but I do plan to be more active in the community this year.  Let's call it a "goal" to regain some community involvement in 2008 - starting with the Little Rock Tech Expo 2008, articles for Paul Hacker's TFS Times and the Notion Solutions newsletters, and participation with the Dallas VSTS Users Group.  Hopefully I'll manage to maintain support for my corporate users while reaching back into the community!

Happy 2008!

Filed under:
More Posts Next page »