Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script dependency problem #38

Open
thomasjm opened this issue Jul 10, 2017 · 7 comments
Open

Build script dependency problem #38

thomasjm opened this issue Jul 10, 2017 · 7 comments

Comments

@thomasjm
Copy link
Contributor

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.

@bocajnotnef
Copy link

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'.

@den-run-ai
Copy link
Contributor

related?

travis-ci/travis-ci#6171

@zabirauf
Copy link
Owner

@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.

@sainianubhav
Copy link

Travis-ci has hid their issues. What's the solution?

@thomasjm
Copy link
Contributor Author

thomasjm commented Feb 6, 2019

@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 .

@ChandraSannamuri
Copy link

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

@bartlomiejmucha
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants