Hi there:
 
Can you please explain this arguments of gmcs?:
@(ProjectReference->'/reference:%(RelativeDir)$(OutputPathMono)\%(Filename).dll

Best regards,
Gustavo Guerra

"Andy Waddell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...

I have an application that needs to run under both .NET and Mono and I came up with a pretty simple way to get MS DevStudio to build both.  I don’t know how others have solved this problem, but I thought I would offer it up in case it helps someone else with the same issue.  The basic approach I took was to call the Mono compiler after the Microsoft build has already run.  Microsoft has a well known target “AfterBuild” which I have hooked to invoke gmcs with pretty much the same arguments that csc.exe takes with some minor modifications.  I put all the Mono build stuff in a file called Mono.targets, so it only take a one line addition to the standard *.csproj file to get the functionality:

 

  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

Add this lineà  <Import Project="<your path>\Mono.targets" />

 

This will make your build essentially a dual pass build with all the Microsoft stuff running and then the Mono compiler running with all the warnings and erros showing up in the IDE as you would expect.  The work is not complete (I don’t pass all the options possible, etc), but I think it’s fairly obvious how to expand it if needed. 

 

I’m sure there are many other ways to skin this cat, but for a quick and dirty solution, it seems to work pretty well. 

 

ToDo: invesitgate xbuild to do my Linux builds.

 

--andy

 


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to