4

I'm trying to write a build script for a ASP.NET MVC 3 web site for publishing on Mono. Although some devs use Windows for development, the site must be built on Mono, as the build and Web servers are running OS X. I'm using xbuild to run MSBuild scripts on Mono. The website can be compiled without much problems.

However, I'm unable to find how the equivalent of aspnet_compiler.exe on Mono. I cannot find the AspNetCompiler build task and google searches return [a stub implementation] from a long time ago.

Does the AspNetCompiler task exist in Mono? Are there alternatives for compiling an ASP.NET application on Mono?

Ronald Zarīts
  • 11,819
  • 8
  • 39
  • 42

1 Answers1

1

Mono does not have aspnet_compiler yet (as of Mono 2.11) but you can precompile your site on Windows and Mono can run it.

I am not sure why your site must be built on Mono, simple xcopy from Windows box should work. Unless you want to debug it on Mono but that's probably not the case when your devs are using Windows.

Marek Safar
  • 600
  • 3
  • 8
  • True, since posting the question I've gone through every executable in the mono framework directories on mac os x, and haven't found anything. Neither there's anything on the Web that suggests precompiling ASP.NET web sites on mono is supported as of yet. Therefore I've concluded this is not possible and have since given up on precompilation. As for building the site on Mono - the site is hosted on a OS X box, and built on a Team City CI server (also running on OS X). – Ronald Zarīts May 02 '12 at 07:38
  • it has been [possible since ~2009, Mono-2.4 and later](https://forums.asp.net/t/1410978.aspx?Deploy+web+application+on+Linux+using+Mono). at the time of the original posting it was possible, has been possible since, but it remains true that there is no aspnet_compiler tool packaged as part of Mono – Shaun Wilson Feb 02 '17 at 15:26
  • @ShaunWilson, Can you expand upon your comment? You say it _is_ possible to compile ASP.NET on Mono, but that Mono does not have `aspnet_compiler.exe`… So how do you do it then? Copy the compiler exe to the machine with Mono on it? Or use the `mcs` compiler instead somehow? – andrewf Apr 23 '21 at 11:50