RE: [nant-dev] solution changes

2004-11-12 Thread Brant Carter
In the 0.84 build there is a bug (keep forgeting to get an official patch) 
where the solution task will fail if the output assembly is read-only on the 
drive.

Normally you would think this is the desired behaviour but it is different 
that what VS.NET does.  We actually rely on this bug to make our builds 
work.

here is how I patched it (on 0.84) (look for the -)
File: Project.cs
  public override bool Compile(string configuration, ArrayList 
alCSCArguments, string strLogFile, bool bVerbose, bool bShowCommands) {
  bool bSuccess = true;

  ConfigurationSettings cs = (ConfigurationSettings) 
_htConfigurations[configuration];
  if (cs == null) {
  Log(Level.Info, LogPrefix + Configuration {0} does not 
exist. Skipping., configuration);
  return true;
  }

  Log(Level.Info, LogPrefix + Building {0} [{1}]..., Name, 
configuration);
  Directory.CreateDirectory(cs.OutputDir);

  // perform prebuild actions (for VS.NET 2003)
  if (ProjectSettings.RunPostBuildEvent != null) {
  bSuccess = PreBuild(cs);
  }
  // ensure the temp dir exists
  Directory.CreateDirectory(TempFiles.BasePath);
  string tempResponseFile = Path.Combine(TempFiles.BasePath, 
Project.CommandFile);

  using (StreamWriter sw = File.CreateText(tempResponseFile)) {
  if (CheckUpToDate(cs)) {
  Log(Level.Verbose, LogPrefix + Project is 
up-to-date.);
  if (ProjectSettings.RunPostBuildEvent != null) {
  PostBuild(cs, true, false);
  }
  return true;
  }

  foreach (string setting in alCSCArguments) {
  sw.WriteLine(setting);
  }
  foreach (string setting in ProjectSettings.Settings) {
  sw.WriteLine(setting);
  }
  foreach (string setting in cs.Settings) {
  sw.WriteLine(setting);
  }
  if (_projectSettings.Type == ProjectType.VBNet) {
  sw.WriteLine(_imports);
  }
  Log(Level.Verbose, LogPrefix + Copying references:);
  foreach (Reference reference in _htReferences.Values) {
  Log(Level.Verbose, LogPrefix +  -  + 
reference.Name);

  if (reference.CopyLocal) {
  if (reference.IsCreated) {
  string program, commandLine;
  reference.GetCreationCommand(cs, out program, 
out commandLine);

  Log(Level.Verbose, LogPrefix + program +   
+ commandLine);
  ProcessStartInfo psiRef = new 
ProcessStartInfo(program, commandLine);
  psiRef.UseShellExecute = false;
  psiRef.WorkingDirectory = cs.OutputDir;

  try {
  Process pRef = Process.Start(psiRef);
  pRef.WaitForExit();
  } catch (Win32Exception ex) {
  throw new 
BuildException(string.Format(Unable to start process '{0}' with commandline 
'{1}'., program, commandLine), ex);
  }
  } else {
  StringCollection fromFilenames = 
reference.GetReferenceFiles(cs);

  // create instance of Copy task
  CopyTask ct = new CopyTask();
  // inherit project from solution task
  ct.Project = SolutionTask.Project;
  // inherit parent from solution task
  ct.Parent = SolutionTask.Parent;
  // inherit verbose setting from solution task
  ct.Verbose = SolutionTask.Verbose;
  // make sure framework specific information 
is set
  ct.InitializeTaskConfiguration();

  // set parent of child elements
  ct.CopyFileSet.Parent = ct;
  // inherit project from solution task for 
child elements
  ct.CopyFileSet.Project = 
SolutionTask.Project;

  // set task properties
  foreach (string file in fromFilenames) {
  ct.CopyFileSet.Includes.Add(file);
  }
  ct.CopyFileSet.BaseDirectory = 
reference.GetBaseDirectory(cs);
  ct.ToDirectory = 

RE: [nant-dev] New to the list

2004-03-19 Thread Brant Carter
I was having this same problem!  Thanks for the script.

+1 for a ant task

brant
...


From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [nant-dev] New to the list
Date: Fri, 19 Mar 2004 08:57:55 -0500




Hi everyone!  I joined this list because there are some differences between
Nant and Ant which have been causing me trouble.  I wanted to post my
solutions in the hopes that they may be useful.  If it's stuff that's
already been thought of, just tell me to shut up :)
The first problem I ran up against was running Ant from Nant.  On the
Windows platform, Ant is run through a batch file which does not
communicate the program exit code.  So the Nant build always believes that
the Ant build succeeded.  To get around this, I actually call the Java
class file like so:
exec
program=${java.home}/bin/java.exe
workingdir=${mbpa.home}
commandline=-classpath ${ant.cp}
org.apache.tools.ant.launch.Launcher build
failonerror=true
/
This is obviously not a problem, however getting the classpath correct is a
pain because you have to add all the jars in the ant/lib directory since
Nant doesn't have any clue what a Java classpath is.  To achieve this, I
wrote a little script:
script language=C#
code![CDATA[
public static void ScriptMain( Project project ) {
string ald = project.Properties[ant.home] + /lib;
string jh = project.Properties[java.home];
string cp = jh + /lib/tools.jar;
DirectoryInfo di = new DirectoryInfo(ald);
FileInfo[] files = di.GetFiles(*.jar);
foreach (FileInfo fi in files)
cp += ; + ald + / + fi.Name;
project.Properties[ant.cp] = cp;
}
]]/code
/script
_
Add photos to your e-mail with MSN Premium. Get 2 months FREE*  
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Licensing

2003-10-10 Thread Brant Carter
I think we should ask ourselves what types of uses we would want NAnt to be 
available to.  Here are two scenarios.

[1] A commerical company wants to release a custom task and charge money for 
it.  Do we want to allow this?

[2] A commerical company wants to distribute a customized version of NAnt as 
part of its software package (ie: A compiler company, IDE developer) and 
charge money for the entire package.   Do we want to allow this?

[3] A company creates a large software package that requires it to be 
built by the end customer.  Are they allowed to distribute NAnt to do 
this?  What if they modified NAnt in some way?

brant
...
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



---
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] last suggestion - Solution task again

2003-08-26 Thread Brant Carter
We solved this problem by creating a tool to update the .user files for 
each developer.  It scans the directory tree and then creates a .user file 
for each .proj file with the correct reference path for that workstation.

brant
...


From: Martin Aliger [EMAIL PROTECTED]
To: Matthew Mastracci [EMAIL PROTECTED]
CC: ! nant [EMAIL PROTECTED]
Subject: Re: [nant-dev] last suggestion - Solution task again
Date: Mon, 25 Aug 2003 10:52:59 +0200
 I'd recommend against comparing only filenames.  This will likely end up
 causing trouble down the line.  VS.NET is certainly a mess when it comes
 to hint paths, but I've found that they are generally accurate.  I don't
 even think it uses them half of the time.  :)

 Can you describe your situation with more detail (perhaps some examples)
 so I can see what is happening?.
Sure. This is case, when more developers make some projects and upload them
into build server. Than it should compile all that projects from several
developers. Of course, every developer have another path in their .csproj
files and that do not exists on server.
Similar think could happen when you copy project around machines or even
move to another disk. I think this is important to solve maybe with help of
some attributes. There must be some way from this mess :-)
Thanks!
Martin
 Last one - and I'm not sure there.
 
 There are problems with references between projects when projects have
different output paths. Project references are ok, but external refenreces
sometimes brokes. Currently nant compares files as full pathnames using 
path
from HintPath attribute. I suggest to compare filenames as names only
without path. Could this be a problem? It works for me, but... Btw: Visual
studio is real mess in this. Hope nant could be better! :)
 
 I send patch I made, but consider this as suggestion, not real patch
 



---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click 
here:http://www.vmware.com/wl/offer/358/0
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Solution task Output Assemblies

2003-08-25 Thread Brant Carter
When compiling with devenv it will overrite the output assembly regardless 
of its file attributes (ie: ReadOnly).  The solution task does not do this.

Here is a patch to synch the two behaviours:

NAnt.VSNet/Project.cs

//THIS LINE MAKES THE OUTPUT FILE WRITTABLE
System.IO.File.SetAttributes (cs.FullOutputFile , 
System.IO.FileAttributes.Normal );
//

ProcessStartInfo psi = null;
if ( _ps.Type == ProjectType.CSharp ) {
   psi = new ProcessStartInfo( Path.Combine( 
_nanttask.Project.CurrentFramework.FrameworkDirectory.FullName, csc.exe ), 
@ + strTempFile );
   }

if ( _ps.Type == ProjectType.VBNet ) {
   psi = new ProcessStartInfo( Path.Combine( 
_nanttask.Project.CurrentFramework.FrameworkDirectory.FullName, vbc.exe ), 
@ + strTempFile );
   }

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] NAntContrib Source

2003-08-14 Thread Brant Carter
Where can I get the NAntContrib source that is being use for the 0.83 
release.  I downloaded the source for NAnt and the binaries are in the \bin 
folder.  The nightly builds for NAntContrib aren't correct.  If someone has 
these files that would be appreciated.

thanks

brant

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Solution Task Issues

2003-08-11 Thread Brant Carter
I am trying to get the solution task to work and found a couple of things 
that might make my (and others?) life easier.

[1] When looking for references it uses the HintPath element on the project. 
 Unfortunately this is not a reliable way to locate references.  Visual 
Studio actual uses a .user file to store the location of references (ugly I 
know).  It would be nice if the solution task could accept an element that 
would specify the location of shared references (ie: 
referencepath=${lib.dir} or something)

[2] The solution task crashes if you don't specify a default framework.  It 
uses the location of the GAC and if its not set you get a Null Reference 
Exception.

brant
...
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Fileset references

2003-03-20 Thread Brant Carter
+1 for this.  This would be really sweet.

brant
...






From: Philip Nelson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [nant-dev] Fileset references
Date: Thu, 20 Mar 2003 11:15:20 -0800 (PST)
 So the two valid forms would be:
 1.) (how things work now)
 foreach ...
 !-- stuff to do --
 /
 2.)
 foreach ...
 in/
 do
 !--Stuff to do --
 /
 /
What I would love to see is:

fileset ID=foo 
   include ..
/fileset
attrib readOnly=false
  fileset ref=foo /
/attrib
foreach ...type=FileSet ref=foo
do
!--Stuff to do --
/
/
in addition to the more verbose sorts...
foreach ...
in
  fileset ref=foo /
  fileset
 
  /fileset
/in
do
!--Stuff to do --
/
/
Fileset references are something ant had a long time ago and would really
reduce the size of my build files tremendously.


---
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail



---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] NUnit Error With NAnt...

2003-01-16 Thread Brant Carter
You might want to look at this article.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconspecifyingassemblyslocation.asp

I am pretty sure that the default is for it to look in the GAC and then to
look in the current directory.  You may have to specify your values in a
nant.exe.config file (or possibly the nunit.exe.config file).   I haven't
confirmed this yet as I haven't ventured into NUnit/NAnt integration just
yet.

brant
...



- Original Message -
From: Scott Hernandez [EMAIL PROTECTED]
To: Sansone, Aaron [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 4:48 PM
Subject: Re: [nant-dev] NUnit Error With NAnt...


 We also have, and have had, the same problems with NAntContrib for a
while.

 Here is some background.
 http://sourceforge.net/mailarchive/message.php?msg_id=2372560

 If you find any solution, or have any ideas, please feel free send them
 around. I'm just now starting to look into it. :)

 - Original Message -
 From: Sansone, Aaron [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 16, 2003 2:18 PM
 Subject: [nant-dev] NUnit Error With NAnt...


  All,
 
  I have the latest snapshot (1/14) of NAnt and I am trying to create a
test
 build
  script.  Apparently the NUnit2 Testing task is looking for my Assembly
in
 the
  NAnt installation directory.  If I copy my Assembly to the C:\NAnt\bin
  directory, my test tasks are run.  However, I don't belive that this is
 the
  intended way to run NAnt-NUnit tasks.  Is there a way to force the NUnit
 task to
  look as a specific directory for my assembly?  Here are my relevant
build
 file
  entries.  Notice that I am specifying the absolute path for the
assembly.
 I've
  tried several permutations of the assembly location, but only when I
 placed it
  in the NAnt/bin directory did I have any success.
 
  Properties:
 
  property name=project.basedir value=C:/Projects/SpikeSolution/
  property name=build.dir value=build/
  property name=project.ClientExe.name value=SpikeWinClient/
 
  NAnt Task:
 
  nunit2 basedir=${project.basedir}\${build.dir}
test
 

assemblyname=${project.basedir}\${build.dir}\${project.ClientExe.name}.exe
 /
  /nunit2
 
  When I execute the script, I get the following Error:
 
  INTERNAL ERROR
  System.IO.FileNotFoundException: File or assembly name SpikeWinClient,
or
 one of
   its dependencies, was not found.
  File name: SpikeWinClient
 at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
 codeBase, B
  oolean isStringized, Evidence assemblySecurity, Boolean
 throwOnFileNotFound, Ass
  embly locationHint, StackCrawlMark stackMark)
 at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
 Boolean
  stringized, Evidence assemblySecurity, StackCrawlMark stackMark)
 at System.Reflection.Assembly.InternalLoad(String assemblyString,
 Evidence as
  semblySecurity, StackCrawlMark stackMark)
 at System.AppDomain.Load(String assemblyString)
 at NUnit.Core.TestSuiteBuilder.Build(String assemblyName)
 at SourceForge.NAnt.Tasks.NUnit2.NUnit2Task.runTest(NUnit2Test test,
 EventLis
  tener listener)
 at SourceForge.NAnt.Tasks.NUnit2.NUnit2Task.ExecuteTask()
 at SourceForge.NAnt.Task.Execute()
 at SourceForge.NAnt.Target.Execute()
 at SourceForge.NAnt.Project.Execute(String targetName)
 at SourceForge.NAnt.Tasks.CallTask.ExecuteTask()
 at SourceForge.NAnt.Task.Execute()
 at SourceForge.NAnt.Target.Execute()
 at SourceForge.NAnt.Project.Execute(String targetName)
 at SourceForge.NAnt.Project.Execute()
 at SourceForge.NAnt.Project.Run()
 
  Fusion log follows:
  === Pre-bind state information ===
  LOG: DisplayName = SpikeWinClient
   (Partial)
  LOG: Appbase = C:\NAnt\bin\
  LOG: Initial PrivatePath = NULL
  Calling assembly : nunit.framework, Version=2.0.6.0, Culture=neutral,
 PublicKeyT
  oken=96d09a1eb7f44a77.
  ===
 
  LOG: Policy not being applied to reference at this time (private,
custom,
 partia
  l, or location-based assembly bind).
  LOG: Post-policy reference: SpikeWinClient
  LOG: Attempting download of new URL
 file:///C:/NAnt/bin/SpikeWinClient.DLL.
  LOG: Attempting download of new URL
 file:///C:/NAnt/bin/SpikeWinClient/SpikeWinC
  lient.DLL.
  LOG: Attempting download of new URL
 file:///C:/NAnt/bin/SpikeWinClient.EXE.
  LOG: Attempting download of new URL
 file:///C:/NAnt/bin/SpikeWinClient/SpikeWinC
  lient.EXE.
 
  Please send bug report to [EMAIL PROTECTED]
 
 
  Thanks,
 
  Aaron



 ---
 This SF.NET email is sponsored by: Thawte.com
 Understand how to protect your customers personal information by
implementing
 SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
 Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
 ___
 Nant-developers mailing list
 [EMAIL PROTECTED]
 

[nant-dev] Specifing a Startup Object with VBC

2003-01-14 Thread Brant Carter
I found this msg in the archive with no answer:


Hi
I am busy compiling an exe and it requires a point of entry class (start up 
object), how do I declare this in the vbc target?

Thanks
Rosemarie Leighton (Financial IQ)

The following works for me

vbc target=winexe main=Form1 output=${output} debug=${debug} 
define=${define} doc=${doc} rootnamespace=App1 .../
 arg value=/m:App1.Form1 /

Adding the arg tag with the /m option.

brant
...









_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail



---
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers