Jaroslaw, you're right, we had the <Task Name="blah"..> syntax in the PDC/Alpha bits. We recently changed to <TaskNameHere ... > as you see below so that an XSD could give us intellisense and validation on task parameters. It's also a bit less verbose, I guess. When the Beta comes out, you'll see the new syntax (there are some other changes too).
________________________________ From: Jaroslaw Kowalski [mailto:[EMAIL PROTECTED] Sent: Sun 3/7/2004 11:20 PM To: Alex Kipman; [EMAIL PROTECTED] Cc: MSBuild External Feedback Subject: Re: [nant-dev] Bug #908317 - Project with no source files builds with an error Hi Alex! Just out of curiosity: I remember MSBuild used to have a syntax where you had to use <Task name="..." ... /> to run tasks. In your example I see <MakeDir>, <Touch>, <Delete> What version of the syntax are you going to support in Whidbey? Jarek ----- Original Message ----- From: "Alex Kipman" <[EMAIL PROTECTED]> To: "Gert Driesen" <[EMAIL PROTECTED]>; "Keyser, Jeffrey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "MSBuild External Feedback" <[EMAIL PROTECTED]> Sent: Monday, March 08, 2004 5:46 AM Subject: RE: [nant-dev] Bug #908317 - Project with no source files builds with an error > As I told you offline : right now, its not possible to create assemblies > containing no source files at all using the commandline compilers. > HJowever, I'm pretty sure MS will have to revise this if they intend > want to > use MSBuild as build engine in VS.NET Whidbey. > > We can't just have the <solution> task skip the project if there are no > sources in the project, as there could, for example, be resources in the > project. > >>> Hi Gert/Jeffrey, > > Turns out we run into the same issue with MSBuild. The compilers have > very good reasons for erroring in this case, so they will not be > changing in the Whidbey timeframe. We have gotten around this problem > in our targets files. I've pasted the steps below. This ports pretty > 1:1 to NAnt so you should be able to do the same to get around this > problem. > > Basically we create an empty file which we then feed to the compilers. > We use our touch task to do this for us. We then clean this file. > > In the beta of Whidbey if you look in our Framework.targets you'll find > the following target: > > <!-- > Prepare the prerequisites for building. > --> > <Target > Name="PrepareForBuild" > DependsOnTargets="$(PrepareForBuildDependsOn)" > > > <!-- > Create the directories for intermediate and final build products. > --> > <MakeDir > Directories="$(OutDir);$(IntermediateOutputPath); > @(DocFileItem->'%(RelativeDir)')"/> > <!-- > We support building libraries even when there are no source files. > If no source file is specified in the project file, then we generate > an empty one here with an extension of > $(DefaultLanguageSourceExtension). > --> > <Touch > Condition="'@(Compile)'==''" > AlwaysCreate="true" > Files="$(IntermediateOutputPath)VisualStudio.Empty > $(DefaultLanguageSourceExtension)"> > <Output TaskParameter="TouchedFiles" ItemName="Compile" > Condition=" '$(BuildingInsideVisualStudio)' != 'true' "/> > </Touch> > </Target> > > <!-- > Delete the empty source file if one was created at the start of the > build. > --> > <Target > Name="RemoveEmptyGeneratedSource" > Condition="Exists('$(IntermediateOutputPath)VisualStudio.Empty > $(DefaultLanguageSourceExtension)')" > DependsOnTargets="$(RemoveEmptyGeneratedSourceDependsOn)" > > > <Delete Files="$(IntermediateOutputPath)VisualStudio.Empty > $(DefaultLanguageSourceExtension)"/> > </Target> > > Let me know if you have any other questions, > > Alex Kipman ([EMAIL PROTECTED]) > Program Manager > MSBuild Team ------------------------------------------------------- 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_id70&alloc_id638&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers