James Johnston wrote:
> It seems that the AssemblyInfoTask (asminfo) is very inflexible in that
> you are fixed to using the VB/C# code DOMs.  I would like to use it with
> the new CppCodeProvider in .NET 2.0 for generating C++ code, and I'm
> sure there are other code generators out there that people would also
> like to use.
>
> Has any work been done to add this sort of feature to AssemblyInfoTask?
> The current "Language" property is a simple enumeration.  I'm thinking
> that in addition to that property, there should be a "CodeProviderType"
> property that contains the full type name so one can use any arbitrary
> code generator.  E.g. one could set it to
> "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=8.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".  I think the answer
> is not to simply add "C++" to the CodeLanguage enumeration, because
> there are three different C++ code generators:  MCppCodeProvider (for
> v1.1), CppCodeProvider (for v2.0), and CppCodeProvider7 (also comes with
> VC++ 8.0).  And there are likely code DOMs for other languages too.
>   
Do the three code providers generate different C++ output for the same 
input? 

I ask because going to the trouble of using the DOM in the first place 
seems like overkill for the little bit that asminfo needs to know 
about.  It's not as though the syntax of an attribute or import is all 
that complex.  And most projects only really need the version and 
configuration information, which are the things that change every 
build.  Most other information is better placed in a static file, so 
that developers can work with it without having to learn NAnt or the 
build system.  The one value I see for having NAnt generate relatively 
static assembly information is when the same information needs to be 
shared by multiple languages.

If this were driven by text templates instead of a DOM, it wouldn't be 
as powerful but it would be both simpler and easier to extend to 
languages that don't have a DOM at all.  We used to just do this 
manually, writing text to a file from the NAnt script.  My many reason 
for changing it is that it makes the NAnt build file cleaner, not that 
it gave us anything that couldn't be done relatively easy some other way.

Of course, what's done is done and I wouldn't expect it to change.  But 
my original question remains:  If the C++ providers are going to 
generate the same syntax, then does it matter which one gets used?

Gary
> If there is interest for this enhancement, I would just as soon make the
> changes myself and submit a changeset - I don't think it would be very
> hard to add a feature like this.
>
> Best regards,
>
> James Johnston
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
>
>   



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to