Rob Relyea


  • XTech presentation on Avalon/XAML

    Filed under: ,

    At XTech, I just finished a 45-minute talk on Avalon & XAML.  It went well...but 45 minutes is pretty short.

    I did the following:

    • Some "slides" on Microsoft platforms  (win32, com, .net, gdi/gdi+, direct x)
    • Some "slides" on Avalons goals
    • Demo of BlackJack running as an Avalon Express Application
    • Demo of Notepad written in Avalon (had spell checking, rich text option, saving to xaml)
    • Talk about the basics of XAML...markup=om, object elements, attribute treatment, xmlns, property elements, difference between avalon and xaml namespaces, event handlers, inline code and code behind, markup extensions
    • Demo of image flipper (using 3d to cut picture in half and fold it down)
    • Demo of media mania (3d cd case, data from web services, slider to choose different data templates, 3d rendering of cd cases)
    • Discussed action items...where to download builds, schedule, how to give feedback

    I'll be posting a list of questions that I got and answers that I gave...I'll add those as comments in this post or as separate posts if it warrants it.

    Lots of interesting questions today.  Interesting people to talk with.

    If you attended, please talk to me at the conference or drop me a line (contact feature of my blog)...I'd love to hear what you thought.

    Thanks, Rob

    Update: tagging this post so that it gets picked up by XTech
  • Avalon Element Services PM is now blogging

    Nick, a program manager on Avalon who runs the Element Services team, has been active on the avalon newsgroups, and now has a blog.
    In his first post, he discusses naming guidlines for Event, Properties, and Commands.

    A few additional notes about Markup Extensions.

    1) They are patterned after CLR attributes
    a) Suffix optional:  FooAttribute is used as [Foo(...)], just like StaticResourceExtension is used as {StaticResource resourceName}
    b) Positional Arguments: just like clr attributes, you can have a number of unnamed arguments.  we map this to the constructor with the same number of parameters.
        {StaticResource resourceName}
    c) Named Arguments: you can name arguments
        {Binding ElementID=Button1}

    One correction, Markup Extensions don't need to be suffixed by "Extension".  Just like CLR Attributes, that is optional.  Markup Extensions must subclass MarkupExtension, just like Clr Attributes must subclass Attribute.

  • Exe naming strategies

    An internal thread asked for advice on naming of Exes.

    This is a pet peeve of mine.

    Windows Task Manager should do a better job of showing more than just the file name to describe a process.
    Developers should name their assemblies more descriptively.
    Guidelines that I proposed for naming Exes:

    1)       don’t limit yourself to 8.3
    2)       do choose a descriptive name
    3)       do consider scenarios the app is used.  Used from command line, etc…
    4)       do use other attributes on the assembly to give more detail.



  • Avalon Application Talk

    Lauren Lavoie, an Avalon Program Manager, writes about Avalon's Application Model and other Avalon topics.

    Like her url...should i have a url for my blog...i've considered it for a while...(these new google ads on the right made me start thinking more about that recently...)

  • Treeview example for Avalon

    Kevin Moore, an Avalon Program Manager, posted an example of a Treeview control written for Avalon.

    Great to see so many PMs on our team blogging.

  • Avalon Layout and Flow Documents

    Just waking up from a few months of limited blog-reading...

    Fil Fortes, another Program Manager on the Avalon team, has been doing some interesting posts on Layout and FlowDocuments.

  • 3 Coding Styles for Avalon Applications

    Filed under: ,

    There are 3 coding styles developers could use to build Avalon applications:

    1.      Code Only

    2.      Code + Markup (Runtime use of XamlReader)

    3.      Code + Markup (Markup compiled)***


    *** - Microsoft Development tools will recommend this style.


    Coding Style 1: Code Only Application

    Any CLR compatible language can write a code only application.


    Example in C#:

    1) Create Program.cs

    using System;

    using System.Windows;

    using System.Windows.Controls;

    using System.Windows.Markup;

    using System.IO;


    namespace CodingStyles


        public class CodeOnlyWindow : Window



            static void Main(string[] args)


                Application app = new Application();

                new CodeOnlyWindow().Show();




            Button button1;


            public CodeOnlyWindow()


                StackPanel sp = new StackPanel();

                button1 = new Button();

                button1.Content = "Hello";


                button1.Click += new RoutedEventHandler(button1_Click);

                this.Content = sp;

                this.Width = this.Height = 285;

                this.Left = this.Top = 100;

                this.Text = "Code Only Window";



            void button1_Click(object sender, RoutedEventArgs e)


                button1.Content = "Clicked";






    2) Compile that with the c# compiler like this:

    csc /out:CodingStyle1.exe Program.cs /lib:c:\Program Files\Reference Assemblies\Microsoft\WinFx\v3.0 /r:PresentationFramework.dll;PresentationCore.dll;WindowsBase.dll;UIAutomationTypes.dll


    3) Run CodingStyle1.exe


    Coding Style 2: Code + Markup (Runtime use of Xaml Parser)

    Some developers will want a code only application, but will still want to use some xaml.  These developers can call the parser to load xaml at runtime. 

    Any CLR compatible language will be able to do this.


    Example in C#:
    1) Create Program.cs

    using System;

    using System.Windows;

    using System.Windows.Controls;

    using System.Windows.Markup;

    using System.IO;


    namespace CodingStyles


        public class CodePlusRuntimeParsingWindow: Window



            static void Main(string[] args)


                Application app = new Application();

                new CodePlusRuntimeParsingWindow ().Show();




            Button button2;



            public CodePlusRuntimeParsingWindow()


                //Load file1.xaml

                StreamReader sr = new StreamReader("file1.xaml");

                DependencyObject rootElement =

                    XamlReader.Load(sr.BaseStream) as DependencyObject;


                //Find element with ID of Button2

                button2 = LogicalTreeHelper.FindLogicalNode(rootElement, "button2")

                   as Button;


                //Wire up event

                button2.Click += new RoutedEventHandler(button2_Click);


                this.Content = rootElement;

                this.Text = "Code Plus Runtime Parsing Window";



            void button2_Click(object sender, RoutedEventArgs e)


                button2.Content = "Clicked";






    2) Create File1.xaml

    <StackPanel xmlns="">

          <Button ID="button2">HelloButton>



    Compile that with the c# compiler like this:

    3) csc /out:CodingStyle2.exe Program.cs /lib::\Program Files\Reference Assemblies\Microsoft\WinFx\v3.0 /r:PresentationFramework.dll;PresentationCore.dll;WindowsBase.dll;UIAutomationTypes.dll


    4) Run CodingStyle2.exe  (it should work identically to CodingStyle1.exe)



    Coding Style 3: Code + Markup (Markup compiled)

    A subset of CLR compatible languages will support this mode.

    A language must have a CodeDom provider and provide msbuild target files for their language.


    Microsoft languages that meet this criteria today are C#, Visual Basic and J#.  (J# has a few blocking bugs in currently available CTPs though).

    I'm aware of at least two other language vendors who will be able to match this level of support in the near future.


    More details about MarkupCompilation are in a blog post I did last year:  


    1) Use Visual Studio – File/New Project/Avalon Application – call it CodingStyle3

    2) Change Window1.xaml to look like this

    <Window x:Class="CodingStyle3.Window1"






                <Button Name="button1" Click="Button1_Click">HelloButton>




    3) Change Window1.xaml.cs to look like this

    using System;

    using System.Windows;

    using System.Windows.Controls;

    using System.Windows.Data;

    using System.Windows.Documents;

    using System.Windows.Media;

    using System.Windows.Shapes;



    namespace CodingStyle3



        /// Interaction logic for Window1.xaml



        public partial class Window1 : Window


            public Window1()





            private void button1_Click(object sender, RoutedEventArgs e)


                button1.Content = "Clicked";






    4) Build and Run the application in VS  (it should work identically to CodingStyle1.exe and CodingStyle2.exe)


    Benefits of Coding Style 3: Markup Compilation

    Markup compilation provides the following benefits:

    ·         Xaml code is used as the element tree definition language giving many tools (form designers, timeline editors, vector graphics editors, 3d modelers, etc…) the opportunity to collaborate. (this is a benefit for coding style 2 & 3)

    ·         ID Lookup is automatic.  Event handlers can refer to an element by ID instead of having to call LogicalTreeHelper.FindLogicalNode like CodingStyle2 does.

    ·         Event Wiring is automatic.  Coding style 1 & 2 both needed to attach an event handler to the click event of the button.

    ·         Xaml code is compiled into a binary form.  Loading via the binary form is faster than parsing xml at runtime.



    [3/27/2006 - updated to make sure object model and markup is up to date for Feb 2006 CTP.]

  • Audio/Videos online...haven't they heard of Tivo?

    Filed under:

    Mike Swanson has pointed towards a presentation that Karsten did at Flash Forward.

    I just started watching it...good talk.  I'm intrested to see how Karsten talked to designers...nice job so far...i'm 9minutes into it.


    Videos Should be Downloadable
    This made me think about streaming Audio/Video.

    Streaming is more conventient than can get it anytime, but you should be able to download most streams by default.

    If a publisher wants something to be live only or streaming only...they should be able to.


    Windows Media Player should make that happen!

    Update: To clarify my request... I'm about to drive to work...and would love to listen to the audio on the way.  We should make that easier for people to do...
    Update2: Ok, just for the heck of it, I tried to press play on my paused video on the way to work...  It worked!  WMP did most of what I wanted.  It proactively cached the whole download.  It doesn't let me save it to a file...and it didn't really make it easy for me to discover the fact that it was cached...but i'm happier than i was this morning...  thanks wmp team!

  • FAQ: Why doesn't Avalon/Indigo March CTP work with VS Beta2

    Filed under: ,

    Stevey asked a FAQ about why Avalon March CTP doesn't work with VS 2005 beta2.  I'll explain why here.

    First of all there are 3 players in this story.

    1. .Net Framework 2.0
    2. Avalon
    3. Visual Studio

    Avalon & VS have dependencies on .NET Framework
    Avalon's assemblies (PresentationFramework.dll, PresentationCore.dll, etc...) are compiled against a specific build of the .net framework.  A specific build of Avalon will only work with the build of the .net framework that it was compiled against.

    Same goes for Visual requires a specific build of .Net Framework.

    Different Schedules
    The .Net Framework team and the Visual Studio team is on one ship schedule -- shipping .Net Framework 2.0 and VS 2005 this year.

    The Avalon and Indigo teams are on another ship schedule, shipping in 2006.

    Avalon and Indigo pick up periodic builds of the .Net Framework 2.0 every couple of months.  While .Net Framework 2.0 is being developed, there are many breaking changes between builds that we pick up, so this process takes work from several people on our team.  Scheduling when this happens depends on when a partner drop is done by the .Net team and when a non-disruptive time for the Avalon team to pick up the build is.

    Now that Avalon and Indigo are shipping CTPs together, we both need to coordinate which build of .Net Framework 2.0 we work on.

    Which Build Goes With Which Build

    Here is a brief table that shows build numbers for each of the WinFX CTPs.

    Avalon & Indigo
    CTP Releases

    Required .Net Framework Version

    Required Visual Studio Version

    November 2004


    Beta 1 (8.0.40607)

    March 2005


    Feb CTP

    May 2005 - Beta 1 RC


    Beta 2

    Updated: build of Avalon/Indigo is out now in May...

     How to figure out which build of the .Net Framework 2.0 you have installed:

    Look in c:\windows\\framework for a folder that starts with "v2.0." 

    That folder name is the build of the .Net Framework you have installed on you machine.


    Only one build of .Net Framework 2.0 can be installed at a time

    It is not possible to have v2.0.50110 and v2.0.50215 at the same time.

    Because of that it is not possible to have an Avalon/Indigo CTP that requires one .Net Framework build and a Visual Studio build that requires another.

    Note: It is possible to have .NetFramework 1.0, 1.1, and 2.0 installed on the machine at one time.  It is also possible to install VS 2003 and VS 2005 on the same machine.

    The Quick Summary

    If you are focused on Avalon development, don't jump the gun and upgrade your Avalon development machine to the latest VS CTP unless a new Avalon and Indigo CTP has been released.


    I'll modify this post based on your feedback/questions…let me know what isn't clear.

    Update: clarified many places where I said ".Net Framework" to ".Net Framework 2.0".  Added the note about being able to install 1.0, 1.1, and 2.0 at the same time.

  • Issues/Suggestions for November Avalon CTP's VS2005 Add-ons ('Fidalgo')

    Filed under: ,
    When you installed the WinFX SDK with the November CTP, one of the things that is installed is a set of add-ons to Visual Studio 2005 (code named “Whidbey“). Internally, we call these add-ons "Fidalgo". I'll describe what those involve and ask you for feedback and suggestions.

    What else needs to be installed?
    In order to use these add-ons, you need to have installed:

    • Visual Studio 2005 (or one of the Express skus) and DotNetFx 2.0 (these versions must match the version that Avalon was built against!)
    • Avalon (avalon.msi)
    • WinFX SDK - installs offline versions of documentation, a command line prompt with appropriate environment variables set, many tools and the Fidalgo add-ons (this step must be done after the Visual Studio install).

    What Add-ons Get Installed
    Visual Studio Project + Item Templates, Avalon/XAML schemas, registry settings, IntelliSense helper files

    Project Templates
    When you choose File/New Project in Visual Studio 2005, Fidalgo has added the following choices:

    Avalon Application
    Description: Build an application with a typical (non-navigation based) window as the main window.
    Primary Files:

    • MyApp.xaml - Defaults to declare Application object used in your application. Setting is a common use for MyApp.xaml in this and other projects.
    • MyApp.xaml.cs/.vb - Can add new code to your application object
    • Window1.xaml - Defines a "Window" which defaults to be the main window of the application.
    • Window1.xaml.cs/.vb - Add event handling code and other functionality to the window.
    Project File Details: .csproj, .vbproj file has typical settings.

    Avalon Navigation Application
    Description: Build an application with a navigation based window as the main window.
    Primary Files:

    • MyApp.xaml - Declares NavigationApplication settings for this application. NavigationApplication is a subclass of Application and provides application wide navigation events and a general property storage mechanism that all Pages can use.
    • MyApp.xaml.cs/.vb - Can add new code to your application object
    • Page1.xaml - Defines a "Page" which can be navigated inside of a NavigationWindow or .
    • Page1.xaml.cs/.vb - Add event handling code and other functionality to the page.

    Project Details: .csproj, .vbproj file has typical settings.

    Avalon Browser Application
    Description: Build a navigation based application to be hosted in Internet Explorer.
    Primary Files:

    • MyApp.xaml - Declares NavigationApplication settings for this application. NavigationApplication is a subclass of Application and provides application wide navigation events and a general property storage mechanism that all Pages can use.
    • MyApp.xaml.cs/.vb - Can add new code to your application object
    • Page1.xaml - Defines a "Page" which can be navigated inside of a NavigationWindow or .
    • Page1.xaml.cs/.vb - Add event handling code and other functionality to the page.

    Project File Details: .csproj, .vbproj file has True setting* (see readme.txt in this project)

    Avalon Control Library
    Description: Builds a "library" project with a code file in it.
    Primary Files:

    • CustomControl1.cs/.vb - simple class definition that subclasses Control by default.

    Project Details: .csproj, .vbproj file has set library as opposed to winexe for the other 3 project templates.

    Item Templates

    Avalon Window
    Description: Defines a window. Windows can be shown.
    Primary Files:

    • Window1.xaml - Defines a "Window".
    • Window1.xaml.cs/.vb - Add event handling code and other functionality to the window.

    To Use: To show this window, instantiate the window and then call show.

    Window1 win1 = new Window1();

    Avalon Page
    Description: Defines a "Page". Pages can be navigated to.
    Primary Files:

    • Page1.xaml - Adds a "Page" to your project.
    • Page1.xaml.cs/.vb - Add event handling code and other functionality to the page.
    Use 1 - Declare a in a Window or Page:
    Use 2 - Navigate to it with a hyperlink from another Page
    Goto page1
    Use 3 - Navigate programmatically
    (won't go into these details yet…)

    Avalon PageFunction
    Description: Adds a "PageFunction" to your project. PageFunctions can be navigated programmatically, and always return an answer. (Thus the "function" in the name).
    Primary Files:

    • PageFunction1.xaml - Defines a "PageFunction". PageFunction is a generic type. x:TypeArguments is the attribute to set to define the return type of the PageFunction.
    • Page1.xaml.cs/.vb - Add event handling code and other functionality to the page function.

    To Use: You must navigate programmatically to page functions because you need to wire an event handler so you can get the return value.

    Avalon Custom Control
    Description: Adds a custom control to your project.
    Primary Files:

    • CustomControl1.cs/.vb - simple class definition that subclasses Control by default.

    Update: Updated several filenames in the text above of Window1.cs/.vb to Window1.xaml.cs/.vb -- the code behind file for foo.xaml would be foo.xaml.cs or foo.xaml.vb

    Visual Studio's New Template Format
    November CTP was the first time we used the new zip-file based structure for these templates. The new template model is a big improvement over the jscript-based templating system of before.
    One of the goals that the Visual Studio team has, is to allow customers to build and share their own templates. Perhaps we'll try shipping a new template in the next few months to try out this "community" model for templates.

    Avalon + XAML Schema Files
    The XML Editor in Visual Studio uses XSD schema files to provide Intellisense support for many XML formats. If you are editing an xml format and want a better experience, you can put an .xsd file in \program files\microsoft visual studio 8\xml\schemas\

    • Fidalgo installs Avalon*.xsd and Xaml*.xsd into this directory.
    • Avalon*.xsd provides a schema that describes how to use and all the elements & objects that it supports.
    • Xaml*.xsd provides a schema that describes how to use attributes and elements from the "xaml" namespace (which in November has a uri of "Definition")

    XSD Schema doesn't do a great job on XAML intellisense…but it is better that typing blind! The danger is that the schema isn't perfect. It complains about some syntaxes that are perfectly valid (according to the XAML loader and XAML compiler.) It also suggests some syntaxes which won't compile.

    I'll blog more about this in the future…and I've also done some in the past.

    Note1: F1 help doesn't work in the November release from the XML Editor. Help content needs to be tagged with the same keywords that the XML Editor sends to the help system (based on what text you have selected). We weren't coordinated enough to get this to work in November.

    Note2: Occasionally, Visual Studio doesn't recognize that the XAML file is an XML file. Instead it is opened in a typical text editor with no color coding, no intellisense, etc... To workaround, right click a xaml file in the solution explorer and select open with.

    Registry Settings to Tell MSBuild how to treat several File Types
    Currently, we need to tell MSBuild that a XAML file should default to a in the .csproj or .vbproj when you add one to a project. We set values for the following file extensions:

    • .xaml -
    • .xml -
    • .bmp, .gif, .jpg, .jpeg, .png -
    • .ttc, .ttf, .otf -
    • .compositefont -

    We set the keys for Visual Basic & C# under the following 2 keys (don't know offhand which is which…gotta love guids!)

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\FileExtensions
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{F184B08F-C81C-45F6-A57F-5ABD9991F28F}\FileExtensions

    Registry Settings to Tell MSBuild/VS where to look for References
    We also set the following key:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\AssemblyFolders\WindowsClient to %windir%\\windows\v6.0.4030

    This tells MsBuild & Visual Studio that it should add that path into the search path for referenced assemblies.

    PresentationFramework.Xml, etc... files in v6.0.4030 directory
    These files provide extra information when you are using the C# or VB code editor.

    FYI - when you are code editing

    1. When you add an element with an ID property set, you can refer to it from your code-behind using that name.
    2. In the November build, you must build your project after you add the ID before intellisense works on that ID in your code.

    What Language support is important to you?
    In November, Fidalgo included C# and Visual Basic support. What languages would you like to see next?

    Language owners - I'd love to help you build support for your language…please contact me if you are interested. (click the contact link on this page.)

    Supporting All the Visual Studio SKUs
    For November, MSDN members can use Visual Studio's Beta 1 CTP. Everybody else must limit themselves to one of the Express versions. Unfortunately, in November, we didn't support the Express SKUs with our setup by default. I had posted how to get November's Fidalgo working with the Visual C# Express and Visual Basic Express. (Update: also, in the January re-release of the November bits, we provided a batch file which fixed this for you.)

    In our next release, it looks like we'll be able to make this work by default. However, you will still need to install your favorite Visual Studio flavor, and then the WinFX SDK! Order matters.

    Should this be installed with the WinFX SDK?
    Today, and for at least the next release, this is being installed with the WinFX SDK. Long term, I don't believe that Fidalgo should be installed in the SDK. Until Orcas comes out, we should have a separate install for these add-ons. I believe the WinFX SDK should not have tool support for Microsoft's development tool (Visual Studio) built into it. The SDK should limit itself to things that would be useful to developers regardless of their tool choice.

    Given all that, how can this improve?
    We understand that you all want us to provide a Visual Designer. Yes, we understand that...
    What else can we do to what I describe above or in addition to that to improve our Developer Experience for you inside of Visual Studio?

    Thanks, Rob

  • This is the kind of feedback I love: The Good, The Bad, The Ugly

    Filed under: ,

    Rod Paddock has begun working with Avalon.  He posted a summary of his experiences: Avalon Adventures: The Good, The Bad, The Ugly

    Many people on the Avalon team will read this kind of feedback, enjoy the good things and focus on the bad and the ugly.

    A few comments on his feedback:

    The Bad

    Documentation/Broken Samples/Not many VB samples - I'll pass that information along.  Having specific examples of what didn't work, what is missing, etc... helps us fix those things and figure out how to prevent it from happening again.

    a) listboxes don't surface double click correctly - we'll investigate
    b) some events are too granular - we'll discuss
    c) vb compiler doesn't support the handles command - this is a known issue that i was discussing with the vb team last month.  We haven't solved it yet...just booked the follow up meeting.  Markup compilation makes this difficult because the markup compiler uses CodeDom to create the .g.vb file that defines the fields for all elements with IDs.  Unfortunately, there is no way using codedom to create the field “with events”.

    The Ugly

    Grid Control - I'm not sure where our team is on this.  I'll pass that feedback along.

    Dev Tools - Yes, clearly xaml editing and code editing only in VS, while better than notepad, still is nowhere near enough tool support.  Yes, we realize this is a big issue.


    I'd encourage all developers to maintain a list like this...send it to us, blog it, post it to the newsgroup.  We love to hear your feedback.

    Rob & the Avalon Team

  • Beta1 VisualStudio perf problems after compiling Avalon projects

    Filed under:

    I think I wrote details about this recently, but I can't find it (was it in the newsgroups?  a comment on somebody's blog?  an internal email?)  ...from now on, I'll put more things like this in my blog, so I can write it once...and find it.

    The question came up from Brandon this time:

    This may be a VS bug, but it only happens with Avalon applications. When I run an Avalon application in debug mode from VS I get 99% CPU usage AFTER I stop debugging. This doesnt go away until I close Visual Studio.


    The beta1 version of Visual Studio Whidbey's C# language service had problems if you tried to give it a .cs file to compile that didn't have an ID.  Unfortunately, that is what happens with Avalon projects.  You start with 1 or more .xaml files and they create a .baml and .g.cs file.  See MarkupCompilation: XAML, BAML, .g.cs Details if you want to learn more.

    So, this problem only occurs when you do one of the following:

    • build a project for the first time.
    • build a project after “cleaning” it.
    • build a project after adding any new XAML pages to it.


    We found this problem before we shipped the November 2004 Avalon CTP.  We got a special build of cslangsvc.dll from the C# team that fixed this problem and had the WinFX SDK team install it with the SDK.

    So, if you installed the WinFX SDK after you installed VisualStudio, you should have a .51 version of cslangsvc.dll that will make the problem go away.

    UPDATE: Chris Sells said that didn't work for him.  Turns out he has a 40607.85 build of VS installed...yes beta1, but I think it came with Yukon.  It appears like the .51 patch doesn't install on top of that build.  Lars had already worked with some VS folks to learn of another solution: In HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\CSharp\Options\Editor change the data of value UpdateRegisterDesignViewOnIdle from 1 to 0... we're not exactly sure how the two fixes relate...but looks like one or the other should fix it...let me know if not.

    Other lame workaround:

    File/Close Solution, then reopen the solution.  Do this whenever you get into the bad state.

    A measure of Visual Studio “Whidbey“ progress

    If you measure the Visual Studio team's progress by how many Visual Studio “Whidbey” assemblies we need to patch, they are doing very well.  For PDC 2003, they patched about 10 assemblies to make sure msbuild worked inside of Visual Studio for us.  For Avalon CTP Nov 2004, we only had to patch this one assembly.  Hopefully, next release we get to 0!

  • Funny theory predicting the failure of C#

    Filed under:

    Funny post predicting failure/success of languages based on photos... [via Stéphane Rodriguez]

  • MsBuild and Avalon

    Filed under:

    If you peek under the covers in a .csproj or .vbproj of an Avalon project, you'll be looking at the msbuild project file format.  The Avalon team has gone through a long journey with our markup compilation, but I'm happy about where we have arrived.

    First, a long time ago (~3 years ago?) we started by building AMC.exe - Avalon markup compiler.  It would take a .xaml file and create a .g.cs or .g.vb file.

    Soon, we realized we really needed to own more of the build process, so we built AC.exe - Avalon compiler.  It not only did markup compilation, but it also called CSC, VBC, etc... but we had to hardcode support for each language in there.

    Eventually, we found out about MsBuild (then under a code name) and realized that we didn't need to own the whole build process to add value.  We could refactor much of what we did in AC.exe into some build Tasks that did markup compilation, etc...

    That is where we are now.  In every project file, you'll notice an:

    <Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />

    That is the targets file where we say: during build, markup compilation should come before code compilation, etc...

    The MsBuild team has done a great job with their project!


    I just thought to blog this because of JeffCal's recent blog that has several excellent pointers:

    “there's an msbuild wiki over at channel 9, and there's a good preview of the msbuild documentation over at msdn:


     Go check out the wiki, docs, and read blogs of JeffCal and Alex Kipman to learn more about msbuild.


    Let me know if you have any questions about Avalon's use of msbuild...

  • Why isn't xmlns:def="Definition" gone yet...cost of change...

    Filed under: , ,

    Drew Marsh asked a good question recently about why we didn't Uri-ize the Definition xmlns yet...  I answered via a comment here.

    Keep raising issues that you don't see getting fixed...

    Thanks, Rob

    PS.  Making any breaking change is way too expensive.  We are working on a tool right now that can make any object model name change for xaml.  We're also getting it to work with C#.  If things work well, perhaps we'll have a tool in the future to help our developers make changes and all the customers building on top of us may get some of their code changed automatically...Won't be perfect, but may get people a long way.

    I look at it as a delayed refactoring tool.  Love the VS Whidbey refactoring stuff for your local project...but when you have hundreds or thousands or more people building on top of you, the refactoring features don't do anything to delay the refactoring.

« First ... < Previous 3 4 5 6 7 Next > ... Last »