Steve Lange @ Work

Steve Lange's thoughts on application lifecycle management, Visual Studio, and Team Foundation Server

  • Steve Lange @ Work

    Adding Members to Your Project Collection on TFS Preview

    • 0 Comments

    TFS Preview is just that – a preview.  So things may not be where you’d think they are, especially if you’re used to the current version of Team Foundation Server.

    I was recently asked (twice), “Okay, so I’ve got my account and project collection established, how do I get more people added to the environment so we can do some team development?”

    TFS PreviewHere’s the quick way:

    1. Log in to your TFS preview site (https://<whatever>.tfspreview.com)
    2. Click on Collections at the top, and select the collection (most likely “Default Collection”) to which you want to add users.
    3. You’ll see a list of Team Foundation groups at the left.  Select the group (or create a new one) to which you want to add users.
    4. You’ll see information about the selected group at the right.  Click the “add members” link under Group Membership.
    5. In the dialog, enter:
      1. An email address of the user to add, if they are not already in the system.  Remember that this email address needs to be a Live ID, as currently that’s the only authentication type supported for TFS Preview.
      2. The display name (select from the drop-down list) of the user to add, if they already exist in the system.
    6. Click “Save Changes”
    7. Send the user the URL (https://<whatever>.tfspreview.com) and have them log in with their associated Live ID, and they should be set.

    For a broader overview of setting up groups, users, and security, I recommend taking a look at this video tutorial.  There are several other video tutorials that you can watch, all from the Administration page on your TFS Preview site.

  • Steve Lange @ Work

    Steve’s Monthly Newsletter – November 2011

    • 0 Comments

    I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful!

    Upcoming Office Hours

    Yep, I’ve added virtual office hours to my plate in an effort to get your questions answered!  I’m holding them for an hour every 2-3 weeks – I hope you stop by sometime!  My next office hours are next Friday, 11/18 at 9:30am Pacific.

    Announcements

    If you’re using using Visual Studio 2010 and TFS 2010 (and possibly Test Professional 2010), you may want to download and take advantage of the “Visual Studio 2010 SP1 TFS Compatibility GDR” update, now available.  It contains several fixes, and even the addition of a highly-requested feature in MTM (multi-line test steps)! 

    The OData Service for Team Foundation Server 2010 is not officially released!  Brian Keller has more here.

    If you’ve been playing with the VS 2010 virtual machine with labs and sample data, it’s been refreshed with a new expiration date.  Again, see BrianKel’s blog for details.

    Did you know you can “fake” a TFS build? This is useful if you don’t actually use TFS as a build system, but still need build numbers to load into TFS to help associate items together (i.e. changes between “builds” for testing purposes).

    Want to get access to TFS Preview but don’t have an invite code?  Ping me, let’s talk.

    Are you going to the ALM Summit next week in Redmond?  I am, and I hope to see you there!

    Upcoming

    November 17, 2011 Coffee Talk: Scrum-damentals (free webcast)

    November 28, 2011 LIVE event in Edina, MN: Double Feature: Testing & ALM for Agile Development For Details or to Register, Click Here

    November 29, 2011 LIVE event in San Diego, CA: Double Feature: Testing & ALM for Agile Development For Details or to Register, Click Here! 

    November 30, 2011 Visual Studio 2010 ALM Tools Live Roadshow
    Denver, CO

    Don’t Forget!

    My team has access to programs (and funds to help pay for them) to help you and your organization get ramped up on all sorts of topics and technologies:

    Send me a note and let’s see where I can help!

    QuickAnswers

    • In MTM, if you don’t see test results not showing up in the “Analyze Test Runs” area in MTM, it’s usually because either a test run isn’t actually completing a test run (i.e. exiting a test run without saving), or not filtering the view properly (this is most common). Try setting the “Start date range:” filter to “All”, and try toggling the “Show manual runs” button to see if your rest run results show up.
    • BIDS and Visual Studio 2010 are separate products, and while there is definitely overlap in functionality (schema object creation, for example), with BIDS being based on Visual Studio 2008 there are several areas that are specific to BIDS that Visual Studio 2010 will not do (and vice versa, for that matter).  The simplest way to differentiate between the two is that because BIDS is based on VS 2008, support for the below project types are only supported in BIDS: BIDS Integration Services, Report Services, and Analysis Services.  Many customers simply use Visual Studio 2010 Premium or Ultimate side-by-side with BIDS, so that SSAS packages (for example) can be worked on in BIDS, and other object creation, change management and testing functions can be performed in VS 2010.
    • When you remove a test case in MTM, the test case is not physically removed from the system but rather disassociated from its test suite. That’s why it will still show up on the Organize tab. This helps you identify overall test volume, and find potential test cases created by others that should be included in your test plan. Click here for more information.
    • Want to export information from MTM?  You have a few options.  First, you can use TestScribe, a free add-in for MTM that allows you to generate documentation for either a test plan or test runs.  You can also export your test cases to Excel, either from Team Explorer or by using Excel itself. For more, see: Create, Open, and Modify Work Items Using Office Excel or Refresh Work Items and Change the List Type in Office Excel.  Finally, in Team Explorer (and in TFS Web Access, our browser-based client), you can elect to print one or more test cases directly from TFS. See: Print Work Item Results or Forms

    Parting Thought

    Why is 'abbreviated' such a long word?

  • Steve Lange @ Work

    “Fake” a TFS Build (or Create a Build That Doesn’t Do Anything)

    • 4 Comments

    Team Foundation Server’s build system serves as the “heartbeat” for your development lifecycle.  It automatically creates relationships between code changes, work items, reports, and test plans.

    But once in a while I’m asked, “What if we don’t use TFS Build for building our application, but we still want to have builds in TFS so we can track and associate work?”  Besides the biased question of “Why NOT use TFS Build, then?!”, there is sometimes the need to leverage the benefit of having empty/fake builds in TFS that don’t do anything more than create a build number/entry in TFS.

    There are a couple scenarios where this makes some sense, but the most common one I hear is this:

    Without builds in TFS, it’s near impossible (or at least very inconvenient) to tie test plans (accurately) to the rest of the lifecycle.

    Luckily, TFS 2010’s build system is incredibly flexible: flexible enough to allow us to “fake” builds without actually performing build actions (get source, compile, label, etc.).  It’s surprisingly simple, actually; and it doesn’t require writing any code.

    In my example (which I’ll detail below), I define a build which doesn’t do much more than craft a build number and spit out some basic information to the build log.

    First, create a new build process template, based on the default process template, using the steps described in this MSDN article.

    Once you have the process template created and registered in TFS, open the new template (.xaml file) in Visual Studio.  It will look (collapsed) something like this:

    Collapsed default build process template

    Here’s where it gets fun.  Inside the outermost sequence, delete every sequence or activity except for “Get the Build”.

    Drag an UpdateBuildNumber activity from the toolbox into the sequence, after “Get the Build”.

    (optional) Rename “Get the build” to “Get Build Details” so there’s no implication that an actual build will take place".

    Now expand the Arguments section (at the bottom of the XAML Designer window).  Delete all arguments except for BuildNumberFormat, Metadata, and SupportedReasons.

    At the bottom of the now-shorter list, use “Create Argument” and create the following arguments:

    Name Direction Argument type Default value
    MajorBuildName In String  
    MinorBuildName In String  
    Comment In String  
    IncludeBuildDetails In Boolean True

    MajorBuildName” and “MinorBuildName” will be used to help manually name each build.  “Comment” will be used to capture any notes or comments the builder wants to include for a given build.  “IncludeBuildDetails” will be used to determine if additional summary information about the build will be written to the build log.

    To provide users with means to set values to these arguments, create parameters in Metadata.  Click the ellipsis (…) in the Default value column for Metadata.  This will bring up the Process Parameters Metadata editor dialog.  Add each of the following parameters:

    Parameter Name Display Name Category Required View this parameter when
    MajorBuildName Major Build Name Manual Build Details Checked Always show the parameter
    MinorBuildName Minor Build Name Manual Build Details Unchecked Only when queuing a build
    Comment Comment Manual Build Details Unchecked Only when queuing a build
    IncludeBuildDetails Include Build Details Summary Manual Build Details Unchecked Always show the parameter

    Process Parameter Metadata editorA couple notes about setting the above parameters:

    • The “parameter name” should match the name of the like-named argument.
    • Use the exact same category name for each parameter, unless you want to see different groupings.  Also, check for any leading or trailing whitespace, as the category field is not trimmed when saved.
    • Feel free to add descriptions if you like, as they may help other users understand what to do.
    • Leave the “Editor” field blank for each parameter.

    Your dialog should now look something like the one at right.

    Next, open the expression editor for the Value property of the BuildNumberFormat argument and edit the value to read: “$(BuildDefinitionName)_$(Date:yyyyMMdd)_$BuildID)”. Including the BuildID will help ensure that there is always a unique build number.

    Now, Click “Variables” (next to Arguments) and create a new variable named ManualBuildName of type String, scoped to the Sequence, and enter the following as the Default:

    If(String.IsNullorEmpty(MinorBuildName), MajorBuildName, MajorBuidName & “.” & MinorBuildName)

    This variable will be used to provide a manual build name using the supplied MajorBuildName and MinorBuildName arguments.

    Now we have all the variables, arguments, and parameters all ready to go.  Let’s put them into action in the workflow!

    Drag a WriteBuildMessage activity into the main sequence, before Get Build Details, with these settings:

    • Display name: “Write Build Comment”
    • Importance: Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High
    • Message: “Comment for this build: “ & Comment

    Next, add an “If” activity below “Get Build Details” to evaluate when to include additional details in the build log, with the following properties:

    • Display name: “Include Build Details If Chosen”
    • Condition: IncludeBuildDetails

    In the “Then” side of the “If” activity, add a WriteBuildMessage activity for each piece of information you may want to include in the build log.  In my example, I included 3 activities:

    Display name Importance Message
    Write Team Project Name Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High “Team Project: “ & BuildDetail.TeamProject
    Write Requested for Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High “Requested for: “ & BuildDetail.RequestedFor
    Write Build reason Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High “Build Reason: “ & BuildDetail.Reason.ToString()

    Your “If” activity will look like this:

    If activity for showing build details

    The last thing to do is to add an UpdateBuildNumber activity as the last element in the main sequence, with the following properties:

    • Display name: “Set Build Number”
    • BuildNumberFormat: BuildNumberFormat & “-“ & ManualBuildName

    This last activity will actually create the build number which will be stored back into TFS.  Your completed workflow should look like this:

    Completed fake build process

    Now go back to Source Control Explorer and check this template back into TFS.

    Go create a new build definition, opting to use your new template on the process tab.  You’ll notice that your options are dramatically simplified:

    Process tab on build definition editor

    Specify a value for Major Build Name and save your new definition. 

    Queue the build and you’ll see the following on the Parameters tab:

    Parameters tab while queuing a build

    Enter some basic information and click “Queue” to run the (fake) build.

    What you end up with is a build that completes in just a couple seconds, does pretty much nothing, but includes your specified information in the build log:

    Build log after fake build

    Pretty sweet!

    And just to be clear, my example adds more “noise” into the build than you may find necessary, with additional build information, comments, etc.  You could streamline the build even more by removing the “Include Build Details If Chose” activity (and all its sub-activities).

    Given the overall flexibility TFS 2010 has with incorporating Windows Workflow into the build system, there are undoubtedly other ways to accomplish variations of this type of build template.  But I had fun with this one and thought I should share.  I’ve posted my sample template’s xaml file on SkyDrive here:

    I’m all ears for feedback!

  • Steve Lange @ Work

    Announcing My New Virtual Office Hours!

    • 2 Comments

    In an effort to continually help you get the most out of your investment in Microsoft development tools, I am happy to announce that I have set up regularly-scheduled virtual office hours!

    Please join me at any of his scheduled hours to ask questions, view quick demos, or learn more about upcoming products, technologies, and events.  You can also use this time to collaborate with other customers who may have stories or advice to share.

    I've created a page on this blog that lists my office hours dates/times, as well as information on how to join.  I've scheduled them roughly every two weeks or so for one hour.

    My current office hours schedule runs through the end of January 2012.  If enough people participate each week, I would love to extend them another six months!

    I hope to "see" you in my "office"!

  • Steve Lange @ Work

    Free Webinar – Load Testing in the Cloud

    • 0 Comments

    I normally include stuff like this in my monthly newsletter, but given that this is coming up next week I thought I’d post it now!

    This event is coming up on November 1st at 11:00am PST.

    Load Testing in the Cloud Using Lab Management 2010 with Windows Azure

    Presented by Sirk Technologies.

    With the introduction of Visual Studio 2010 and Windows Azure we now have the ability to easily create load testing scenarios on the cloud. Using the infrastructure of Windows Azure can provide a cost effective way to performance test your application.

    In this session we'll explore:

    • The strategy behind using a compute infrastructure for testing
    • How to create and deploy lab and test agents in the cloud which will enable the machines as load testing targets
    • Create scenario-based load testing using web performance test
    • Setup performance monitoring to capture metrics for servers and applications under load
    • Use Microsoft Excel to explore the results of Load Testing

    Register here, and I’ll see you online!

  • Steve Lange @ Work

    Steve’s Newsletter – October 2011

    • 0 Comments

    I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful!

    Thanks for bearing with me through the summer!  Summertime at Microsoft usually involves a lot of planning, meaning I was either heads-down in an Office document or on vacation. :)

    Announcements

    A lot has happened in the last couple of months!  A quick recap:

    //Build conferenceIf you’ve been hiding under a rock, you probably didn’t hear about the //Build conference in September in Anaheim, CA.  It was at that conference that Microsoft took off some of the covers surrounding Windows 8; and more specifically the developer experience around Windows 8.

    We released not only a Windows developer preview guide (PDF | XPS), but an ISO containing a preview build of Windows 8 and configured dev tools.  Pick your poison here!

    Also at //Build we announced the availability of the Visual Studio 11 Developer Preview for MSDN subscribers.  Jason Zander’s post does a great job previewing some of the notable capabilities in Dev 11.  Oh, did I mention this Team Foundation Server 11 is also available as an early preview?  There is also a pre-configured VM for you to check out if you don’t feel like doing any heavy lifting.

    And while we’re talking about TFS, another preview you should really take advantage of is TFS on Azure (yup, hosted TFS in the cloud).  Brian Harry has more details.

    Visual Studio LightSwitch 2011 released as well in July.  LightSwitch is the newest member of the Visual Studio family and is the easiest way to build business applications (think “screens + data”) for both the desktop and the cloud. Read more in my post about it.

    Upcoming Events & Training

    Here’s what’s coming up in October!

    Windows Phone CampsComing soon to a city near you!  Take advantage and learn everything you need to know about developing on the latest version of the Windows Phone OS, including tips for monetizing your application.

    Webcasts

    QuickAnswers

    • What’s this ‘System.Runtime.DurableInstancing’ exception all about?  There’s a Windows Update (KB2468871) that interferes with TFS 2010 if you aren’t running TFS 2010 SP1.  You can read more about it here.
    • Can I set up a build server using TFS on Azure?  Yep, you can!  Brian Harry explains..
    • Can Test Professional test Java applications?  Yes and no.  You can author and execute test cases against a Java application, take screenshots, record bugs, and take video, but you won’t be able to bind your steps to the application for fast-forward.

    Final Thoughts

    I want to end with a quick note about my role – it’s changing! Okay, not too much, but my focus is shifting in terms of territory and customer account alignment. Before, I was focused on larger accounts in our Southwest District. Now my role is taking me across the Western US (basically Colorado and westward) working with smaller and mid-sized customers. So it’s by no means a goodbye as I’ll most likely just be next door.. As always, if you’re not sure who your Microsoft developer tools contact is, just ping me and I can get you in touch with the right person.

  • Steve Lange @ Work

    Partner Event: Double Feature - Testing and ALM for Agile Development

    • 0 Comments

    Northwest Cadence and Microsoft are teaming up to bring you this free event!

    During this seminar, we will cover two Agile topics, tying together testing and ALM inside an agile team. First, we will start with testing, highlighting the tools and techniques that can enable an agile test team that works tightly with the developers. Then we will broaden our vision to explore agility across the entire team. We will not only highlight the Visual Studio tools that can help you get to agility, we will directly address the difficult challenges teams have when adopting agile or lean principles. We will provide tips, tricks and cautions; case studies; and the key foundational reasons agile and lean techniques can work for your organization.


    Morning Session: Agile Testing
    10am – 12pm

    • During this portion of the seminar, you will learn how to:
    • Reduce development time through increased communication
    • Integrate testing into the development process
    • Minimize the cost of tracking, fixing, reproducing Bugs
    • Eliminate the pain of requirements management
    • Reduce repetitive work through Test Automation and manually creating Test Environments
    • Eliminate the guess work out of your software quality

    Afternoon Session: Agile ALM
    12:30pm – 4:30pm
    Agile methods have changed how the software industry creates applications. New best practices have emerged to embrace a faster team-based approach to the challenges inherent in software delivery. Every aspect of application development - requirements, estimation, development, test, and deployment - benefits from new ideas and techniques.

    This seminar will help you understand how to lead software projects and move your team onto agile methods for greater productivity and higher quality applications. It will define the domain and terminology, methods for managing the effort, and how roles have changed across the team in the agile world.

    For the already agile, here’s the User Story for the training: "As a leader or team member in the enterprise software development process, I want to leverage a small number of key techniques and principles to dramatically and measurably improve my development practices, so that my organization can deliver more customer value, at faster intervals, to my customers."

    At the end of the event we will provide a quick walk through of what’s coming in Visual Studio vNext!

    I hope you can make it!  All you have to do is register:

    11/8 Anchorage, AK
    11/9 Bellevue, WA
    11/29 San Diego, CA

    For questions about this event series, contact Rick Flath at Northwest Cadence.

  • Steve Lange @ Work

    Windows Phone WEB Marketplace is Live

    • 0 Comments

    If you haven’t already noticed, the web marketplace for Windows Phone is now online and available.  Now you can browse all the apps available for your phone and purchase (if they’re not free) them online – purchases will simply be charged against the credit card already linked to your Windows Live ID.  The marketplace will then send you a text or email containing a link to your acquired application for you to directly download and install.  Simple!

    Marketplace screenshot

  • Steve Lange @ Work

    Coming Soon – Windows Phone Camp!

    • 0 Comments

    Windows Phone - Put people first.Fun, Free and For All

    A free, full day event chock-full of everything you need to know to develop a Windows Phone application. Whether you're a seasoned veteran or just getting started with .NET development this full-day event is for you. Interested in profit? We'll also lead discussions on how to monetize your applications and generate profits with your apps.

    Don't miss the new Windows Phone 7.5 (codename "Mango") features as well - with detailed sessions in the afternoon around Fast Application Switching, Multitasking, Live Tiles, Push Notifications, and more.

    The day will be capped with an open lab hands-on session and prizes for apps completed. This is the perfect opportunity to begin work on your dream application, or finish that app you've already started, with Windows Phone experts there to guide you every step of the way. Bring your own laptop to join in the fun and show off your killer app!

    Agenda

    8:00 AM

         

    Arrival & Registration

    9:00 AM

     

    clip_image001

     

    Windows Phone 7.5 Overview for Developers

    9:45 AM

     

    clip_image001[1]

     

    Building Windows Phone 7.5 Applications with Visual Studio

    10:45 AM

         

    Break

    11:00 AM

     

    clip_image001[2]

     

    Building Windows Phone 7.5 Applications with Silverlight

    12:00 PM

         

    Lunch

    12:45 PM

     

    clip_image001[3]

     

    Windows Phone 7.5 Fast Application Switching, Tombstoning, and Multitasking

    1:45 PM

         

    Break

    2:00 PM

     

    clip_image001[4]

     

    Live Tiles and Push Notifications

    3:00 PM

         

    Monetizing a Windows Phone 7.5 Application

    3:30 PM

     

    clip_image001[5]

     

    Build Your App or Work on a Hands-On Lab

    5:00 PM

     

    clip_image001[6]

     

    Be What's Next > Event Closing & Raffle

    Register today! Simply select the event location below you want to attend and register from there!

    Event Locations
    10/13 – Costa Mesa, CA
    11/03 – Phoenix, AZ
    11/05 – Denver, CO
    11/10 – Santa Monica, CA
    11/12 – San Diego, CA
    11/19 – San Francisco, CA
    11/29 – Redmond, WA
    12/01 – Portland, OR
    Events run from 9:00 AM - 5:00 PM

    Prerequisites
    Bring a notebook computer and identification. Also check out the APP HUB where you can get developer tools, learn about application features, understand common task for Apps and register and load your APP.
    Windows Phone - Put people first.
    Your chance to win*
    Don't miss a chance to win your very own Windows Phone (ARV $500) – plus many other cool prizes. No purchase necessary, but you must be present to win.

    Notes:
    This event is brought to you by Microsoft and is free of charge. However, you are responsible for booking and paying for your own travel and accommodations.

  • Steve Lange @ Work

    FAQ from Lab Management Event (Denver) on 8/9/2011

    • 0 Comments

    Thanks to everyone who attended today’s Denver event focusing on Lab Management in Visual Studio 2010 (and thanks also to Sirk for presenting)!

    I’ve put some of the questions asked today below with their corresponding answers.  I hope you found the event worthwhile!

    When I snapshot my virtual machine in Lab Management, can I also snapshot the database server as well?

    When you snapshot in Lab Management, the entire environment (which is 1 or more virtual machines) is snapshot at the same time.  So if your database server is included in the Lab Management environment, it will also get snapshot.

    Are there keyboard shortcuts for marking test steps as pass/fail in Test Runner?

    Yes.  You can use Win+Ctrl+Q and Win+Ctrl+W respectively.  Check here for a full list of keyboard shortcuts in Test Manager.

    How can I import test cases/steps from Excel into Test Manager?

    Your best bet is the TCM Import tool on CodePlex, called “Test Case Migrator Plus”.

    How does a Coded UI Test (or Action Recording) find controls?

    Is uses MSAA (Microsoft Active Accessibility) to find controls in an application.  This means there is no screen-scraping or coordinate-mapping, which is a good thing.  Your tests will still work if you move a control on the screen.  If you rename a control, the DOM searching technology in the test framework will broaden its search to try and locate the control again.  Because of this, not EVERY single framework in the world is supported.  For a complete list of supported configurations, click here.

    Why is IE9 not a browser type available when setting up a web performance or load test?

    Probably because IE9 hadn’t been released when VS 2010 RTM’d.  For a full list of available browser types, click here.

    Where are the load test results stored?

    The results are stored in a SQL server database of your choosing.  You can store them in the same SQL Server as TFS, but it’s not recommended.

  • Steve Lange @ Work

    Preview of the Aug 2011 TFS Power Tools

    • 0 Comments

    Brian Harry yesterday posted a preview of some of the key new capabilities in the upcoming August 2011 TFS Power Tools.  I won’t steal any of Brian’s thunder (his post has more details and screenshots), but highlights include:

    • Rollback in the UI
    • Work Item search
    • Build automation utilities
    • Maven 3 support (we already have Ant and Maven 2)
    • Test Attachment clean-up

    What are Power Tools anyway (in TFS terms – not construction terms)?

    TFS Power Tools are a set of enhancements, tools and command-line utilities that extend or build upon existing functionality in Team Foundation Server.  These pieces of functionality often are capabilities to be included in a future release of TFS that were either finished early, or pushed up the backlog due to high customer demand.

    It’s also important to note that since these Power Tools are released “out-of-band”, they are not officially (yet) supported.  That said, Power Tools are well-tested, and are supported via the TFS Power Tools & Add-ons discussion forum

    So keep an eye on the August Power Tools release on the Power Tools homepage, and get it when it’s available!

  • Steve Lange @ Work

    LightSwitch 2011 is Here! No More Excuses!

    • 0 Comments

    untitledWoot!  Visual Studio LightSwitch 2011 RTM’d today, marking a great day for the Visual Studio family.

    Visual Studio LightSwitch is the latest edition of the Visual Studio family and is by far the simplest way to build business applications for the desktop and the cloud.  This has benefits for both the “end user” developer and the professional developer.

    For the end-user developer, you can quickly create professional quality business applications with minimal (or perhaps no) code. Think “screens over data”, LightSwitch allows you to easily construct line of business applications that not only just work, but are automatically built in a way that is scalable and maintainable.

    For the professional developer, you can customize LightSwitch with your own controls, code, and extensions.  (Not to mention that LightSwitch takes some of the “hey can you build this for me real quick” –type requests that come from the business off your plate.)

    Looking for additional details?  Read Jason Zander’s announcement post, or the notice on the LightSwitch Team Blog.

    Still not sure exactly what LightSwitch is?  Maybe this video will help:

    If you have an MSDN subscription, LightSwitch is in your subscriber downloads area and is ready for you to grab.  If you don’t have an MSDN subscription, take it for a test drive today (90 days).

    There are several ways to get started:

    If you played with any of the betas,  you’ll notice several new, welcome additions to LightSwitch.  One of my favorites is the inclusion of starter kits, templates to get you quickly ramped toward solving common business needs.  These kits include templates for:

    LightSwitch will give your team a leg up in enabling all breeds of developers to quickly and reliably build LOB applications for both the desktop and cloud.  Welcome to the Visual Studio family, LightSwitch!

  • Steve Lange @ Work

    Event: Accelerate Testing with Lab Manager 2010 Summer Roadshow!

    • 0 Comments

    image

    Microsoft and Sirk Technologies are proud to offer this half-day live event – during which we will demonstrate the testing and quality assurance lifecycle using Visual Studio 2010 and Team Foundation Server.  Join us as we dive into the testing tools and testing process you can use to dramatically improve the effectiveness of your QA and Test efforts.

    Attend this half-day event to discover:

    • Using Lab Manager 2010 to provide a platform to accelerate the test and development cycle by providing the rapid provisioning of virtual environments using templates.
    • Automated deployment of software builds and testing in virtual environments from Visual Studio Ultimate.
    • Using Lab Manager and Test Manager 2010 to eliminate the “No Repro” scenario.
    • Leveraging Lab Manager 2010 and Visual Studio Ultimate for Load Testing your web applications.

    Now come see it all. In action. Today.

    This training event is geared towards QA managers, technical and non-technical testers, business analysts, and quality-conscious developers working on cross-functional teams.

    Register for a date & location near you!

    Welcome: 8:00 AM (Local Time)
    Seminar: 8:30 AM-12:30 PM (Local Time)


    Seating is limited. Register online with Event Code or call 1-877-MSEVENT.

    Schedule

    DATE

    CITY, STATE

    EVENT CODE

    August 9, 2011

    Denver, CO

    1032489582

    August 11, 2011

    Tempe, AZ

    1032489583

    August 16, 2011

    Irvine, CA

    1032489581

    August 23, 2011

    Portland, OR

    1032489584

    August 25, 2011

    Bellevue, WA

    1032489586

    August 30, 2011

    Mountain View, CA

    1032489587

  • Steve Lange @ Work

    Opening a OneNote 2010 notebook with section groups on WP7

    • 0 Comments

    OneNote 2010[7/15 Update:  This post's workaround doesn't apply for Windows Phone 'Mango', just the currently available retail version of WP7.  OneNote section groups are fully recognized in 'Mango'.]

    I recently came across this issue with Windows Phone 7 (once I got it in late May, thanks Verizon):  I maintain a (what I consider to be) highly-organized OneNote 2010 notebook for interactions with my customers.  I use a new feature of OneNote 2010: section groups.  This allows me to structure my notebook like this:

    • Notebook
      • Summary (section)
      • Customers (section group)
        • Office Hub on WP7Arizona (section group)
          • Customer 1 (section)
          • Customer 2 (section)
        • California (section group)
          • Customer 3 (section)
          • Customer 4 (section)
          • Customer 5 (section)
        • Colorado (section group)
        • Nevada (section group)
        • Utah (section group)
        • Other (section group)
      • Internal (section group)

    (you get the picture)

    This topology lets me have a full section for each customer.  Using section groups to group customers by state is very helpful for me in that it logically organizes my notes based on where I’m traveling for a given week.

    And having OneNote on my phone is really slick – I can quickly review notes for a customer before a meeting begins, or take quick notes on my phone to record impromptu tidbits of information.  With my notes automatically syncing to SkyDrive, my notebook is always up-to-date, regardless of the device I’m using (phone, 2 laptops, or desktop).  Nice!

    But I ran into a snag.  Remember my love for section groups?  That feature isn’t supported in OneNote for WP7.  When I open the notebook on WP7 I can only see the Summary section – section groups aren’t recognized – so I can’t see my customer notes!

    In doing some searching online, I found this thread on Microsoft Answers in which a workaround was published:

    1. Copy Link to Section GroupIn OneNote (desktop), right-click on the desired section and select “Copy Link to Section Group”.
    2. Email yourself the link
      1. The default paste action will put two links in the email, one to open on the web and the other to open in OneNote.
    3. Open the email on your phone and follow the link:  follow the “OneNote” link, not the “Web” link.

    This will open the section group as a notebook on your phone.  While not ideal, it does give you access to the contents of your section group.  So in my scenario, I emailed myself (in a single email) links to the section group for each state: Arizona, California, Colorado, Nevada, Utah, and Other.  Since each of these section groups have no nested section groups, I’m golden.  It’s a little work, but you only have to do it once for each section group.

    Now, when I go to OneNote on my phone, I see:

    • Arizona
      • Customer 1 (section)
      • Customer 2 (section)
    • California
      • Customer 3 (section)
      • Customer 4 (section)
      • Customer 5 (section)
    • Colorado
    • Nevada
    • Utah
    • Other

    So what does it all boil down to?  OneNote on WP7 doesn’t recognize section groups (OneNote 2010), but it can recognize them as “root” notebooks.  So email yourself the link to each section group and WP7 will see each section group as a notebook.  If you have nested section groups, you’ll need to pick and choose which ones you really want to have available on your phone and do the email/open process for each one.

    I hope this helps someone out there!

  • Steve Lange @ Work

    ALM Rangers at work again!

    • 0 Comments

    Earlier this month, the ALM Rangers team released two newly-completed projects to CodePlex, the Rangers Lab Management Guide and the Rangers Build Customization Guide.

    I expect you to find both guides valuable as you further your usage of Team Foundation Server 2010.  Below are some details for each project.  Selfishly, I’m especially fond of the second one (I was a contributing author):

    Lab Management Guide

    This project has the primary goal of delivering scenario based and hands-on guidance for the planning, setup, configuration and usage of Visual Studio Lab Management, backed by custom VM Template automation for reference environments.

    The content is packaged in 3 separate zip files to give you the choice of selective downloads. The default download is the first of the listed packages:

    • Guidance, which includes scenario based practical guidance and frequently asked questions.

    • Hands-on Labs (HOL), which includes the HOL documents that provide walkthroughs of the technology, based on the guidance

    • HOL Package, which includes a HOL environment setup package which allows you to setup the HOL environment in your own environment

    The Epics included in the guidance are:

    • Epic - Visualization of the guidance using quick reference posters
    • Epic - Advanced golden image management using the VM Factory for Lab Management
    • Epic - Provide guidance on setting up Test environments with respect to pre-defined personas
    • Epic - Provide Guidance to enable large and small teams to setup and configure both automated and manual tests
    • Epic - Provide practical guidance for managing and maintaining a Lab Management environment
    • Epic - Provide practical guidance to enable teams to quickly setup and configure their lab management environment

    Build Customization Guide

    This project has the primary goal of delivering scenario based and hands-on lab guidance for the customization and deployment of Team Foundation Build 2010 activities such as versioning, code signing, and branching.

    Guidance, Hands-on Labs, and Quick Reference Posters

    The content for this project is provided in individual packages to allow you to be selective in what you get:

    • Guidance contains scenario based practical guidance, frequently asked questions and quick reference posters
      • Selected PDF contains guidance and quick reference posters in PDF format only.
      • Complete contains guidance, quick reference posters and localization files in all available formats.
    • Hands-on Labs (HOL) includes:
      • HOL documents that provide walkthroughs of the technology, based on the guidance
      • HOL Package contains a HOL environment setup package allowing you to setup the HOL environment in your own environment
      • BRDLite Build Process Reference Template walk-through.
    • Samples contains sample build process templates used by the team as part of the guidance.
    • Videos which showcase the guidance in quick 5-10min videos.

    The Epics included in the guidance are:

    • Practical guidance and tooling to simplify the customization of Team Foundation Build
    • Practical guidance to use Team Foundation Build process templates to automate build and non-build scenarios in Microsoft environments
    • Practical guidance to enable simple and flexible deployment of applications and their data stores
    • Practical guidance for Activities to empower developers and build engineers
    • Quality hands-on labs that complement the guidance and effectively guide the user through the features
    • Visualization of the guidance using quick reference posters

    For additional information related to this project, check out Willy’s post.

     

    Like what you see?  Check out the full list of Rangers projects.  Also, be sure to read about who the Rangers are!

  • Steve Lange @ Work

    Partner Webcasts: Northwest Cadence

    • 0 Comments

    Several of our awesome ALM partners are delivering some terrific webcasts this summer and fall.  In this post, I’ve listed upcoming webcasts from Northwest Cadence.

    Northwest CadenceTake a look, and if you see something you like, click on the webcast title to register!  See NW Cadence’s events page for additional details, events, or last-minute changes.

    Friday, July 22 - Scrum versus Kanban

    Scrum is a process model that promotes highly iterative, value driven development and has been successfully adopted by agile teams world-wide. Kanban, meaning “signboard”, is a concept relation to Lean and focuses on the reduction of work in progress and visual signals to indicate that new work should be started. Both models have proven track records, and in this session Martin Hinshelwood (ALM MVP and Scrum proponent) and Steven Borg (ALM MVP and Kanban fan) will go head to head to discuss their similarities, their differences, and which you should choose for your software development.

    Friday, August 5 - Introduction to Kanban

    Kanban is a Lean-inspired approach to software development. Although the rules of Kanban are simple, they are also remarkably powerful. By simply visualizing work, limiting work in process, and monitoring the flow of work, the team begins a powerful process of discovery and improvement. This has resulted in impressive improvements in nearly all areas of software development time and time again. During this event, we will talk about the five basic principles of Kanban adoption, the benefits of adoption, and the pitfalls along the way.

    Friday, August 19 - Introduction to Scrum

    Scrum is the most adopted agile methodology. Time and again, it has transformed low performing development teams into powerful creators of business value. Scrum does particularly well in environments where requirements shift or change unpredictably and in areas with substantial uncertainty. During this event, we will introduce the three Scrum roles, dive into the basic Scrum processes, and explore the reasons behind Scrum’s power. Although this event is an introduction to Scrum, we will provide several tips and tricks to assist in Scrum adoption.

    Friday, September 9 - Visualize Work – The Power of Big Visible Displays

    Visible work has a profound impact on a team. By making work visible, teams can rapidly identify bottlenecks and issues, visualize the amount of work the team has under development, and most importantly understand the “life story” of the features they are working on. At a glance, teams can identify overloaded people, problematic stories, quality problems, and overall development speed. Visualization is one of the key tools in an effective Kanban implementation. During this event, we will discuss how Kanban teams visualize work, where to get started with visualization, and the tools available to help build effective visualizations electronically.

     

    Northwest Cadence delivers deep technical acumen and broad process perspective. After all, technologies alone do not translate into success. Productivity is about clearing bottlenecks and reducing waste while leveling the load wherever possible. It is also about optimizing flow, while preserving quality and minimizing risk. All of this makes for a delicate balance.

  • Steve Lange @ Work

    Steve’s Newsletter–June 2011

    • 0 Comments

    Did you notice that it’s June, too?  If you work in the field at Microsoft, you’ve probably been preparing for the last month of our fiscal year by either setting a “1 month” reminder or actually ripping the month right out of your calendar (sorry, you can’t do that in Outlook.  Feature request, maybe?).

    So this edition of the newsletter is being written in parts at an airport, on a plane, or quietly downstairs in my home office.

    Announcements

    Events & Trainings

    • 6/10: HTML5 Web Camps in Colorado Springs and Irvine! The focus? HTML5. ‘Nuff said. Come to this web camp (it’s FREE, by the way) to learn how to leverage HTML5 to build the next generation of exciting websites. Presentations & demos to start, followed by hands-on labs to really get those creative juices flowing. Get registered today!
    • 6/10:  Azure Bootcamp coming to Denver and Salt Lake City!  Join us for an immersive experience which will help explore and learn about how to leverage the Windows Azure platform and get started with the tools and architecture available. Register now, as space is limited! (Registration: Denver | Salt Lake City)
    • 6/24: Windows Phone 7 Unleashed event in Tempe!  BYO laptop for a 1/2 day of lecture and 1/2 day of lab!
    • Upcoming Webcasts:

    Final Thoughts

    I’m officially “in role” in Southern California again (additive to my current areas) alongside William Salazar.  If you have development teams in SoCal, give me a shout, as I’d love to see how I can help you get the most bang for your buck out of your Microsoft development products.

    This newsletter will probably take a month off in July as I hope to catch up on my “work/life” balance.  :)

    I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful! Whenever I post a new newsletter, I will send email notifications to those of you who would like to be contacted. If you don’t want to receive email notifications, just let me know!

  • Steve Lange @ Work

    Free HTML5 Web Camp - Colorado Springs

    • 0 Comments

    image

    Are you going (or planning) to be in the Springs on June 10th?  Of course you are, because you’re attending the HTML5 Web Camp!

    Microsoft's Web Camps are events that allow you to learn and build websites using HTML5 technology and more. This event is a unique opportunity, partnering classroom learning and hands-on-labs, and leveraging experts to help you build new and exciting websites. No matter what your expertise in web development, these Web Camps are the perfect opportunity to get hands-on experience and 'unleash your coding genius'.

    As developers, you keep hearing a lot about HTML5, but many don’t know what it actually means or is truly capable of. If you want to learn about it, your choices are limited; you can either pick up a book or attend an expensive conference that often only scratches the surface. The HTML5 Web Camp is an opportunity to connect with designers and developers and show you what’s possible, and how you can start using it today. HTML5 WebCamp is a completely free event, and will start with demos and presentations, and will end with hands-on lab sessions, that will allow you to walk through materials and get your questions answered! Space is limited.

    Here are a few sample topics that will cover in the Web Camps:

    • Introduction to HTML 5
    • Web Development with HTML 5
    • Adding Video, Sound, and Animations with HTML 5
    • IE9 and HTML 5 – Your Site Never Looked So Good!
    • Best Practices for HTML 5

    Presenters:

    Things to Bring:

    • Notebook computer
    • Sketchbook
    • Identification
    • Snacks
    • Bottled Water

    Particulars:

    • Date: June 10, 2011
    • Time: 9:00am - 5:30pm
    • Location:
      Antlers Hilton
      4 South Cascade Avenue
      Colorado Springs, CO 80903 (map)

    Are you ready to go camping?  REGISTER HERE

  • Steve Lange @ Work

    Today at TechEd: ALM Roadmap Released!

    • 0 Comments

    You’ve all be asking, “What’s next for Visual Studio?”  Well, today at TechEd in Atlanta, Jason Zander gave the first solid peek at Visual Studio “vNext”.

    He also blogged in detail about this announcement.  Read his post in full for all the juicy details, including screenshots, but below are my personal highlights:

    VS vNext will bring in two more role interactions: stakeholders and operations.  To do so, Visual Studio will include new and improved capabilities:

    • Agile Planning Tools – New backlog and task board capabilities will further help provide development transparency.
    • Lightweight Requirements – Use PowerPoint to communicate requirements and design in a comfortable manner.
    • Stakeholder Feedback – Similar to Test Pro 2010, stakeholders can easily provide actionable feedback about the work in progress.
    • Continuous Testing – Expanded unit test support by including MSTest, nUnit, and xUnit, targeting both .NET and native C++ code.
    • Agile Quality Assurance – Among other things, a new exploratory testing tool allows application “spelunking” to identify additional product issues.
    • Aligning Development with Operations – A new System Center / TFS connector CTP is on its way to help enable an operations team to assign application performance monitoring and diagnostic information gathered by System Center to TFS for immediate attention.

    For more information, check out the “Visual Studio vNext: Application Lifecycle Management” whitepaper, now available. Also, be sure to take a look at the Visual Studio Roadmap.

  • Steve Lange @ Work

    Utah Event: Using the Visual Studio 2010 ALM Tools to Improve Your Software Lifecycle Management

    • 0 Comments

    Visual StudioCome join Microsoft and Notion Solutions on May 24th in our Lehi office as we present the latest tools and techniques for managing your software process to attain quality software using Microsoft Visual Studio 2010 and the Application Lifecycle Management (ALM) tools provided with this release.  These new tools provide significant value beyond what is available with Microsoft Visual Studio Team System 2008.

    The day will cover the following topics:

    Overview of Visual Studio 2010 ALM Tools for Managing Your Software Lifecycle

    (9:00-11:00am)

    This is an overview of Visual Studio 2010 and ALM tools and highlights the difference between Visual Studio Team System 2005/2008 and the new Visual Studio 2010, including the new Team Foundation Server features, the new modeling and debugging tools, as well as the latest in capabilities for managing and performing testing.

    Using Team Foundation Server 2010 for Non-Windows Development

    (11:00-12:00pm)

    This is an overview of the best practices for utilizing Team Foundation Server (TFS) 2010 and Microsoft Visual Studio Team Explorer Everywhere for development activities beyond Microsoft and the Windows platform. This presentation will shows development teams using mixed and non-Microsoft platforms how to effectively leverage TFS 2010 to adopt work item tracking, version control, and automated build and test technologies.

    Improving Software Quality with Microsoft Visual Studio 2010 Test & Lab Tools

    (1:00-3:30pm)

    This is an overview of the Visual Studio 2010 and the Visual Studio Test Professional 2010 testing tools, including using the new Microsoft Test Manager 2010 to manage your testing and using test automation to automate your UI testing. The use of Microsoft Visual Studio Lab Management 2010 will be discussed as a means of automating the creation of virtual environments for testing purposes. See how the Microsoft Visual Studio 2010 testing and lab tools can help streamlining your entire testing lifecycle.

    Summary and Q&A

    (3:30-4:00pm)

    Registration info:
    May 24, 2011
    Microsoft Corporation
    Lehi/Salt Lake City, UT
    Event ID: 1032485358
    June 16, 2011
    Microsoft Corporation
    Irvine, CA
    Event ID: 1032485360

    I hope to see you there!

  • Steve Lange @ Work

    Steve’s Newsletter – May 2011

    • 0 Comments

    I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful! Whenever I post a new newsletter, I will send email notifications to those of you who would like to be contacted. If you don’t want to receive email notifications, just let me know!

    Announcements

    Events & Training

     

    Final Thoughts

    Microsofties in my role predominantly cover specific geographies in order to load balance resources across a region. For example, my geography covers Montana, Wyoming, Colorado, New Mexico, Arizona, Utah, and southern Nevada. Beginning in a few weeks, I’ll be expanding my reach into certain parts on Southern California – my old stomping grounds where I worked from 2005 to 2007 – I look forward to re-connecting with my old customers and colleagues! 

  • Steve Lange @ Work

    Running Code Metrics as Part of a TFS 2010 Build – The Poor Man’s Way

    • 8 Comments

    Code Metrics, not to be confused with code analysis, has always been tough impossible to run as part of a build in Team Foundation Server.  Previously, the only way to run code metrics was to do so inside Visual Studio itself.

    In January, Microsoft released the Visual Studio Code Metrics PowerTool, a command line utility that calculates code metrics for your managed code and saves the results to an XML file (Cameron Skinner explains in detail on his blog). The code metrics calculated are the standard ones you’d see inside Visual Studio (explanations of metric values):

    • Maintainability Index
    • Cyclomatic Complexity
    • Depth of Inheritance
    • Class Coupling
    • Lines Of Code (LOC)

    Basically, the power tool adds a Metrics.exe file to an existing Visual Studio 2010 Ultimate or Visual Studio 2010 Premium or Team Foundation Server 2010 installation.

    So what does this mean?  It means that you can now start running code metrics as part of your builds in TFS.  How?  Well, since this post is titled “The Poor Man’s Way”, I’ll show you the quick and dirty (read: it works but is not elegant) way to do it.

    As a note, Jakob Ehn describes a much more elegant way to do it, including a custom build activity, the ability to fail a build based on threshold, and better parameterization.  I really like how flexible it is!  Below is my humble, quick & dirty way.

    The below steps will add a sequence (containing individual activities to the build process workflow that will run just prior to copying binaries to the drop folder.  (These steps are based on modifying DefaultBuildTemplate.xaml.)

    1. Open the build process template you want to edit (it may be simpler to create a new template (based on the DefaultBuildProcessTemplate.xaml) to work with.
    2. Expand the activity “Run On Agent”
    3. Expand the activity “Try, Compile, Test and Associate Changesets and Work items”
      1. Click on “Variables”, find BuildDirectory, and set its scope to “Run On Agent”
    4. In the “Finally” area, expand “Revert Workspace and Copy Files to Drop Location”
    5. From the toolbox (Control Flow tab), drag a new Sequence onto the designer, just under/after the “Revert Workspace for Shelveset Builds”. (Adding a sequence will allow you to better manage/visualize the activities related to code metrics generation).
      1. In the Properties pane, set the DisplayName to “Run Code Metrics”
    6. From the toolbox (Team Foundation Build Activities), drag a WriteBuildMessage activity into the “Run Code Metrics” sequence.
      1. In the Properties pane
        1. set DisplayName to Beginning Code Metrics
        2. set Importance to Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.Normal (or adjust to .High if needed)
        3. set Message to “Beginning Code Metrics: “ & BinariesDirectory
    7. From the toolbox, drag an InvokeProcess activity into the sequence below the “Beginning Code Metrics” activity (this activity will actually execute code metrics generation).
      1. In the Properties pane
        1. set DisplayName to Execute Coded Metrics
        2. set FileName to “””<path to Metrics.exe on the build machine>”””
        3. set Arguments to “/f:””” & BinariesDirectory & “\<name of assembly>”” /o:””” & BinariesDirectory & “\MetricsResult.xml”  (you can also omit the assembly name to run matrics against all assemblies found)
        4. set WorkingDirectory to BinariesDirectory
    8. (optional) From the toolbox, drag another InvokeProcess activity below “Execute Code Metrics” (This activity will copy the XSD file to the binaries directory)
      1. In the Properties pane
        1. set DisplayName to Copy Metrics XSD file
        2. set FileName to “xcopy”
        3. set Arguments to “””<path to MetricsReport.xsd>”” ””” & BinariesDirectory & “”””
    9. Save the XAML file and check it in to TFS.

    Workflow after adding code metrics sequenceThe sequence you just added should look like (boxed in red):

    You basically have a sequence called “Run Code Metrics” which first spits out a message to notify the build that code metrics are beginning.

    Next, you actually execute the Metrics.exe executable via the InvokeProcess activity, which dumps the results (XML) file in the Binaries directory (this makes it simpler to eventually copy into the drop folder).

    The “Copy Metrics XSD file” activity is another InvokeProcess activity which brings along the appropriate XSD file with the metrics result file.  This is optional of course.

    After you run a build using this updated template, your drop folder should have something like this:

    Drop folder after running build with new template

    Pay no attention to the actual binaries – it’s the presence of MetricsReport.xsd and MetricsResults.xml that matter.

    Pretty cool, but there’s one annoyance here!  The metrics results are still in XML, and aren’t nearly as readable as the results pane inside Visual Studio:

    MetricsResults.xml on top, Code Metrics Results window in VS on bottom

    Don’t get me wrong – this is a huge first step toward a fully-baked out-of-VS code metrics generator.  The actual report generation formatting will surely be improved in future iterations.

    I decided to take one additional step and write a simple parser and report generator to take the XML results and turn them into something more pretty, like HTML.

    Before I dive into code, this is the part where I remind you that I’m not (nor have I ever been) a developer by trade, so the code in this blog is purely for functional example purposes.  Winking smile

    I created a relatively simple console application to read in a results XML file, parse it, and spit out a formatted HTML file (using a style sheet to give some control over formatting).

    I’m posting the full example code to this post, but below are the highlights:

    I first created some application settings to specify the thresholds for Low and Moderate metric values (anything above ModerateThreshold is considered “good”).

    Settings to specify Low and Moderate metric thresholds

    I created a class called MetricsParser, with properties to capture the results XML file path, the path to output the report, and a path to a CSS file to use for styling.

    To store individual line item results, I also created a struct called ResultEntry:

        struct ResultEntry
        {
            public string Scope { get; set; }
            public string Project { get; set; }
            public string Namespace { get; set; }
            public string Type { get; set; }
            public string Member { get; set; }
            public Dictionary<string, string> Metrics { get; set; }
        }

    I then added:

    private List<ResultEntry> entriesShifty

    which captures each code metrics line item.

    If you look at the results XML file, you can see that in general the format cascades itself, capturing scope, project, namespace, type, then member.  Each level has its own metrics.  So I wrote a few methods which effectively recurse through all the elements in the XML file until a complete list of ResultEntry objects is built.

    private void ParseModule(XElement item)
            {
                string modulename = item.Attribute("Name").Value.ToString();
                
                ResultEntry entry = new ResultEntry
                {
                    Scope = "Project",
                    Project = modulename,
                    Namespace = "",
                    Type = "",
                    Member = ""
                };
                List<XElement> metrics = (from el in item.Descendants("Metrics").First().Descendants("Metric")
                                          select el).ToList<XElement>();
                entry.Metrics = GetMetricsDictionary(metrics);
                entries.Add(entry);
                List<XElement> namespaces = (from el in item.Descendants("Namespace")
                                          select el).ToList<XElement>();
                foreach (XElement ns in namespaces)
                {
                    ParseNamespace(ns, modulename);
                }
            }

    Bada-bing, now we have all our results parsed.  Next, to dump them to an HTML file.

    I simply used HtmlTextWriter to build the HTML, the write it to a file.  If a valid CSS file was provided, the CSS was embedded directly into the HTML header:

     #region Include CSS if available
     
                    string cssText = GetCssContent(CssFile);
                    if (cssText != string.Empty)
                    {
                        writer.RenderBeginTag(HtmlTextWriterTag.Style);
                        writer.Write(cssText);
                        writer.RenderEndTag();
                    }
     
    #endregion

    After that, I looped through my ResultEntry objects, inserting them into an HTML table, applying CSS along the way.  At the end, the HTML report is saved to disk, ideally in the build’s binaries folder.  This then allows the report to be copied along with the binaries to the TFS drop location.

    Code Metrics Results HTML Report

    You’ll notice that this layout looks much like the code metrics in Visual Studio if exported to Excel.

    So again, not the most sophisticated solution, but one that a pseudo-coder like me could figure out.  You can expand on this and build all of this into a custom build activity which would be much more portable.

    Here is the code for MetricsParser:

    Again I recommend looking at Jakob’s solution as well.  He puts a much more analytical spin on build-driven code metrics by allowing you specify your own thresholds to help pass or fail a build.  My solution is all about getting a pretty picture

    Happy developing!

  • Steve Lange @ Work

    Steve’s Development Tools Newsletter – April 2011

    • 0 Comments

    I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful! Whenever I post a new newsletter, I will send email notifications to those of you who would like to be contacted. If you don’t want to receive email notifications, just let me know!

    Announcements

    • Happy Birthday to Visual Studio 2010!  Ah, how time flies when you’re having fun!  Check out Soma’s blog for more fun information about Visual Studio 2010’s birthday.
    • The Team Foundation Server Integration Platform (think: plumbing which can be used to build integrations/synchronizations/migrations) has been updated.  This update is primarily bug fixes, but still an important release if you’re rolling your own migration tool for TFS.  Brian Harry lists the bug fixes here.
    • Do you have lots of build definitions in TFS 2010?  Is your build node in TFS starting to look a little too lengthy/busy?  I recommend you take a look at Inmeta Build Explorer in the Visual Studio gallery.  It uses a naming convention to help visually organize your build definition into a more navigable structure
    • A new book on TFS entitled “Professional Team Foundation Server 2010” has just recently been released.   It’s a great read which goes into how to get the most out of the capabilities of TFS across the board (including customizing and extending).
    • Oracle and .NET now play even better together with Oracle’s release of the ODAC for EF and LINQ and Quest’s Toad Extension for Visual Studio.  Now you can query Oracle easily using LINQ and Entity Framework, and leverage the Toad Extension for enabling change management for the development of Oracle databases.
    • We’re making it easier for Eclipse developers to take advantage of Windows Azure with the CTP release of the Windows Azure Plugin for Eclipse.  Take a look at this blog post for more details!

    Events & Training

    MIX11 is NOW!

    If you’re not one of the lucky ones to be able to attend in person, you can still catch it live online at http://live.visitmix.com/.

    MSDN Events Presents:  Understanding Azure

    Cloud Development is one of the fastest growing trends in our industry. Don’t get left behind. In this event, Rob Bagby and Bruno Terkaly will provide an overview of developing with Windows Azure. They will cover both where and why you should consider taking advantage of the various Windows Azure’s services in your application, as well as providing you with a great head start on how to accomplish it. This half-day event will be split up into 3 sections. The first section will cover the benefits and nuances of hosting web applications and services in Windows Azure, as well as taking advantage of SQL Azure. The second section will cover the ins and outs of Windows Azure storage, while the third will illustrate the Windows Azure App Fabric.

    DATE
    CITY, STATE
    TIME
    REGISTRATION LINK
    April 15, 2011
    Tempe, AZ
    1:00 PM – 5:00 PM
    April 18, 2011
    Bellevue, WA
    1:00 PM – 5:00 PM
    April 19, 2011
    Portland, OR
    1:00 PM – 5:00 PM
    April 20, 2011
    Irvine, CA
    1:00 PM – 5:00 PM
    April 21, 2011
    Los Angeles, CA
    1:00 PM – 5:00 PM

    What Event Do You Want?

    We’re doing some initial planning for our developer & platform events in the summer and fall.  What would you like to see, especially from a development tools perspective?  Some thoughts we’re currently considering:

    • Agile Database Development
    • Lab Management
    • Architecture with Visual Studio 2010

    Let me/us know what grabs you!

    QuickAnswers

    • If you have Visual Studio Ultimate, you have access to unlimited load testing (previously your limit was 250 v-users).  You can configure multiple load agents to ramp up your load.  Any VS Ultimate user can leverage them.
    • This is a know issue in Test Manager that when building a test case if you go beyond 10 steps the steps window shrinks. This makes it harder to see multiple steps at the same time.  You can try restoring the Test Manager window from Maximize and then manually change window size.
    • When doing a schema compare, remember that the Compare Settings->Ignore Objects dialog lists items for you to check if you want to ignore them, not include them.  By default, Extended Properties are ignored (checked).
    • If you’re losing IntelliSense in database projects, it’s most commonly related to online/offline availability, insertion points, and specific conditions in the T-SQL Editor.  One way to help troubleshoot is to create a new, simple database project and see what IntelliSense experience you have.

    Final Thoughts

    Please continue to send me your ideas for items to include in this monthly newsletter.  Some have requested more information about the different roles in the developer & platform evangelism (DPE) division at Microsoft, which I’m happy to do!

    Others have inquired about the best way to reach me to ask simple, one-off questions.  While direct email is always fine, I do also use Formspring, a question and answer service.  You can find my profile page on Formspring (and ask me a question) here:  http://www.formspring.me/slange.

  • Steve Lange @ Work

    Using Oracle and Visual Studio together?

    • 1 Comments

    It’s about to get a heck of a lot easier!

    Both of what I’m about to discuss below are in beta, so please exercise your normal caution when using these tools.

    vs2010logo

    Oracle Data Access Using Entity Framework and LINQ

    A beta of Oracle Data Access Components (ODAC) for Microsoft Entity Framework and LINQ to Entities is now available on the Oracle Technology Network (OTN). What is this? The ODAC for EF and LINQ is a set of components that bring Oracle data access into the folds of the Microsoft Entity Framework, Language Integrated Query (LINQ), and Model-First development.

    If you’ve ever used the Entity Framework or LINQ, you can readily understand how productive these capabilities can be for a developer. Previously, EF and LINQ were not feasible with Oracle.

    If you’re not familiar with EF, LINQ, or the concept of Model-First:

    • The Microsoft Entity Framework (EF) abstracts the relational, logical database schema and presents a conceptual schema to the .NET application. It provides object-relational mapping for .NET developers.
    • LINQ is a .NET data querying language which can query a multitude of data sources using common structured syntax.
    • Model-First allows the conceptual model to be created first by the developer. Next, Visual Studio can create DDL scripts to generate the relational database model based on the conceptual model.

    Get started today! Download the beta, and then walk through the tutorial.

    Note: The beta includes the 32-bit Oracle Database client 11.2, which can access Oracle Database server 9.2 and higher. It requires Microsoft Visual Studio 2010 and .NET Framework 4.

    Toad Extension for Visual Studio 2010Oracle Database Change Management with Toad Extension for Visual Studio

    Speaking of Visual Studio, did you know our friends at Quest Software have been hard at work developing the Toad Extension for Visual Studio? Toad Extension for Visual Studio is a database schema provider (DSP) for Oracle in Visual Studio 2010, and aims to give the full benefits of Visual Studio 2010’s database change management and development features to Oracle databases. This includes offline database design, development and change management, better aligning your Oracle development with the rest of your organization’s application lifecycle management methodology.

    How do you get started? Download the beta, watch a couple videos, and dive in!

     

    Links & Additional Information

    ODAC for Microsoft Entity Framework and LINQ

    Toad Extension for Visual Studio

  • Steve Lange @ Work

    New Invoicing Option Available for Azure Benefits on MSDN

    • 1 Comments

    azure smallAs you may know, as an MSDN subscriber you get access to Windows Azure for reviewing your application’s viability and resource requirements in the cloud (see Azure Benefits for MSDN Subscribers). 

    If you went over the allotted computing usage while using your Azure access, you previously only had the option to pay for that overage via credit card.

    Now, you have two options:  credit card or invoicing.  (And if you’re a volume license (VL) customer, you can use your VL Agreement number to server as a credit check during invoicing setup.)

    So if you haven’t already activated your MSDN Windows Azure benefit, it’s pretty easy to get started.

    Credit Card Option – Simply go to the Windows Azure Portal and follow the instructions to activate via your MSDN subscriptions page.  For a straightforward walkthrough, try this.

    Invoicing Option – Start at the Azure Invoicing information page, then complete your activation at the Windows Azure Portal.

Page 4 of 14 (340 items) «23456»