[MonoDevelop] Custom tools on multiple files
Federico Di Gregorio
fog at initd.org
Sun Jan 9 06:13:27 EST 2011
On 06/01/2011 01:29, Michael Hutchinson wrote:
>> I already have some code that implementes ITask and does the packing but
>> > right now, to test it, I wrote che XML csproj by hand. If I understand
>> > it correctly I need to have my MD addin add to the project two items:
>> >
>> > 1/ <UsingTask> to locate my task assmbly
>> > 2/ <CssPack> items inside an <ItemGroup>
>> >
>> > What's the best way of doing that? It is possible to add properties to
>> > file types already managed by MD (like css, XML or js)?
> It would be cleaner to have a targets file that you can easily import
> into multiple project.
>
> Suppose your project has to define a property for the packed css name:
>
> <PropertyGroup>
> <PackedCssFile>$(OutDir)\packed.css</PackedCssFile>
> </PropertyGroup>
>
> Then some items:
>
> <ItemGroup>
> <PackableCssFile Include="Foo.css" />
> <PackableCssFile Include="Bar.css" />
> </ItemGroup>
>
> then import your targets:
>
> <Import Project="Path\ToSomeCompany.Custom.targets" \>
How do you insert such <Import> inside the project file? I am trying to
implement IMSBuildImportProvider (and I apply [Extension] to my class
implementing it, like other addins do) but nothing happens. What am I
missing here?
federico
--
Federico Di Gregorio fog at initd.org
Spesso crescere ed andare a vivere da soli è l'unico modo di restare
bambini. -- Alice Fontana
More information about the Monodevelop-list
mailing list