I received an email from Tomas Restrepo regarding my NAnt TaskDefTask post earlier today. Here's what he had to say:
Hi Drew!
Regarding NAnt's TaskDef:
It _is_ implemented. Unfortunately, it was removed last week by Scott Hernandez (one of the project's admin) and moved into NantContrib. One of the reasons for this is that we're trying to move to a more robust configuration system that will replace taskdef, but unfortunately, this is not done yet (it's actually still in discussion, so don't expect it soon!).
For now, the simplest workarounds are a) using NAntContrib (you'll need to grab the latest code from cvs, rebuild it, and drop it into your nant dir), or simply drop your assembly with the task definitions into the same directory as your NAnt.Core.Dll assembly, where it will be automatically picked up by nant.
Aha! Well that explains why I couldn't find it. ;) So I guess I'll have to look into the NAntContrib project now. Thanks Tomas!
C# Printing Functions. In .NET, simple printing is simple, but functions such as choosing which printer to use or printing more than one copy are more complex. This tutorial shows how to use System.Drawing.Printing for these functions. [O'Reilly Network Articles] via [Sam Gentile's Radio Weblog]
They titled it "C# Printing Functions", but that really makes me cringe. It's really got nothing to do with C# specifically, other than the fact that that's the language the author chose to write their examples in. Other than that, it's a great article that covers the System.Drawing.Printing namespace quite well.
Gen
This is good news! I wonder if it would be worth taking the time to integrate the features directly with VS.NET. I'm sure to get the type of support the custom editor provides we'll need VSIP support though. :(
While I was working on .NETUnit NAnt integration components I noticed that NAnt didn't actually have support for the taskdef task. It's strange because the ChangeLog reported taskdef support in 0.1.5, but nowhere in the code did I see support for it. Anyway, I reported the bug and supplied an implementation that I hope they will integrate in the next release.
Yesterday I spent some time writing a task for NAnt which executes .NETUnit tests. I haven't uploaded the source or installer it to the project site yet, but it should be there shortly. It includes the ability to build and execute a suite of: all the test fixtures in a specified assembly, individual test fixtures and even a individual test methods.
There is one thing I'm not completely clear on, but hopefully they won't be a problem. Being that NAnt uses the GPL, so will the integration library. However, .NETUnit uses the LGPL. The question I have is:
If my code, which leverages/extends the GPLd code, uses other libraries, do those libraries themselves need to be GPL also?
Now, I discussed this briefly with Brad Wilson and he indicated that this is one of the fuzzy parts of the GPL that nobody seems to agree on. I think not, but I would like a definitive answer.
System.Xml.XmlDocument and DTD's (Continued). A reader dropped me a note to point out that my solution to XmlDocument loading up DTDs was sub-optimal, noting that if the DTD defines any entities and they are used in the document then the document will fail to load. Now this leaves me in a bit of trouble. I want to load and manipulate an XHTML 1.1 document using System.Xml.XmlDocument, but can't because .Net chokes on the 1.1 DTD. I suppose I could download, fix, merge and pre-feed all the XHTML 1.1 DTD's before I load my document which I could modify to only have half a doc-type, though I'm sure that has other consequences. On the other hand, I could just find and pre-feed all the entities defined for XHTML 1.1 and still use my XmlResolver = null hack. [BitWorking]
Your reader has a great point. You definitely want the DTD loaded. The problem that I'm seeing is not that there's an actual error parsing the XHTML 1.1 DTD, but rather that one of the modules it attempts include does not exist. The XHTML 1.1 DTD is attempting to include "-//W3C//ENTITIES XHTML 1.1 Document Model 1.0//EN" from http://www.w3.org/TR/xhtml-modularization/DTD/xhtml11-model-1.mod, but as you can see by clicking on that URL it does not exist.
Now, as a solution, if the URL is just wrong and you figure out the right URL, then you can bring the XHTML 1.1 DTD local, patch it and then create a custom XmlResolver that intercepts requests for the standard XHTML 1.1 DTD URL and redirect them to your local copy. Ultimately though, from what I can tell, there's obviously a problem with the W3 definitions of the modules.