Questions tagged [xbuild]

XBuild is the Mono specific version of the MSBuild utility.

XBuild is Mono's implementation of msbuild and it allows projects that have an msbuild file to be compiled natively on Linux and OS X. xbuild has been part of the standard Mono distribution for some time now, but it is not 100% complete yet.

XBuild supports C# and VB.NET projects out of the box. It also supports ASP.NET Projects, both WebApplication and WebSite projects. It also supports custom tasks, targets, extension of the build system through Before/After* hooks (eg. Before/AfterBuild) and *DependsOn properties (eg. BuildDependsOn).

Microsoft open sourced MSBuild at GitHub and ported it to non-Windows platforms. Starting from Mono 5.0 release, xbuild has been obsolete and replaced by MSBuild.

Interestingly, XBuild was the code name of MSBuild when Microsoft worked on Visual Studio 2005 and .NET Framework 2.0.

138 questions
44
votes
1 answer

how can I use xbuild to build release binary

When I use xbuild it always use debug as target, how do I make it use release? For example I would expect something like xbuild --release but that doesn't work
Petr
  • 13,747
  • 20
  • 89
  • 144
41
votes
9 answers

Compiled mono missing default .NET libraries - System.Object is not defined or imported

I've compiled mono on OS X Mavericks following the guide located here: http://www.mono-project.com/docs/compiling-mono/mac/ Now when I compile my application using xbuild I'm getting the following errors: CSC: error CS0518: The predefined type…
Geesu
  • 5,928
  • 11
  • 43
  • 72
19
votes
2 answers

MonoDevelop command line compile a solution

The problem is as follows: I have a MonoDevelop project (ASP.NET) on my development workstation. I'm currently at a customer site, without my regular development environment on my laptop (Regulatory Burden). I have SSH access to my development…
qdot
  • 6,195
  • 5
  • 44
  • 95
16
votes
5 answers

CSC: error CS0041: Unexpected error writing debug information -- 'Operation is not supported on this platform.'

Just downloaded Visual Studio Professional for Mac and I cannot seem to build anything as I always get the same error: /Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> CSC:…
Slee
  • 27,498
  • 52
  • 145
  • 243
10
votes
1 answer

java.lang.IllegalArgumentException: already added Lokio/AsyncTimeout

I am trying to get the MapBox component working in my Xamarin app. At first I was just referencing a mapbox.dll in my references in my Android project. Using that method, the app would crash when trying to inflate a layout containing mapbox. I…
Hart Russell
  • 101
  • 5
10
votes
1 answer

How to compile a solution that uses unsafe code?

How to compile a Visual Studio 2010 solution using xbuild that uses unsafe code? Currently I get this error: Implementation/MaximumImageColorClassifier.cs(35,13): error CS0227: Unsafe code requires the `unsafe' command line option to be…
BartoszKP
  • 34,786
  • 15
  • 102
  • 130
10
votes
2 answers

Error initializing task DownloadNuGet: Not registered task DownloadNuGet

I am attempting to compile by C# application using Mono on Ubuntu. I am trying to prevent the need to include nuget.exe in my git repository and have followed the accepted answer in this question This works if I am using Visual Studio 2010. When I…
Andy
  • 49,085
  • 60
  • 166
  • 233
8
votes
1 answer

What do these Mono/xbuild warnings mean and how do I fix them?

I build VS2010 projects with Mono's xbuild 2.10.5.0. The projects use the '.NET Framework 3.5 Client Profile' as the target framework (they must be 3.5 compatible and I don't need more than the client profile parts). I'm getting the following…
Henrik Heimbuerger
  • 9,924
  • 6
  • 56
  • 69
8
votes
2 answers

Is it possible to debug assemblies compiled with Mono / XBuild with Visual Studio on Windows?

I'm using XBuild to compile Visual Studio solutions for Mono. This generates the assembly + mdb file. Is there a possibility to debug this assembly with Visual Studio on Windows? When using "Attach to process" i can't debug because an error is shown…
Dresel
  • 2,375
  • 1
  • 28
  • 44
8
votes
1 answer

Mulitargeting C# project files with Mono and MonoDevelop

I have a collection of csproj files that all refer to the same set of source files, but have slightly different target data making it so I need to keep the project files separate. E.g. there are WinPhone, XBox, Desktop, MonoTouch variants of the…
Joe Castro
  • 2,181
  • 18
  • 24
7
votes
0 answers

Can I pass an argument to msc through xbuild on the command line?

Is there a way with xbuild, either through the command line or within a build script, to pass additional arguments through to the compiler? Specifically, I want to pass in --mcs-debug 1 to get a stack trace for an internal compiler error. I was able…
dahlbyk
  • 75,175
  • 8
  • 100
  • 122
6
votes
2 answers

How to solve xbuild '.NETPortable,Version=v4.0,Profile=Profile344' issue on Linux

I tried to compile my project with following instructions so I get following error. My script; sudo apt-get install mono-complete mozroots --import --sync mkdir gthb cd gthb/ git clone https://github.com/ziyasal/InfluxDB.Net.git cd…
ziyasal
  • 549
  • 5
  • 15
6
votes
2 answers

How can i build a visual studio solution using xbuild (from Mono)?

I recently downloaded Mono 2 for my new MacBook. I'm trying to figure out how to compile Visual Studio solutions with xbuild, which is included in Mono. Any ideas?
Adrian Anttila
  • 2,038
  • 5
  • 22
  • 25
6
votes
1 answer

Building SLN on mono / Ubuntu

I am trying to build my SLN on Ubuntu using Mono / xbuild I started getting errors related to webapplication.targets missing and thought I'd fixed that by adding a simlink as in Webapplication.targets missing when building a MVC4 project in…
user156888
6
votes
3 answers

Mono XBuild publish MVC site

I've got Monoserve and Nginx running perfectly in Ubuntu however I still have to publish the website locally on a Windows box using MSBuild and then copy the files over. Preferably I'd like to have a Linux CI server that does this instead using…
Dharun
  • 613
  • 8
  • 26
1
2 3
9 10