chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control
http://projectroundhouse.org
917 stars 249 forks source link

dotnet-roundhouse can't find Antlr #352

Closed davidvedvick closed 5 years ago

davidvedvick commented 5 years ago

I've ran dotnet tool install dotnet-roundhouse -g --version 1.0.1 and I get the following error when trying to run rh:

Error:
  An assembly specified in the application dependencies manifest (rh.deps.json) was not found:
    package: 'Antlr3.Runtime', version: '3.5.1'
    path: 'lib/netstandard1.1/Antlr3.Runtime.dll'

This occurs on both my Windows box, and within a Linux docker container, so it seems to be platform independent.

erikbra commented 5 years ago

Hi, danrien. I had experienced the same, when I used the bits from the build server. I did not experience it with the package I uploaded to Nuget (which is the one you are installing), but apparently this is the problem I thought it was. I will look into it.

I found this earlier today, and I suspect it might be a related issue: https://github.com/dotnet/coreclr/issues/13542

davidvedvick commented 5 years ago

Thanks! Is there a specific version of the dotnet SDK you are using? We can use that SDK version specifically in our docker container if need be (we're using latest).

erikbra commented 5 years ago

I think maybe this is because of a mismatch between SDK version and runtime version on the target system, though I'm not sure, just a theory. I had a similar issue on a win box in the office, but it complained about a different dependency. Maybe I'm not including the right stuff in the package (bin instead of publish, perhaps?) Not sure, I need to look a bit more into it.

Do you have a publicly available Dockerfile that I can use for testing/reproducing the problem? And maybe a little step-by-step guide? My knowledge of docker is at pre-school level (I am using it, but only for very simple things)

davidvedvick commented 5 years ago

Yep! I have a repo out here - https://github.com/namehillsoftware/dotnet-core-roundhouse/blob/feature/use-dotnet-tool/Dockerfile

If you have docker installed (if on Windows, make sure your containers are set to run in Linux mode fails on Windows containers as well), you can repro the issue easily by just running

docker run namehillsoftware/dotnet-core-roundhouse:feature_use-dotnet-tool

To dig into the container itself and try to poke around, I usually do something like the following:

docker run -it --entrypoint=bash namehillsoftware/dotnet-core-roundhouse:feature_use-dotnet-tool
erikbra commented 5 years ago

Thanks.

I think I sorted out the issue. I hadn't run dotnet publish before packaging the thing, so all external references were not in the package.

Could you please try the 1.0.2 RC 1 from NuGet, and tell me if it solves your problem? I think it should.

https://www.nuget.org/packages/dotnet-roundhouse/1.0.2-rc.1

davidvedvick commented 5 years ago

Will do! I don't see that version up on Nuget yet, but I'll be anxiously awaiting its arrival.

erikbra commented 5 years ago

It's still validating (automatic thingy), but if you're impatient, you can (hopefully) get it off the MyGet feed: https://www.myget.org/F/roundhouse/api/v3/index.json

erikbra commented 5 years ago

It's available on Nuget now, @danrien - I'd appreciate if you'd try it and report back if it works or not.

davidvedvick commented 5 years ago

@erikbra that seemed to do the trick! Nice one! I just upgraded the image in my repository as well.

erikbra commented 5 years ago

Lovely. I'll release a 1.0.2 stable soon, then.

erikbra commented 5 years ago

Solved in #353