dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.07k stars 2.03k forks source link

Building with Mono is broken due to not implemented features #332

Closed proger closed 8 years ago

proger commented 9 years ago

After running nuget restore:

Microsoft.Orleans.Templates.Interfaces.targets: error : Error executing task WriteLinesToFile: Error converting Property named 'Lines' with value '/d:$([MSBuild]::Escape($(DefineConstants)))' to type Microsoft.Build.Framework.ITaskItem[]: The requested feature is not implemented

% pwd
/Users/vladki/src/orleans/Samples/HelloWorldNuget
% xbuild
XBuild Engine Version 12.0
Mono, Version 3.12.1.0
Copyright (C) 2005-2013 Various Mono authors

Build started 4/15/2015 10:17:23 AM.
__________________________________________________
Project "/Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNuget.sln" (default target(s)):
    Target ValidateSolutionConfiguration:
        Building solution configuration "Debug|Any CPU".
    Target Build:
        Project "/Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNugetInterfaces/HelloWorldNugetInterfaces.csproj" (default target(s)):
            Target PrepareForBuild:
                Configuration: Debug Platform: AnyCPU
            Target OrleansClientPreprocessing:
                [OrleansClientPreprocessing] - Project=
                [OrleansClientPreprocessing] 
                - CodeGenToolExeDir=/Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNugetInterfaces/../tools
                - OrleansReferencesBase=
                - OrleansSDK=
                - Using CodeGenToolExe location=/Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNugetInterfaces/../tools/ClientGenerator.exe
                [OrleansClientPreprocessing] - Code-gen args file=obj/Debug/HelloWorldNugetInterfaces.codegen.args.txt
/Users/vladki/src/orleans/Samples/HelloWorldNuget/packages/Microsoft.Orleans.Templates.Interfaces.1.0.5/build/Microsoft.Orleans.Templates.Interfaces.targets: error : Error executing task WriteLinesToFile: Error converting Property named 'Lines' with value '/d:$([MSBuild]::Escape($(DefineConstants)))' to type Microsoft.Build.Framework.ITaskItem[]: The requested feature is not implemented.
                Build FAILED.
                Errors:
                /Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNuget.sln (default targets) ->
                (Build target) ->
                /Users/vladki/src/orleans/Samples/HelloWorldNuget/HelloWorldNugetInterfaces/HelloWorldNugetInterfaces.csproj (default targets) ->
                /Users/vladki/src/orleans/Samples/HelloWorldNuget/packages/Microsoft.Orleans.Templates.Interfaces.1.0.5/build/Microsoft.Orleans.Templates.Interfaces.targets (OrleansClientPreprocessing target) ->
                    /Users/vladki/src/orleans/Samples/HelloWorldNuget/packages/Microsoft.Orleans.Templates.Interfaces.1.0.5/build/Microsoft.Orleans.Templates.Interfaces.targets: error : Error executing task WriteLinesToFile: Error converting Property named 'Lines' with value '/d:$([MSBuild]::Escape($(DefineConstants)))' to type Microsoft.Build.Framework.ITaskItem[]: The requested feature is not implemented.
                     0 Warning(s)
                     1 Error(s)
                Time Elapsed 00:00:00.3307040

Is there any way of using Orleans on non-Windows? Perhaps any hacks I can use to run codegen outside of xbuild? (I'm new to .NET and thought that Orleans would be a great gateway drug for me)

proger commented 9 years ago

I've added a bunch of hacks (mostly removed random stuff I saw in error messages) to my forked branch: https://github.com/proger/orleans/commits/build-hacks

Build log: https://gist.github.com/37ec69822fcc97b6cad0

mono ./HelloWorldNuget/obj/HelloWorldNuget.exe |& gist -p: https://gist.github.com/5dd2a8e2ec544a759538 (which probably means that stuff works now, I just now have to properly configure it)

proger commented 9 years ago

A ton of errors I got after running HelloWorldNuget: https://gist.github.com/proger/0db51e7b08cff6746b4b

akoeplinger commented 9 years ago

xbuild has a bunch of bugs that make compiling Orleans with it difficult. I fixed some of them in Mono master, so you should first try getting a recent build. With some changes in my fork I could get it to build, though it's not updated and some of those changes have since been applied by the team upstream. As MSBuild got open-sourced recently, it is expected that xbuild will be replaced in the future, so it may not matter for long.

proger commented 9 years ago

This is great, thanks a lot! I'll try shortly.

jthelin commented 9 years ago

Getting Orleans to work correctly with xbuild / mono is very much still a work in progress, as @akoeplinger mentions, but is definitely on the TODO list.

gabikliot commented 9 years ago

Check this out: https://github.com/chgeuer/docker-playground/blob/master/docker-readme.md

sergeybykov commented 8 years ago

Considering the push for .NET Core compatibility, looks like we won't be spending any effort on Mono. Although we are open to fixes that would help with Mono compatibility.

proger commented 8 years ago

Thanks for the update!

I assume the place to track this is #2145

sergeybykov commented 8 years ago

Yes, that's the initial one.