Open azzlack opened 1 year ago
Hi,
I had the same issue using the EphemeralMongo7.runtime.ubuntu.22.04-x64 package.
After the build you should find a runtimes folder inside the bin directory. Inside the runtimes folder you should see the ubuntu.22.04-x64 folder, but the test is expecting a folder named linux-x64.
A temporary workaround for this is create a after build task to copy those files to a new linux-x64 folder.
<Target Name="CopyMongoRuntimes" AfterTargets="Build" Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<Message Text="Executing CopyMongoRuntimes task" Importance="High" />
<ItemGroup>
<FilesToCopy Include="$([MSBuild]::EnsureTrailingSlash('$(TargetDir)runtimes\ubuntu.22.04-x64\'))**\*.*"/>
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$([MSBuild]::EnsureTrailingSlash('$(TargetDir)runtimes\linux-x64\'))%(RecursiveDir)"/>
<Message Text="Copied CopyMongoRuntimes files" Importance="High" />
</Target>
@wcgomes - thanks for this workaround. I've recently had to work on a project with MongoToGo (which does not support linux) and moved to EphemeralMongo but encountered the OpenSSL issue which lead me here.
@asimmon - I think the issue may be related to the the #43 PR. If I understand the code properly - in the DownloadMongoTask class, there are ProjectInfo objects set for the Ubuntu 22.04 runtime for Mongo6 and 7.
new ProjectInfo("EphemeralMongo7.runtime.ubuntu.22.04-x64", "ubuntu2204", "x86_64", "targeted", 7, "ubuntu.22.04-x64"),
However, the Rid property (last value in setting ProjectInfo) is to ubuntu.22.04-x64 and NOT linux-64 . I downloaded the repo but I'm getting runtime issues in compiling and such so can't really try out. Is is possible that setting the Rid property to linux-64 for the Ubuntu 22.04 runtime would solve this issue? Or is that intentional to have a new Rid?
Getting the following error when building on Ubuntu 22.04 in our Docker CI environment:
I am using the package references mentioned here: https://github.com/asimmon/ephemeral-mongo/issues/36#issuecomment-1698390299
The commands that i'm running when testing are as follows: