I am using a single branch pipeline for a project, currently I am getting this error.
[xUnit.net 00:00:03.0095238] System.TypeInitializationException : The type initializer for 'System.DrawingCore.GDIPlus' threw an exception.
[xUnit.net 00:00:03.0097048] ---- System.DllNotFoundException : Unable to load DLL 'gdiplus.dll': The specified module could not be found.
Whenever I run the same unit tests locally they all pass, however when going through jenkins it is unable to load the gdiplus.dll I am at a loss because I have no idea why this is behaving this way. Has anyone encountered something similar? How can I add the DLL manually?
If anyone has this issue, the best way to solve this is to install the gdiplus in your docker container. However even after you have installed the docker container you will still have this error because Linus in its infinite wisdom is looking for gdiplus.dll not libgdiplus.so so there is a need to link it.........
Here is a link to where I found the solution after hours of searching
https://en.code-bude.net/2017/05/08/net-core-gdiplus-dll-not-found-in-linux/
This is the code I used and it is working
apt-get install -y libgdiplus \
&& cd /usr/lib ln -s libgdiplus.so gdiplus.dll
Related
While working with avlaonia on Vscode and running it in debug. I get the below error message and the code exits and debug doesn't work.
System.DllNotFoundException: Unable to load shared library 'libICE.so.6' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable:
liblibICE.so.6: cannot open shared object file: No such file or directory
at Avalonia.X11.ICELib.IceAddConnectionWatch(IntPtr watchProc, IntPtr clientData)
at Avalonia.X11.X11PlatformLifetimeEvents..ctor(AvaloniaX11Platform platform) in /_/src/Avalonia.X11/X11PlatformLifetimeEvents.cs:line 56
at Avalonia.X11.AvaloniaX11Platform.Initialize(X11PlatformOptions options) in /_/src/Avalonia.X11/X11Platform.cs:line 71
at Avalonia.AvaloniaX11PlatformExtensions.<>c__0`1.<UseX11>b__0_0() in /_/src/Avalonia.X11/X11Platform.cs:line 279
at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 303
at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime)
What does this error means, how can I managed to resolve the issue. This error appears any time I'm trying to run debug.
Try installing the package libice6:
sudo apt install libice6
For context, I just installed Linux Subsystem on Windows with Ubuntu, tried to run an avalonia program and ran into this error. It solved the problem (there was a subsequent missing library so I had to similarly run
sudo apt install libsm6
).
I hope it will help you
First of all please keep in mind that I am just discovering how "things" work in the DevOps world and my knowledge is pretty limited - especially in scripting (PS and C#).
So I have to figure it out how to set up some Javascript unit tests for an app - specifically to get the "Test Results Analyzer" widget up and running on the Jenkins website.
I am currently recycling code from another Jenkins pipeline (def) and using the already existing "run unit tests" stage in the makefile.include of the project which (from what the main Dev of the project told me) it never worked - was never tested - to try and make the tests run.
I thought the best way (without breaking anything on the main app) is to test locally via cygwin.
I have mapped the project as a workspace in Perforce and tried to run the command from the makefile.include
$ make runRoutingPlannerCSTests
Which is working about half way and after it prompts me with some missing files errors which I was not able to find anywhere on my local project folder.
CSC : error CS0006: Metadata file 'D:\src\project\ServicePlanning\BackendAPI\Comtec.Portal.OSPBackend.ApiModel\bin\Release\Comtec.Portnd [D:\src\project\ServicePlanning\Frontend_RoutingPlanner\Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests\Comtec.ServicePlanning
CSC : error CS0006: Metadata file 'D:\src\project\ServicePlanning\Frontend_RoutingPlanner\Comtec.ServicePlanning.Frontend.RoutingPlannngPlanner.dll' could not be found [D:\src\project\ServicePlanning\Frontend_RoutingPlanner\Comtec.ServicePlanning.Frontend.RoutingPlanntingPlanner.Tests.csproj]
CSC : error CS0006: Metadata file 'D:\src\project\ServicePlanning\Frontend_RoutingPlanner\Comtec.ServicePlanning.Frontend.RoutingPlannFrontend.RoutingPlanner.Model.dll' could not be found [D:\src\project\ServicePlanning\Frontend_RoutingPlanner\Comtec.ServicePlanning.Flanning.Frontend.RoutingPlanner.Tests.csproj]
Makefile.include:121: recipe for target `buildRoutingPlannerCSTests' failed
make: *** [buildRoutingPlannerCSTests] Error 1
and also
$ make runTests
Which gets stuck somewhere after running the Specrunner.html
######################################################
# run unit tests
######################################################
runTests: runRoutingPlannerJasmineTests runRoutingPlannerCSTests
runRoutingPlannerJasmineTests:
$(RoutingPlanner_TESTS_UTILITIES_DIR)/bin/phantomjs.exe $(RoutingPlanner_TESTS_DIR)/Scripts/jasmine.js $(RoutingPlanner_TESTS_DIR)/jsTests/SpecRunner.html
buildRoutingPlannerCSTests:
$(MSBUILD) `cygpath -a -w $(RoutingPlanner_TESTS_DIR)/Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests.csproj` $(MSBUILD_OPTIONS) /t:Build /property:Configuration=$(VS_CONFIG) /fileloggerparameters:LogFile=`cygpath -a -w $(RoutingPlanner_TESTS_DIR)/Comtec.ServicePlanning.Tests-Build-$(VS_CONFIG).log`
runRoutingPlannerCSTests: buildRoutingPlannerCSTests
#rm -f '$(shell cygpath -aw '$(RoutingPlanner_TESTS_DIR)/bin/$(VS_CONFIG)/Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests.trx')'
$(DOTNET_UNIT_MSTEST) /nologo '/testcontainer:$(shell cygpath -aw '$(RoutingPlanner_TESTS_DIR)/bin/$(VS_CONFIG)/Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests.dll')' '/resultsfile:$(shell cygpath -aw '$(RoutingPlanner_TESTS_DIR)/bin/$(VS_CONFIG)/Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests.trx')'
This section has an additional section at the begging of the script where the paths have been added.
RoutingPlanner_FRONTEND_API_DIR ?= $(RoutingPlanner_FRONTEND_DIR)/Comtec.ServicePlanning.Frontend.RoutingPlanner
RoutingPlanner_TESTS_DIR = $(RoutingPlanner_FRONTEND_DIR)/Comtec.ServicePlanning.Frontend.RoutingPlanner.Tests
RoutingPlanner_TESTS_UTILITIES_DIR = $(RoutingPlanner_TESTS_DIR)/Utilities/phantomjs-2.0.0-windows
RoutingPlanner_UTILITIES_DIR = $(PREPARESETUPDIR)/RoutingPlannerPortalUtilities
To be honest I am not even sure if I am following the right path to this since the steps I have found on the internet are different from what I found in the project and what I believe should be done.
For example: https://wiki.jenkins.io/display/JENKINS/Test+Results+Analyzer+Plugin
Mainly I believe this might be a simple "wrong path" issue but since my scripting skills are close to zero I am not sure what to modify and where.
I do not expect the solution at hand but I would really like to understand what the issues is or the proper way to actually make this work.
Thank you in advance.
I have a project targeting net461 (win7-x64) and netcoreapp2.0 (debian.8-x64).
When I build the project on my desktop everything works great.
Build is done by VS or in command line :
dotnet publish -c "Release" -o "xxxx" -f "net461" -r "win7-x64" xxxxx.csproj
dotnet publish -c "Release" -o "xxxx" -f "netcoreapp2.0" -r "debian.8-x64" xxxxx.csproj
But when it is done by our build server (triggered by Gitlab and runned by the Gitlab Runner in Powershell) everything build correctly in net461 but failed for netcoreapp2.0.
The error seems to be produced by Postsharp.
With the version 5.1.3-alpha I have an error about an assembly not found :
Error PS0264: Cannot find the assembly 'flexcel, version=6.19.0.0, culture=neutral, publickeytoken=cb8f6080e6d5a4d6'. Build your project with detailed verbosity to see the assembly loading log.
=> Weird fact, the case of the assembly is not correct, it is Flexcel, and again, it works well in net461.
So I tried to update Postsharp to 5.1.9-preview and now I have an another error :
POSTSHARP30
Error : [C:\Build\Gitlab\Runner\builds\17fef169\0\xxxx.csproj]
C:\Windows\system32\config\systemprofile.nuget\packages\postsharp\5.1.9-preview\build\PostSharp.targets(340,5): error : The process "C:\Windows\system32\config\systemprofile.nuget\packages\postsharp\5.1.9-preview\build\PostSharp-Tools.exe" failed with exit code 2. [C:\Build\Gitlab\Runner\builds\17fef169\0\xxxx.csproj]
For both versions (5.1.3-alpha and 5.1.9-preview), if I log in the build server and run the dotnet publish command in a console, it works well. The issue happens only when this is done by the CI build process.
Does anyone encountered the same kind of errors ?
Thanks.
Luc
PostSharp does not support building on Linux yet.
I don't know why or how, unbelievable, but without a change it is now working...
Really really strange
I'm new to linux and mono. I installed mono to a new Raspberry Pi machine using
sudo apt-get install mono-complete.
I also did the update and upgrade using apt-get.
I then followed the helloWorld examples in the Mono Basics page in mono-project website:
http://www.mono-project.com/docs/getting-started/mono-basics/
I managed to build and run the first 'Console Hello World' example using the following:
mcs hello.cs
mono hello.exe
However, when I tried the next example 'Winforms Hello World', I encountered the following error when running 'mcs hello.cs -pkg:dotnet':
error CS0006: Metadata file 'cscompmgd.dll' could not be found
However, it works if i use gmcs instead of mcs.
I googled here and there but no luck.
I can find a link to this file 'cscompmgd.dll' in '/usr/lib/mono/2.0' directory in my Raspberry Pi.
The installed mono version is 3.2.8 (returned by using 'mono --version').
Does anyone know why it works with gmcs but it doesn't work with mcs?
Thank you.
Solved by adding the -lib: option like this:
mcs helloWinforms.cs -pkg:dotnet -lib:/usr/lib/mono/2.0
Solution with adding
-lib:/usr/lib/mono/2.0
was not the best in my case (it broke a dependency on some 4.0 elements, specifically 'System.Threading').
Dirty, but works
Another, very dirty solution is to copy the
/usr/lib/mono/2.0/cscompmgd.dll
to your project folder (or wherever the Makefile is) and add
-r:cscompmgd.dll
when compiling (or add the filename after list of other included libraries specified by '-r').
There is probably a way to do that without copying the file, but that is beyond my capabilities.
So you end up with:
mcs helloWinforms.cs -pkg:dotnet -r:cscompmgd.dll
I'm trying to use the weka.classifiers.functions.MultilayerPerceptron as classifier on Weka using IKVM.NET but I keep getting the following exception:
"Could not load file or assembly 'IKVM.OpenJDK.SwingAWT, Version=7.0.4335.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies. The system cannot find the file specified."
I referenced every IKVM assembly I found on the IKVM folder, including IKVM.OpenJDK.SwingAWT, it's a very simple code:
var classifier = new weka.classifiers.functions.MultilayerPerceptron();
classifier.setOptions(weka.core.Utils.splitOptions("weka.classifiers.functions.MultilayerPerceptron -L 0.7 -M 0.3 -N 75 -V 0 -S 0 -E 20 -H a"));
And the exception is thrown whenever the first line is run, if I create another classifier, like NaiveBayes for instance, it works just well.
Does anyone knows anything I could try to fix this problem?
Thanks in advance!
the culprit turned out to be the class library, I had a class library called IA which stored all the weka stuff, and inside it I had a class called Analyzer which was trying to invoke the MultiLayerPerceptron classifier, so I "decorated" the class with a [MTAThread()] attribute and it is working now