You will find on a Scott Gu's post a list of nice debugger visualiser.

How to install them ? Simply copy the DLLs in the

  • for a single user
    • C:\Documents and Settings\UserName\My Documents\Visual Studio 2005\Visualizers
  • for all users
    • C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger\Visualizers

To conclude my Tech Days 2008 posts, I wanted to add a section with the list of question I have asked to the different speakers and their answers.

  • Ingo Rammer - after the "Advanced Debugging" Session
    • For debugging purposes, I have been working with the Performance tools of Visual Studio and I have experience some strange behaviors : when trying to visualise the function call tree to see which par of my code was taking long, I could not visualize the full call tree. Do you have seen any limitation on this tool that could explain this problem ?
      • Unfortunately, I mainly work in "Production Debugging mode" where I don't have any Visual Studio installation available and so I don't know very well the performance tools of Visual Studio.
    • And when you need to trace performance of you application, which tool do you use ?
      • There is the tool of RedGate (Note : ANTS), but I don't like it so much. I prefer using dotTrace  
  • Nikhil Kothari - after the "Ajax Patterns" Session
    • I have been really interested by the last part of your demo, using Silverlight to read a client file. Is there currently any poossibilities for Silverlight to interact with client resources ? eg getting access to a card reader ?
      • Currently only the ReadFile function allow to access client resources. So unless the card reader allow this kind of API, no it's not possible.
    • Do you know if there is something planned ?
      • There are of course improvements planned for Silverlight, but I don't know if this kind of enhancements is foreseen  
  • Jelle Druyts - after the "Domain-Specific Developments with Visual Studio DSL Tools" Session
    • I have been workinng with the DSL tools but a very long time ago and I am curious to compare what I have seen at this time - when it was immature - and now. Does the T4 template files are still shipped with a model ? (and so copied multiple times for each solution we will use the DSL tool ?)
      • Unfortunately yes. This does not really makes sense and moreover it does complicate any patch or upate to the tool. But what is possible - and what I have done for the Configuration Section Designer - is to provide a very small  T4 template file that will just link to the real file, installed in a common location, eg in the program files folder.
    • And can the T4 templates generate now multiple files ?
      • No still not. It's a pity because it could me more readable (Note : even if the generated files should not be read) to generate several files, and also in different locations, as for example in different projects to allow a full separation of concerns. This will probably arrive in the future.
    • And do we still have the limitation to have only one model by project ?
      • No. The transformation is based on file extension. As a consequence, we can now have as many model as we want.
  •  Roy Osherove - after the "Deep Reflection" Session - Get the slides here
    • I'm curious to know, when you would generate IL at runtime using the techniques you have shown, and when you will use an AOP framework to do the same at compile time ?
      • Well I have never been needint to use an AOP framework. But anyway philosophically speaking, I would never generate IL at runtime Laughing
    • Laughing Honestly me neither. But sometimes we need Smile
    • I wanted also to re-ask the same question about the performance tools that I haved asked to Ingo Rammer, but I got the same answer.
    • And are you still working on "the Regulator"

Thanks all to all theses comments ! I would have liked to speak more about the sessions, but the schedule is so fast we couldn't continue. But great event, and great speakers !

And here is the summary of the last day of the Tech Days. Definitely too short !

Session 1 : ASP.NET MVC Framework (By Matt Gibbs)

Find some information on Scott Guthrie's blog, or download it here

Matt Gibbs has presented today this new framework designed by Phil Haack (for which no shipping date has been planned) that should enforce the separation of concerns. Some key points ?

  • The DLLs have been reorganized and for exemple the new System.Web.Routing.dll could be used for another project, as for example for the Dynamic Data Framework?
  • Creating a MVC project will generate a new test project and we can decide to use some other tools like Brail for the Views or NHibernate for the Models
  • The page in the MVC model will not contain any form. As a consequence, some controls will not be used (all the controls doing postbacks, the UpdatePanel, ...)
  • Some constraints can be set on the routes using regular expressions

Session 2 : Domain-Specific Development with Visual Studio DSL Tools (By Jelle Druyts)

Jelle Druyts has presented the DSL tools by presenting its project Configuration Section Designer that will help creating class for reading sections from the config file. Note that it will also generate an XSD for having intellisense.

  • He has presented quickly the different Software Factory Technologies
    • Visual Studio Templates
    • Modeling Tools (in the Team Edition for Software Acrhitects)
    • The Guidance Automation Toolkit
    • The DSL tools
  • The DSL authors will need the Visual Studio 2008 SDK. Note that the DSL consumer will need a normal VS 2008 installation (it was not the case in VS 2005)
  • He has shown the use of "Bring Tree Here" in the DSL designer
  • He has explained the two views to define in the designer : the domain model and the shapes, and has shown the mapping between the two in the designer
  • Explanation of the constraing (soft or hard) by using some exceptions or some rules
    • Note that a soft rule will allow to persist the model but will block at validation time
    • The constraint can be done using a partial class : PropertyHandler and overriding a OnValueChanged method

Inspiration Session 2 : Fun In .NET (By Chad Hower - website : Woo-Hoo)

Well... Fun indeed but not of great interest. Ok we can control Powerpoint or a rocket launcher with a WIImote... Cool but what for ?

Chad Hower has also presented quickly COSMOS - its C# Open Source Managed Operating System.

Session 3 : Custom LINQ Providers - LINQ to anything (By Bart De Smet)

Crazy Session ! Very exciting !

  • Started with a quick C# 3.0 test
    • I have learned that when using anonymous types, a temporary variable will always be used to guarantee atomicity
  • Given some existing LINQ provider
    • LINQ to Flickr
    • LINQ to Desktop Search
    • LINQ to File System
    • LINQ to Sharepoint
  • Quickly explained the two query sources
    • IEnumerable -> will be transformed in anonymous methods
    • IQueryable -> will provide an Expression Tree
  • Precised that the transformation from LINQ to "code" will not necessarily search for extension methods. We can use some instances methods
  • Explanation of how to create a IQueryProvider
    • Note that the Execute method will be called only when a single result will be returned like when calling .Single, .First, .Default, ...
    • Note that "Linq to AD" support only Select and Where mehods
  • Demo of the Debugger Visualizer to see the Expression Tree
  • Note that there are some Extensions classes (SqlMethods, CamlMethods) to expose some functionality of a richer target language
  • He has described some difficulties of the transformation from an expression tree to the target language
    • having a client doing .ToString().ToString().ToString()...
    • having several syntax leading to the same things like "a" == "b" and "a".Equals("b") and string.Equals("a", "b") and ...
    • Bart De Smet is now working on a tool to normalize an expression tree

Session 4 : .NET 3.5 : Winforms & WPF (By Chad Hower - website : Woo-Hoo)

Once again, It didn't caught my eye. He has presented the strengh and weakness of the Winforms and of WPF

  • Winforms
    • Strength
      • Familiar
      • Many Controls
    • Weakness
      • No stylable
      • No flows, too many tabs
      • Different APIs for integrating audio, video, ...
  • WPF
    • Streangth
      • Stylable
      • Single API for integrating audio, video, ...
      • XAML like Silverglight
    • Weakness
      • We need to re-learn
      • We still need to work in XAML (some things cannot be done at design time)
  • There will be an update to VS 2008 during the year to improve the WPF designer
  • There are some converters
    • Winforms to XAML
    • PPT to XAML
    • Adobe and Flash to XAML

Session 5 : Deep Reflection (By Roy Osherove)

Great conference !

  • In the case of clone or serialization, there are two solutions
    • Doing by reflection
    • To Emit a method, method that will be called in the future
  • Explanation of the CodeDOM
  • Explanation of Reflection.Emit
  • Explanation of the Lightweight Code Gen (LCG)
    • With DynamicMethods, we can use SkipVisibility="false" to improve performance : the CLR will not test the visibility of the called members
    • DynamicMethods are garbage collected
    • We can create a delegate from a DynamicMethod
  • Quick demo of RunSharp that can ease the emit
  • Explanation of the ReflectionOnly mode to avoid being exposed to malicious code and some of the methods
    • Assembly.ReflectionOnlyLoad
    • Type.ReflectionOnlyGetTypes
    • CustomAttributeData.GetCustomAttributes
  • Explanation of how to create and compile an expression tree

Unfortunately, due to my spanish course, I could not see the Closing Keynote. But anyway, it was a great year. I will just regret that there was so few time between each session so I could not speak enough with the seakers I wanted to see or with other people present there I wanted to see.

Hello,

I went today to the launch day of the Tech Days 2008 in Ghent, Belgium. I will try to do a little résumé (as for the two next days) of the conference I have been able to see. Last year I was very excited after the first day with the great conferences of Jeff Prosise which will remain one of my top speakers.

This year, this first day, was less technical and more "commercial". Quite normal in fact for a launch day as it was announcing the launch of Windows Server 2008, Visual Studio 2008 and Sql Server 2008. In fact

  • Visual Studio 2008 has been launched (and in RTM) since October 2007
  • Sql Server 2008 has been delayed. A new CTP is available in February 2008 but the RTM version is planned for Q3 2008

Anyway, this first day was interesting.


Opening keynote (by Bill Hilf)

Many other guest came for little demos. Here Bill Hilf has spoken a bit of the three products, emphasizing on "Dynamic IT" and on the vitualization. Here are the key facts he has presented:

  • Windows Server 2008
    • Since Vista, Microsoft has rewritten all the TCP / IP layer
    • They have tried to limit the footprint size (meaning more or less the installation size and the component installed) in order to limit the patch quantity and sizes (and so to maximize the uptime) and also to limit the possible doors for hackers
      • If you want a web server, you may not want to install the UI
    • Includes BitLocker to encrypt hard disks
    • Delivered with IIS 7 that will support natively PHP
    • "Hyper-V" : the virtualization platform of Windows Server 2008
  • Visual Studio 2008
    • Improvement of the compilation time by 30%
    • Presentation of some new features as the split view, javascript debugging and Expression Blend
  • Sql Server 2008
    • The "Resource Governor" will allow to decide which percentage of the CPU will be attributed to which resource pool
    • It will be possible to encrypt a DB on the fly (and not only on a table level as now)
    • Will allow you to test a database agains some defined rules  

Session 1 : Visual Studio 2008 Overview (by Peter Himschoot)

The president of the VISUG has shown us some the main improvement of VS 2008. There was nothing I was not knowing already but I was curious to see how he was presentings this, just to get inspired :-)

What I can note ?

  • That the code of the demos he has done will be downloadable on his blog
  • He has presented the new Orcas build capabilities (build queuing and build triggering)
  • The Unit Testing will be available in the Professional Editions of VS

Session 2 : Next Generation Web Application with Visual Studio 2008 (by Gil Cleeren)

The webmaster of the VISUG has focused this time on the web part of VS 2008. Again I was knwoing many things. What I will note anyway ?

  • The new CSS windows ("CSS Style Manager", "Apply Styles Window" and "CSS Explorer") to ease the CSS manipulation in a web site and detect easilty which style is responsible of what effect on a control
  • The Javascript debugging and intellisense capabilities
  • How to use WCF with AJAX
  • Some controls of the "ASP.NET Ajax Control Toolkit" as the PopUp control and the Watermark control
  • The Visual Studio's WebTests will allow testing AJAX pages

Session 3 : Pervasive Business Intelligence with Sql Server 2008 (by Frederik Vandeputte)

This was an interesting session ! Indeed I have a very few knowledge of BI, Data Mining, Data Warehouse, Reporting using Sql Server. And this session allowed me to enter a bit in this (of course, I still have a lot to do !)

  • He has shown among other things the CDC (Change Data Capture) possibilities : how it works (based on the transaction log files), how we can interrogate the DB to see the changes, ...
  • The profiling capabilities within the "Data Profile View" that will allow to extract some statistics on a table like the min or max value, the number of null values, the distribution of the values, ...
  • Presentation of the new "Dundas" charts that are now included with the Reporting Services
  • The datamining tools in Excel (that have appeared in the Sql Server 2005 SP2) have been improved
  • Being able to analyse the data of a table to see the influence of datas on a specific values

Finally the vice-president of the "SQL User Group" has given us a rendez-vous for more session in its user group !


That's all for today ! Time to go to sleep now to see some other great session tomorrow, specially the ones of Ingo Rammer and Roy Osherove !

See you tomorrow !

Few days ago, I was needing to be able to retrieve some informations about the builds we had launched. I was so needing to work with the TFS API.

To do this, you must have Visual Studio and a Team Explorer installed.

  1. Create a new application (a console application for example)
  2. Add a reference to the DLLs
    1. Microsoft.TeamFoundation.Build.Client
    2. Microsoft.TeamFoundation.Build.Common
    3. Microsoft.TeamFoundation.Client
    4. Microsoft.TeamFoundation.Common
You can find these DLLs in the folder "Program Files\Microsoft Visual Studio X.X\Common7\IDE\Private Assemblies
And after you can very simply interrogate the TFS API as for example :

string tfsUrl = "http://YourTFS:8080";

string teamProject = "Your Team Project Name";

string teamBuildType = "The name of your team build";

 

//Connect to the Team Foundation Server using the credentials

//of the currently logged person

TeamFoundationServer server = TeamFoundationServerFactory.GetServer(tfsUrl);

//Access the build service

BuildStore buildStore = server.GetService(typeof(BuildStore)) as BuildStore;

//and get the list of builds

BuildData[] buildDatas = buildStore.GetListOfBuilds(teamProject, teamBuildType);

 

//Iterate on all your builds

foreach ( BuildData buildData in buildDatas )

{

   PlatformFlavorData[] platforms = buildStore.GetPlatformFlavorsForBuild(buildData.BuildUri);

 

   // Iterate, for a specific build,

   // on all the build platform and flavor you have defined

   foreach ( var platformFlavor in platforms )

   {

      TestResultData[] testResults = buildStore.GetTestResultsForBuild(buildData.BuildUri, platformFlavor.PlatformName, platformFlavor.FlavorName);

 

      foreach ( TestResultData testResultData in testResults )

      {

         /* Here for each build platform and flavor

         * you are iterating on the test results

         */

      }

   }

}

Quite easy no ?

Juste one things to know : this code will work, whatever the version of your Visual Studio and TFS. But all the class you use here are deprecated under TFS 2008 (but will still work).

So how to do the same thing using the new TFS 2008's classes ? To be seen in a future post ! ;-)