Jason Nadal

Restless C#ding

My Links


Listed on BlogShares

Other Pages

Post Categories

Article Categories


Blog Stats

Main Reading

Manually Compile your XAML into BAML

For those of you who are hardcore console compilers, here's how you can manually compile your BAML partial classes, using the Windows Application Compiler:

The file, ac.exe, can be found in the %installdrive%:\WINDOWS\Microsoft.NET\Avalon directory. You can either apecify the project (*.lhproj) file or XAML. If you choose XAML, you can specify whether to compile to full code (instead of BAML) using the -code directive, all XAML files in the directory (the -dir ), or perhaps the strangest, Create a combined source file only  (No IL), using the -so directive.

Update - from the comments, Rob Relyea writes that ac.exe is obselete, and XamlC.exe (available at the LHSDK prompt) should be used instead.  Thanks for the correction!

Update2 - Rob Relyea posts more on why to compile your XAML, when you don't have to compile, and what you need to have in order to do so here.

posted on Monday, November 17, 2003 9:08 PM


# re: Manually Compile your XAML into BAML 11/18/2003 5:05 AM Rob Relyea [MSFT]

Don't use AC.exe! That is obsolete.
As Chris has written, we did a major rearchitecture, AC.exe is part of the old architecture.

What you should use is XamlC.exe (which is currently installed with the LHSDK). When you run the Longhorn SDK Command Prompt - it will be in the path.

# re: Manually Compile your XAML into BAML 4/7/2004 11:42 PM Henry Erich III

So, the only way to properly compile is to use xamlc and not ac. Which also would mean I have to get the SDK and couldnt complile with just a LH install?

# re: Manually Compile your XAML into BAML 4/8/2004 9:20 AM Jason

To use precompiled XAML, yes, however there is a runtime environment built into Longhorn that runs non-compiled XAML.

# re: Manually Compile your XAML into BAML 4/8/2004 7:36 PM Rob Relyea [msft]

We want to get to a model that will allow building in LH without the sdk having to be installed.

Here is what works now:
1) Msbuild.exe is shipping with LH, becuase the .net redist is part of LH.

Here are problems now:
1) set lapi=c:\windows\microsoft.net\windows\v6.0.4030
2) resgen.exe and al.exe need to be installed currently...i forget the path we are looking for it (perhaps %sdktoolpath% ????)

# Today you can't compile xaml on the fly. 4/8/2004 7:37 PM Rob Relyea

# re: Manually Compile your XAML into BAML 4/9/2004 11:02 AM Henry Erich III

Ok, last night I put on the SDK (finally) and compiled a simple XAML with xamlc.exe. Awesome! I cant wait to do more!

Privacy | Terms of use