詹金斯没有找到 GDIplus 依赖
Jenkins not finding GDIplus dependency
我正在为一个项目使用单个分支管道,目前我收到此错误。
[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.
每当我 运行 在本地进行相同的单元测试时,它们都会通过,但是当通过 jenkins 时,它无法加载 gdiplus.dll 我很茫然,因为我不知道为什么会这样以这种方式行事。有没有人遇到过类似的事情?如何手动添加 DLL?
如果有人遇到此问题,解决此问题的最佳方法是在 docker 容器中安装 gdiplus。然而,即使在你安装了 docker 容器之后,你仍然会遇到这个错误,因为 Linus 以其无限的智慧正在寻找 gdiplus.dll 而不是 libgdiplus.so 所以需要 link它…………
这里是 link 经过数小时搜索后我找到解决方案的地方
https://en.code-bude.net/2017/05/08/net-core-gdiplus-dll-not-found-in-linux/
这是我使用的代码并且可以正常工作
apt-get install -y libgdiplus \
&& cd /usr/lib ln -s libgdiplus.so gdiplus.dll
我正在为一个项目使用单个分支管道,目前我收到此错误。
[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.
每当我 运行 在本地进行相同的单元测试时,它们都会通过,但是当通过 jenkins 时,它无法加载 gdiplus.dll 我很茫然,因为我不知道为什么会这样以这种方式行事。有没有人遇到过类似的事情?如何手动添加 DLL?
如果有人遇到此问题,解决此问题的最佳方法是在 docker 容器中安装 gdiplus。然而,即使在你安装了 docker 容器之后,你仍然会遇到这个错误,因为 Linus 以其无限的智慧正在寻找 gdiplus.dll 而不是 libgdiplus.so 所以需要 link它…………
这里是 link 经过数小时搜索后我找到解决方案的地方
https://en.code-bude.net/2017/05/08/net-core-gdiplus-dll-not-found-in-linux/
这是我使用的代码并且可以正常工作
apt-get install -y libgdiplus \ && cd /usr/lib ln -s libgdiplus.so gdiplus.dll