[nant-dev] csc for net-1.0 and net-1.1 fails if keyfile attribute is specified - patch attached

2005-11-16 Thread Brar Piening
Testcase:

?xml version=1.0 encoding=utf-8 ?
project name=Testcase default=buildall
property name=frameworks value=net-1.0,net-1.1,mono-1.0,net-2.0/

target name=build
csc target=library output=Testcase.dll keyfile=anyvalid.snk
sources
include name=anyvalid.cs/
/sources
/csc
/target

target name=buildall
foreach item=String in=${frameworks} delim=,
property=framework
if test=${framework::exists(framework)}
property name=nant.settings.currentframework
value=${framework} /
call target=build /
/if
/foreach
/target

/project


You might also want to add 'supportskeyfile' to the beta versions of
.Net 2.0  in the App.config - I can't check this here.
Regards,
Brar Piening

diff -r nant-0.85-nightly-2005-11-13/src/NAnt.Console/App.config 
nant-0.85-nightly-2005-11-13_changed/src/NAnt.Console/App.config
352a353
 attribute name=supportskeyfiletrue/attribute
358a360
 attribute name=supportskeyfiletrue/attribute
diff -r nant-0.85-nightly-2005-11-13/src/NAnt.DotNet/Tasks/CompilerBase.cs 
nant-0.85-nightly-2005-11-13_changed/src/NAnt.DotNet/Tasks/CompilerBase.cs
69a70
 private bool _supportsKeyFile;
399a401,411
 /// summary
 /// Indicates whether the compiler for a given target framework 
 supports
 /// a command line option that allows the specification of a keyfile. 
 /// The default is see langword=false /.
 /// /summary
 [FrameworkConfigurable(supportskeyfile)]
 public virtual bool SupportsKeyFile {
 get { return _supportsKeyFile; }
 set { _supportsKeyFile = value; }
 }
 
515c527
 if (KeyFile != null) {
---
 if (KeyFile != null  SupportsKeyFile) {
1086c1098
 if (KeyFile != null) {
---
 if (KeyFile != null  SupportsKeyFile) {


Re: [nant-dev] DataSetGenerator

2005-02-15 Thread Brar Piening
Hi Martin,
I don't mind whether my code is in an exe or a dll - I would have needed 
a wrapper for NAnt if it was an exe that's why I chose the dll.
I also didn't want to replace xsd.exe which has some extra features 
MSDatasetGenerator (and my code) doesn't have, but if you've got a good 
idea, just go ahead and show me what comes out. I've written the 
DatasetGenerator completely on my own, in one weekend - I know that 
products that come out of such a constellation are often somewhat 
baindead ;-)
I don't know about solution I've never used it as I don't see it's 
advantage over either my hand-tuned NAnt buildfile or doing everything 
with VS.NET - perhaps here is someone who could convince me ;-)

btw:  the code should also work for Mono. I've intentionally used late 
binding for VJSharpCodeProvider so that Mono compilation should be no 
problem.
I just can't test it because I'm currently recompiling my Linux box 
(LFS) and  mono al crashes on my windows box.

Brar Piening
Martin Aliger schrieb:
Oh - thats new info for me - thanks for clarification.
Still - shoudn't be better you write your code into .exe (like myxsd.exe)
and use existing xsd task to call it? That way we could use whatever
replacement for xsd.exe we want (I'm just writing mine own)
btw: does current solution handle projects with MSDataSetGenerator
already?
Martin Aliger
 

-Original Message-
From: Brar Piening [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 14, 2005 6:44 PM
To: Martin Aliger
Cc: 'James, Justin'; nant-developers@lists.sourceforge.net
Subject: Re: [nant-dev] DataSetGenerator

Hi Martin,
this is not the full truth.
One could use the xsd command line tool (there is already a 
wrapper for this tool in NAnt Contrib) for doing things like 
this, but VS.NET does'nt. As I said it uses 
MSDataSetGenerator which has'nt got a commandline (The only 
exception are strongly typed datasets for managed extensions 
for C++ where the xsd tool is used) .
I've tried it and didn't get what i wanted (code files that 
can be checked using diff) - that's why I wrote this task.
Regards,
Brar

Martin Aliger schrieb:
   

yes - xsd.exe is just what MSDataSetGenerator runs.
btw: I just found that mono have also xsd.exe
(http://www.mono-project.com/contributing/ado-net.html) so wrapper 
seems to be proper way. Moreover, it could be always reconfigurable 
(via nant framework config) to any custom generator like those 
mentioned below :-)

Martin Aliger

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
James, Justin
Sent: Monday, February 14, 2005 6:09 PM
To: nant-developers@lists.sourceforge.net
Subject: RE: [nant-dev] DataSetGenerator

What Visual Studio uses is the xsd command line tool.  Why not just 
create a wrapper for the xsd command line tool instead?

Later

From: [EMAIL PROTECTED] on behalf 
   

of Martin 
   

Aliger
Sent: Mon 2/14/2005 10:03 AM
To: 'Brar Piening'; nant-developers@lists.sourceforge.net
Subject: RE: [nant-dev] DataSetGenerator

Hi,
there is also generator in the PowerToys project on gotdot net 
workspace 
http://www.gotdotnet.com/workspaces/workspace.aspx?id=40d3e800
-e2af-4220-a07
9-66552dd2b825

Another one on
http://www.thecodeproject.com/dotnet/InheritFromDataSet.asp.
But those generators do not generate identical results as 
MSDataSetGenerator (intentionally).

Anyway, it could be cool to have this as nant task! Even more if it 
works under mono (doesn't mono project have something like this?)

Martin Aliger
  

   

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On


 

Behalf Of Brar
  

   

Piening
Sent: Monday, February 14, 2005 5:02 PM
To: nant-developers@lists.sourceforge.net
Subject: [nant-dev] DataSetGenerator
Hi there,
I've written a NAnt task which should implement the


 

functionality of
  

   

MSDataSetGenerator (=The custom tool inside VS.NET which generates 
strongly typed datasets fromXML-Schema files).
For testing the results against those of MSDatasetGenerator


 

I've used
  

   

diff.
Right now the results (for all kinds of DataSet-Schemas


 

that came t my
  

   

mind) are identical.
Are you interested in this task?
Any chance to get it into NAnt-Contrib or even NAnt one day?
Would you mind testing it ;-)
It' at:
http://www.piening.info/downloads/DataSetGenerator-0.0.1-src.zip
http://www.piening.info/downloads/DataSetGenerator-0.0.1_ne
 

t-1.0.zip
   

http://www.piening.info/downloads/DataSetGenerator-0.0.1_ne
 

t-1.1.zip
   

Regards,
Brar Piening
---
SF email is sponsored by - The IT Product Guide Read honest


 

 candid
  

   

reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start


 

reading now.
  

   

http://ads.osdn.com/?ad_id

RE: [nant-dev] Re: [Nant-users] 0.8.3 final

2003-09-10 Thread Brar Piening
 Ian MacLean wrote:

 I'm still fleshing out the details but basically infer the locale based
 on the resx file name ( or allow it to be specified ) and then use

... or infer it if not specified?

 assemblylinker to build the satellite assemblies.

So you plan a comfort feature of implicitly resgening *.resx files to
*.resources files (as seen in the csc task) for the al task too?
I'd appreciate that.

 
 I'm asking because I'm doing a localized build (use of fallback *.resx-
 files
 compiled into the main assembly and localized satellite assemblies) of
 current Npgsql CVS
 (http://gborg.postgresql.org/project/npgsql/projdisplay.php) using NAnt
 and
 mostly all of my problems are outside of NAnt ([Linux] lack of Mono
 assembly
 linker; [Mono Windows] monoresgen failure (at least for default
 installation)).
 
 So does that mean you can't use localised resources on mono if there is
 no assembly linker ?

It means you can't use satellite assemblies on mono as there's no way to
compile them (actually I never tried to run mcs without *.cs files and only
-resource:my.resource specified but I don't expect it to work ;-).

You still can compile the whole set of resources into the main assembly
using mcs and -resource:my.resource, or directly use the *.resources files
from the application (see:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconretrievingresource
sinresourcesfiles.asp?frame=true)
(I never tried this too, I don't even know if the necessary classes are
implemented - but in this case I expect it to work.)
I personally expect the windows guys to use MS .Net (except developers who
should speak English) and the linux guys to speak some English until mono
provides an al.

 
 In Fact the only Nant-Problem (in my case) is the lack of a Prefix
 Attribute for the resgen-task (to prefix the namespace to the *.resources
 files) which I usually patch out for my own NAnt installation and fix by
 a
 script-task (ugly) for the public.
 
 
 
 OK - I'm going to fix that as well in the next day or so. Its a simple
 enough change.

Thanks in advance.

Brar




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers