icsharp
icsharp copied to clipboard
Build script dependency problem
There seems to be a problem with building ICSharp from scratch in a Docker container, using Ubuntu 16.04.
I've been doing it like this:
RUN apt-get install -y mono-complete
RUN git clone --recursive https://github.com/zabirauf/icsharp.git /tools/icsharp
WORKDIR /tools/icsharp
RUN bash ./build.sh
However, this fails when running Engine/build.sh
with the following error:
+ mono ./.nuget/NuGet.exe restore ./iCSharp.sln
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
All packages listed in packages.config are already installed.
+ cd ./Engine
+ '[' '' == brew ']'
+ ./build.sh
+ mozroots --import --sync --quiet
+ mono ./.nuget/NuGet.exe restore ./ScriptCs.sln
Unable to find version '1.9.2' of package 'xunit.runners'.
The ScriptCS submodule comes with a .nuget/NuGet.exe
at version 2.8.60318.667
, which is kind of old. In the past, I've worked around the problem by running bash -c "cd Engine; mono ./.nuget/NuGet.exe update -self
to update to a newer version of NuGet, which for some reason resolved the problem. However, the latest version of NuGet (4.3.0
ish) is now so new that it fails with a different error, saying "the assembly name is invalid" for ScriptCs.sln
-- it doesn't seem able to parse the file anymore.
I'm able to get things to work by picking a medium-old NuGet.exe
version--I inserted this line into my Dockerfile to use version 3.3.0
:
RUN bash -c "cd Engine; wget https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe -O ./.nuget/NuGet.exe"
Anyway, long story short: something is weird and fragile about NuGet.exe/package dependencies in the current version of ICSharp.
I'm also having this problem under Ubuntu 17.04, with the same error: Unable to find version '1.9.2' of package 'xunit.runners'.
related?
https://github.com/travis-ci/travis-ci/issues/6171
@thomasjm You can use the Dockerfile created by @3Dcube. You can find it here
https://github.com/3Dcube/docker-jupyter-icsharp
I just tried it and it works and I see that is using the same solution mentioned in the travis issue pointed by @denfromufa.
Travis-ci has hid their issues. What's the solution?
@zabirauf thanks -- if this is the solution, how about updating the build script in this repo to do it this way?
It seems like lots of people are being bitten by this, see also #42 .
i am also facing the same issue in Mac, while trying to build in terminal with following command
(base) $ bash ./build.sh brew
mozroots --import --sync --quiet ./build.sh: line 7: mozroots: command not found
I'm building it on Windows 10, but today I got the same error.
There is a solution for this problem:
Unable to find version '1.9.2' of package 'xunit.runners'.
Go the Engine\.nuget
folder and type nuget.exe update -self
.
The Nuget.exe
file will update to the latest version. It fixed the issue for me.
I then opened the `Engine\ScriptCs.sln' and did a rebuild.
Re the second .nuget
folder under the root of the repo: I just deleted it completely according to steps described here: https://docs.microsoft.com/pl-pl/nuget/consume-packages/package-restore#migrate-to-automatic-package-restore-visual-studio