jakeswenson / BitBetter

Modify bit warden to provide my own licensing for self hosting
510 stars 115 forks source link

Dotnet Build Error with Bitwarden 2.13.2 / 1.33.1 #65

Closed jensschaerer closed 4 years ago

jensschaerer commented 4 years ago

I tried to update Bitwarden to the newest release and I'm stuck at building BitBetter images now. I get an error that "The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.". Please see log below

  bitBetter -> /root/BitBetter/src/bitBetter/bin/Debug/netcoreapp2.0/bitBetter.dll
  bitBetter -> /root/BitBetter/src/bitBetter/bin/Debug/netcoreapp2.0/publish/
Sending build context to Docker daemon  1.478MB
Step 1/4 : FROM bitwarden/api
latest: Pulling from bitwarden/api
Digest: sha256:64c3f7d5cc706573162fca862af4804c7fb7eb96605f7536f5b12a81b5581311
Status: Image is up to date for bitwarden/api:latest
 ---> b228f291a247
Step 2/4 : COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
 ---> Using cache
 ---> 3a7c8b42ee4c
Step 3/4 : COPY ./.keys/cert.cert /newLicensing.cer
 ---> Using cache
 ---> b4baacc2b6b4
Step 4/4 : RUN dotnet /bitBetter/bitBetter.dll &&     echo "modified dll" &&     mv /app/Core.dll /app/Core.orig.dll &&     mv /app/modified.dll /app/Core.dll &&     echo "replaced dll" &&     rm -rf /bitBetter && rm -rf /newLicensing.cer &&     echo "cleaned up"
 ---> Running in 5fae4e4c0e72
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
  - The following frameworks were found:
      3.1.2 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=debian.10-x64
The command '/bin/sh -c dotnet /bitBetter/bitBetter.dll &&     echo "modified dll" &&     mv /app/Core.dll /app/Core.orig.dll &&     mv /app/modified.dll /app/Core.dll &&     echo "replaced dll" &&     rm -rf /bitBetter && rm -rf /newLicensing.cer &&     echo "cleaned up"' returned a non-zero code: 150

Any ideas how to fix this one?

Edit: I'm on Ubuntu 16.04, dotnet is installed. Previous installation with Bitwarden 2.11.0 worked

JeffAlyanak commented 4 years ago

@TechSigns Can you confirm that you're using the latest commit for Bitwarden? What's the commit hash?

jensschaerer commented 4 years ago

Never mind, thanks for the hint. I was on an old repository of BitBetter, don't know why. But now the update worked. Thanks!