[Mono-list] Custom ITaks in MonoDevelop

Krogerma at aol.com Krogerma at aol.com
Sun Sep 12 15:41:11 EDT 2010


 
Hello, Lists:
 
I received some clarification from list members right after I submitted my  
last E-mail. I got waylayed for a while, but now I'm back on it. Thanks to 
the  folks who helped me.
 
The information I got indicated that xbuild had to be turned on within  
MonoDevelop if any Custom Tasks need to be called. I've done this. I get a  
couple of error messages:
 
"Error initializing task Message:  cannot cast from source type  to 
destination type"  
"Error initializing task CreateItem:  cannot cast from source  type to 
destination type".
 
This occurs in a simple file that does not even have any custom tasks in it 
 (I actually commented them out in the .csproj file) that otherwise builds 
fine  without the xbuild switch turned on in MonoDevelop.
 
I just upgraded to mono 2.6.7 to continue with this work. I'm using the  
latest MonoDevelop, which I also downloaded at the same time.
 
This seems to me like it might be an incorrect version of a dll somewhere.  
Does anybody have any advice?
 
A snippet from the bottom of my .csproj file is:
  <!-- This section is a very simple test to copy a file.  -->
<!--  <PropertyGroup>
<FileToCopy>TestClass1.txt</FileToCopy>
</PropertyGroup>
<PropertyGroup>
<Dest>bin\</Dest>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy  SourceFiles="$(FileToCopy)" DestinationFolder="$(Dest)" />
</Target> -->


I'm starting simple here - only using the ITasks that are provided from  
Microsoft and seem to be provided in the Mono distribution, too. The 
AfterBuild  Target is in the Mono version of Microsoft.Common.Targets, so I'm 
assuming it  can be used the same way as in MSBuild.
 
I'm including the solution file.
 
If anyone can help us get this running, we'll submit my intern's report on  
this to the community.
 
What we are (eventually) trying to achieve is to perform builds across  
Windows-VS, Windows-mono, Linux-mono and Mac-mono environments with the same  
solution and project files. Our plan entails putting certain build-wide  
variables into a configuration file that lives in the solution folder and that  
will be accessed to determine platform-specific directories and other  
platform-specific information.
 
Thanks in advance;
Kurt Matis
Troy, NY
 


 
  
____________________________________
 From: Krogerma at aol.com
To: mono-list at lists.ximian.com,  monodevelop-list at lists.ximian.com
Sent: 8/4/2010 8:29:10 P.M. Eastern  Daylight Time
Subj: Does xbuild support the ITask interface?


Hello, lists:
 
I don't know if this a MonoDevelop question or a more general Mono  
question, so I'm posting to both lists.
 
We are trying to learn MonoDevelop and how it can be used for  
cross-platform builds. We've got a pretty good handle on developing with it  and figured 
out a few tricks of our own. We are using CustomCommands to some  
platform-specifc tasks and that seems to work pretty well.
 
We were wondering if xbuild supports the extensions that can be built for  
msbuild that inherit from the ITask interface. What we have in mind is 
loading  platform-specific DLL's that implement some custom tasks on Mac, Suse 
and  Windows. We need to write some platform-specific C# code for each  
platform (we think) that fiddles with operating system permissions, does  some 
file inspections and a few other things.
 
If it's not already supported, do you think there are any technology  
barriers that prevent it? If it's not a huge job, we could provide some help.  
It's not quite clear from the website whether the custom tasks are supported.  
I usually download the source code for various Mono facilities and inspect 
it  to find such information, but maybe someone can give me a quick answer?
 
Thanks in advance
 
Kurt Matis
Troy, NY




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100912/176db047/attachment-0001.html 


More information about the Mono-list mailing list