How can I use NAnt to compile WPF controls
Tagged:
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? Thanks in advance.
Answer 1
Scores:0
You might want to try using the msbuild task
Is there some way to compile (with the CSC task) a WPF Application with NAnt except for using the <msbuild> task from the NantContrib?
...
I had to rebuild a project in my application.
I created a new project, created each file, and copied the contents of each file into the new project one at a time making all the necessary changes.
Now when I try to compile the project, it gives me three errors:
The metafile c:\projects\project1\CustomerModule\bin\Debug\CustomerModule.dll ...
I am working on a prototype project and need to put a new layer of abstraction over my existing NAnt scripts, for which I'd like to use .Net, possibly even WPF.
What I have at present is a NAnt script which I call from a Command window (a DOS box, for ...
Certain markup extensions raise compile errors. For example StaticExtension (x:Static) raises a compile error if the referenced class cannot be found. Anyone know the mechanism for this? Is it baked into the XAML compiler or is such functionaility available to custom markup extensions?
EDIT: mfeingold below suggested that I need to ...
I've created a Codeplex site for an app I'm building and right now I just right click the entire solution folder Visual C# Express created for me, and used that.
Now in my repo I have a lot files that I'm assuming will enable the user to compile my application on ...
EDIT: Apparently I was a little confusing. The original post will remain below, but the main thing I'm asking is if there is a way to make a textblock on a usercontrol static, so that when I try to set it's value with a static method, it doesn't whine and ...
When I set the output type to Class Library, VS complains about stuff like how I don't have InitializeComponent, etc.
Winforms doesn't complain like this.
How to fix this?
...
Hi I use SQL Compact DB in WPF Project. My project hase this folder structure:
Project_name
DB_file
bin
debug
release
Connection string has this format
string connStr="DB_file";
If I debug WPF app in Visual Studio it also create copy of DB file in debug or release folder.
I would like use only the one DB file, how ...
I have a complex control for Silverlight, and I need to have the same functionality in WPF. Any way to share the codebase?
...
I am trying to compile AvalonEdit for Silverlight, but I am not sure how to do it as I never worked with Silverlight, only WPF.
I tried to add this control to my Silverlight application but Visual Studio complained that the assembly wasn't compiled against Silverlight.
I thought it was ...