Hi, As a matter of fact, I have run into this problem. For me it only occurs when I am building in 'Debug' configuration. If I build in 'Release,' then everything works just fine.
I've got no idea why and once I had my workaround, I kinda forgot about the problem. I never got into the TaskSchema code to see if they're not doing something correctly. Maybe they're loading the assembly into the current AppDomain or something and can't unload it. Dunno why it works in 'Release,' though.
I tried to include TaskSchema in the AfterBuild task, just as you describe, but am experiencing a situation where the assembly that TaskSchema looks at is then locked, and further attempts to build result in a "unable to delete" exception.
I have not yet begun to dig into exploring what process(es) are locking the assembly, but suspect it's TaskSchema.
First, checkout this page http://blogs.msdn.com/msbuild/archive/2005/11/08/490462.aspx as it has the basics in it.
I used the MSBuildCommunity.Task.TaskSchema class to generate the xsd that you include in the Microsoft.Build.xsd. Be careful with the example, because it also creates your Targets file, (which tromped on the custom one that I'd written.)
I made the TaskSchema part of my AfterBuild Task in the project that had my Custom tasks in it. It works pretty well.
intellisense support for custom tasks
MichaelB
As a matter of fact, I have run into this problem. For me it only occurs when I am building in 'Debug' configuration. If I build in 'Release,' then everything works just fine.
I've got no idea why and once I had my workaround, I kinda forgot about the problem. I never got into the TaskSchema code to see if they're not doing something correctly. Maybe they're loading the assembly into the current AppDomain or something and can't unload it. Dunno why it works in 'Release,' though.
Hope this helps, nathan
Gordie
Hi Nathan!
I tried to include TaskSchema in the AfterBuild task, just as you describe, but am experiencing a situation where the assembly that TaskSchema looks at is then locked, and further attempts to build result in a "unable to delete" exception.
I have not yet begun to dig into exploring what process(es) are locking the assembly, but suspect it's TaskSchema.
Any thoughts or experiences of a similar nature
a
Jonathan Hart
I used the MSBuildCommunity.Task.TaskSchema class to generate the xsd that you include in the Microsoft.Build.xsd. Be careful with the example, because it also creates your Targets file, (which tromped on the custom one that I'd written.)
I made the TaskSchema part of my AfterBuild Task in the project that had my Custom tasks in it. It works pretty well.
-n