-
Notifications
You must be signed in to change notification settings - Fork 247
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
PostgreSQL - System.TypeInitializationException for Npgsql.TypeHandlerRegistry #363
Comments
Hi, @Roemer , thanks for reporting. Could you please specify which version of RoundhousE you are using? I know there have been some problems with the ILMerge that we run and some dynamic loading of types before, but that was with StructureMap (which we have removed the dependency on). I see we are using a quite old version of the NpgSql nuget package, it might be worth upgrading that one too. If you are in an environment with .net core sdk installed, could you please try installing roundhouse with |
I‘m using 1.0.3 from Nuget. Also tried using it in cake build (which should use the same) with the same result. In the end, I want to use it from cake build. |
OK, thanks. Could you please try to use the dotnet tool version, to see if the problem is there too? |
I now tested with another computer, same problem. Using the dotnet tool version works. |
OK, thanks a lot. So, there's probably an issue with the ILMerge and the npgsql library. I will try to get a PostgreSQL test environment up and running to verify. I am not experienced in Postgres, but using this container should do the trick, don't you think? https://hub.docker.com/_/postgres |
Yes, I'm also using this image (and pgadmin4 to administer it, but that's not needed for this test). All you need is the environment variable |
I could make it work in cake by using the new module feature from cake (
Not the best solution but at least it works and does not need further changes when the non-dotnetcore version is fixed, except for re-adding it as a tool in cake and remove the dotnetcore one. |
@Roemer , I made some changes to the merging, trying out Costura.Fody, which uses a different technique for merging the assemblies. Are you able to give your test a shot with the binaries from this pull request build, and see if it solves the problem? It it does, I am going to release a new version of RoundhousE with the fixes applied. https://ci.appveyor.com/project/chucknorris/roundhouse/builds/22069025/artifacts |
Works like a charm with the new executable 👍. With command line and also with cake. I also noticed that all identifiers (like database name) are converted to lower. Whereas Postgresql actually supports case sensitivity by default. The rule is, that if an identifier is inside quotes, it is case sensitive, if not, it is not case sensitive. Maybe that's something that should be considered in Roundhouse? |
Great, thanks for the testing. I'll merge it, then, and make a new release one of the next few days. Good point on case sensitivity, though. Could you please file a separate issue on it, so it's easier to solve it separately? |
I opened issue #366 for the case sensitivity. |
I now tried for an hour getting roundhouse to work with postgres. I've setup a new 11.1 instance and try to run roundhouse. I always get the following exception:
Sorry for German language but I hope you get the point:
I'm simply using rh.exe with the following command line:
I'm using Windows 10/64 bit. How can I solve this problem?
The text was updated successfully, but these errors were encountered: