Closed jaredbroad closed 8 years ago
Hello Jared,
looked into the problem and it looks like every msbuild feature which is used is supported by mono build.
The package filter task uses the WindowsBase assembly and that might not be available, could you try to install libmono-windowsbase-cil-dev before building?
Kind regards Daniel
-------- Ursprüngliche Nachricht -------- Von: Jared notifications@github.com Datum: 13.04.2016 05:22 (GMT+01:00) An: "baseclass/Contrib.Nuget" Contrib.Nuget@noreply.github.com Betreff: [baseclass/Contrib.Nuget] Error initializing task PackageFilter: Not registered task PackageFilter. (#27)
We're getting an error from TravisCI trying to build an open source library (xbuild / mono) https://travis-ci.org/QuantConnect/Lean/builds/122678825
Xarmin forums mention this but don't have a solution, https://forums.xamarin.com/discussion/56597/error-initializing-task-packagefilter-not-registered-task-packagefilter-what-does-this-mean
The error is: ../Baseclass.Contrib.Nuget.Output.2.1.0/build/net40/Baseclass.Contrib.Nuget.Output.targets (CollectNugetOutputFiles target) -> error : Error initializing task PackageFilter: Not registered task PackageFilter.
We can't remove it from our project. I'm hoping you have a fix or work around we can use.
Thanks!
You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/baseclass/Contrib.Nuget/issues/27
Thanks for the reply Daniel - the package didn't exist in Ubuntu 12.04 (which distro are you using?) so I tried using lib-mono-winbase-4.0 which was already installed --
Build with libmono-windowsbase-cil-dev: https://travis-ci.org/QuantConnect/Lean/builds/122804722
Doesn't exist is package list: https://launchpad.net/ubuntu/precise/+source/mono
sudo apt-get install libmono-windowsbase-cil-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libmono-windowsbase-cil-dev
Build with libmono-windowsbase4.0-cil https://travis-ci.org/QuantConnect/Lean/builds/122808233
sudo apt-get install libmono-windowsbase4.0-cil
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmono-windowsbase4.0-cil is already the newest version.
libmono-windowsbase4.0-cil set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
Thank you for your help -- what should I try next? (We're attempting to get GeckoFX browser working cross platform)
On Wed, Apr 13, 2016 at 12:46 AM, romerod notifications@github.com wrote:
Hello Jared,
looked into the problem and it looks like every msbuild feature which is used is supported by mono build.
The package filter task uses the WindowsBase assembly and that might not be available, could you try to install libmono-windowsbase-cil-dev before building?
Kind regards Daniel
-------- Ursprüngliche Nachricht -------- Von: Jared notifications@github.com Datum: 13.04.2016 05:22 (GMT+01:00) An: "baseclass/Contrib.Nuget" Contrib.Nuget@noreply.github.com Betreff: [baseclass/Contrib.Nuget] Error initializing task PackageFilter: Not registered task PackageFilter. (#27)
We're getting an error from TravisCI trying to build an open source library (xbuild / mono) https://travis-ci.org/QuantConnect/Lean/builds/122678825
Xarmin forums mention this but don't have a solution,
The error is: ../Baseclass.Contrib.Nuget.Output.2.1.0/build/net40/Baseclass.Contrib.Nuget.Output.targets (CollectNugetOutputFiles target) -> error : Error initializing task PackageFilter: Not registered task PackageFilter.
We can't remove it from our project. I'm hoping you have a fix or work around we can use.
Thanks!
You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub< https://github.com/baseclass/Contrib.Nuget/issues/27>
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/baseclass/Contrib.Nuget/issues/27#issuecomment-209225962
Jared Broad
Hi,
currently I've no environment set up to build with Mono and the error you get is the result of another error which is not visible in the logs.
I think the best way would be to create a simple csproj file containing a task written in c# like the one which you can find in the Baseclass.Nuget.Output.target file which does a simple hello world.
From what I read mono supports this, so the next steps would be to modify the hello world code to use the same references as the PackageFilter task, to understand what it is that is not supported.
I made a guess when thinking it would be WindowsBase, but maybe it's not.
If you like you could also try to setup this project to build on travis.
Thanks for direction @romerod, I tested the Contrib.Nuget.Output on a console application -- with nothing but a hello world in Mono 4.2.3 /Ubuntu 14.04 It failed with the exact same error. You can see the code used here: https://github.com/jaredbroad/Contrib.Nuget.Test
To repeat:
apt-get install mono-complete git
git clone https://github.com/jaredbroad/Contrib.Nuget.Test
cd Contrib.Nuget.Test
xbuild
Output:
root@hack-ubuntu-512mb-nyc3-01:~/Test# xbuild ContribTest.sln
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors
Build started 4/14/2016 6:45:36 PM.
__________________________________________________
Project "/root/Test/ContribTest.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
Project "/root/Test/ContribTest.csproj" (default target(s)):
/root/Test/ContribTest.csproj: warning : Project has unknown ToolsVersion '14.0'. Using the default tools version '4.0' instead.
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/ContribTest.exe Program.cs Properties/AssemblyInfo.cs obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs /target:exe /define:"DEBUG;TRACE" /nostdlib /platform:AnyCPU /reference:/usr/lib/mono/4.5/System.dll /reference:/usr/lib/mono/4.5/System.Xml.Linq.dll /reference:/usr/lib/mono/4.5/System.Data.DataSetExtensions.dll /reference:/usr/lib/mono/4.5/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.5/System.Data.dll /reference:/usr/lib/mono/4.5/System.Net.Http.dll /reference:/usr/lib/mono/4.5/System.Xml.dll /reference:/usr/lib/mono/4.5/System.Core.dll /reference:/usr/lib/mono/4.5/mscorlib.dll /warn:4
Target CollectNugetOutputFiles:
Collecting NuGet output files for ContribTest:
: error : Error initializing task PackageFilter: Not registered task PackageFilter.
Build FAILED.
Warnings:
/root/Test/ContribTest.sln (default targets) ->
(Build target) ->
/root/Test/ContribTest.csproj (default targets) ->
/root/Test/ContribTest.csproj: warning : Project has unknown ToolsVersion '14.0'. Using the default tools version '4.0' instead.
Errors:
/root/Test/ContribTest.sln (default targets) ->
(Build target) ->
/root/Test/ContribTest.csproj (default targets) ->
/root/Test/packages/Baseclass.Contrib.Nuget.Output.2.1.0/build/net40/Baseclass.Contrib.Nuget.Output.targets (CollectNugetOutputFiles target) ->
: error : Error initializing task PackageFilter: Not registered task PackageFilter.
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.9736780
I think the problem is this: https://bugzilla.xamarin.com/show_bug.cgi?id=12171
There is some work being done to support Paket, also for that case it might be easier to get rid of the InlineCodeTask
Could you try this package and tell me if it works? https://www.nuget.org/packages/Baseclass.Contrib.Nuget.Output/2.2.0-xbuild01
/root/Contrib.Nuget.Test/ContribTest.sln (default targets) ->
(Build target) ->
/root/Contrib.Nuget.Test/ContribTest.csproj (default targets) ->
/root/Contrib.Nuget.Test/packages/Baseclass.Contrib.Nuget.Output.2.2.0-xbuild01/build/net40/Baseclass.Contrib.Nuget.Output.targets (CollectNugetOutputFiles target) ->
/root/Contrib.Nuget.Test/packages/Baseclass.Contrib.Nuget.Output.2.2.0-xbuild01/build/net40/Baseclass.Contrib.Nuget.Output.targets: error : Failed to load package files: Method 'BuildMessageEventArgs..ctor' not found.
1 Warning(s)
1 Error(s)
I have set up the repo to use TravisCI for you -- please fork my personal repo, then enable the TravisCI build for that repo. This will mean you can rapidly test in your own account. You can enable travisCI for free at TravisCI.org
See the example matching output here identical to the linux hack box I setup. https://travis-ci.org/jaredbroad/Contrib.Nuget.Test/builds/124581736
Ok, it works now, some of the logging doesn't work but the copy process was executed. https://travis-ci.org/baseclass/Contrib.Nuget.Test/builds/124596647 Could you try it in the bigger project?
If anyone gets to this page and is using QuantConnect.Lean on Xamarin, this is what you do:
This should fix the build error.
@bosco2010 we actually don't need it anymore as we switched browser plugins ("cross platform" gecko fx relies on it but only works in windows, go figure...so we switched to mono browser in the UX project). Essentially its an old dependency I believe that we should remove now.
@romerod sorry about the topic/thread jump. Will close issue.
We're getting an error from TravisCI trying to build an open source library (xbuild / mono) https://travis-ci.org/QuantConnect/Lean/builds/122678825
Xarmin forums mention this but don't have a solution, https://forums.xamarin.com/discussion/56597/error-initializing-task-packagefilter-not-registered-task-packagefilter-what-does-this-mean
The error is: ../Baseclass.Contrib.Nuget.Output.2.1.0/build/net40/Baseclass.Contrib.Nuget.Output.targets (CollectNugetOutputFiles target) -> error : Error initializing task PackageFilter: Not registered task PackageFilter.
We can't remove it from our project. I'm hoping you have a fix or work around we can use.
Thanks!