Oh I think I misread your email.. Looks like the CreateItem task can actually add things to an existing ItemGroup within a Target? If that's the case, that'll probably fix my issue..
Can we bump the priority up on this bug though? It looks pretty old.. I'm still trying to get a Mono enlistment setup, but maybe I can help out when I'm running. xbuild seems like a great project to contribute to. Mike On Thu, Aug 4, 2011 at 12:51 AM, Mike Christensen <[email protected]> wrote: > This won't work because I include items that are not yet created until > after the target runs.. > > In other words, if I say: > > <Project> > <ItemGroup Include="Foo*.*" /> > > ... > > Then this ItemGroup gets populated before the Target runs. If Target > then goes and creates Foo1.txt and Foo2.txt, those items won't get > included in the ItemGroup since they didn't exist when it was > evaluated. That's why I need to have this ItemGroup within the > Target. > > When will this bug be fixed? It seems hugely important to support this. > > Mike > > On Wed, Aug 3, 2011 at 7:54 PM, Jonathan Pobst <[email protected]> wrote: >> You need to use the old way of doing thing, the CreateItem task. >> >> http://msdn.microsoft.com/en-us/library/s2y3e43x.aspx >> >> Jonathan >> >> >> On 8/3/2011 8:29 PM, Mike Christensen wrote: >>> >>> What's the best way to port this code over: >>> >>> <Target Name="Build"> >>> >>> ** Bunch of stuff here ** >>> >>> <!-- Crunch Files --> >>> <ItemGroup> >>> <ToCrunch >>> Include="$(BuildDir)/WWW/Scripts/kpc*.js;$(BuildDir)/WWW/Styles/*.css" >>> /> >>> </ItemGroup> >>> <Message Importance="High" Text="Crunching Script Files..." /> >>> <Exec WorkingDirectory="Crunch" Command="java -jar >>> yuicompressor-2.4.2.jar %(ToCrunch.Fullpath) -o %(ToCrunch.Fullpath) >>> --charset utf-8" /> >>> </Target> >>> >>> If I run this, I get the error: >>> >>> >>> : error : Error initializing task ItemGroup: Not registered task >>> ItemGroup. >>> >>> Which I believe is a known limitation in XBuild. However, if I move >>> the ItemGroup outside the project, the set of files is empty because >>> those files have not been build yet. Thanks! >>> >>> Mike >>> _______________________________________________ >>> Mono-list maillist - [email protected] >>> http://lists.ximian.com/mailman/listinfo/mono-list >>> >>> >> >> > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
