Search code examples
wpfnantbaml

How can I use NAnt to compile WPF controls


I have a WPF project and I'm trying to setup a NAnt build script for it. The problem is that when it tries to compile the WPF controls, the .g.cs files are not being generated as they are when building from within Visual Studio. I'm using the csc build task.

From my reading it seems that when Visual Studio builds, it performs a pre-build step that generates the .g.cs files. Is it possible to do this via NAnt?

I found this post about WPF, .g.cs and baml: http://stuff.seans.com/2008/07/13/hello-wpf-world-part-2-why-xaml/

Any ideas?


Solution

  • You might want to try using the msbuild task