Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build not working with xbuild #28

Open
JeroMiya opened this issue Sep 18, 2015 · 2 comments
Open

Build not working with xbuild #28

JeroMiya opened this issue Sep 18, 2015 · 2 comments

Comments

@JeroMiya
Copy link
Contributor

As reported here:
OSVR/OSVR-Unity#8

There currently isn't a way to build Managed-OSVR on linux with xbuild.

@rpavlik
Copy link
Member

rpavlik commented Sep 21, 2015

cc @ChristophHaag

Looks like xbuild doesn't like the MSBuild foolishness required to be able to build both a .NET 2.0 and .NET 4.5 version. Options:

  • Use Windows-compiled assemblies: should work fine, I think, since it works fine for Android, though it's not really a solution to the "can't build except on Windows" problem
  • Use newly cross-platform MSBuild open source project - not sure how this works on Linux ATM, but I saw a blog post about it.
  • Create alternate xbuild files.

@ChristophHaag
Copy link

Yes, the windows compiled binaries work, but if people want to experiment/hack on it, they should be able to compile it. :)

Anyway, it seems to work with msbuild.

msbuild git doesn't build with current mono, I think it's fixed in mono git, but I haven't tested it.

But there is a prebuilt binary from corefx that can be installed like this if you have nuget installed:
nuget install Microsoft.Build.Mono.Debug -Version 14.1.0.0 -OutputDirectory "~/msbuild" -source "https://www.myget.org/F/dotnet-buildtools/"

And then you can build Managed-OSVR with
mono ~/msbuild/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/MSBuild.exe ClientKit/ClientKit.csproj /p:Configuration=Release20 /p:OutputPath=../Managed-OSVR-Unity /p:NativeOutputSuffix32=x86 /p:NativeOutputSuffix64=x86_64 /p:DefineConstants="NET20"

NET20 doesn't seem to be defined anywhere in the build files, but manually defining it with /p:DefineConstants="NET20" seems to do the trick.

Not sure where to get the current version number, but here: https://github.com/dotnet/corefx/blob/master/build.sh#L191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants