You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
SDK fails with "Module checksum failed: Could not find '/app/'." when deployed in a Linux container on .NET 8
I'm in the process of upgrading some of my organization's .NET Framework apps to .NET Core. I updated the SDK from the deprecated one to Box.SDK.Gen 1.4.0.
I thought this issue might be similar to the AWS PublishReadyToRun issue, but I wanted to confirm they're related. It seems like in my case, Bouncy Castle is attempting to use Win32 calls in the Linux container.
Steps to Reproduce
I'm working with other teams at my organization to get a minimal example that reproduces the issue. These are the steps that are visible to me so far from our build process:
After investigation, I found out this issue can from the feature PublishSingleFile during the publish process, from the docs of MS, we can ExcludeFromSingleFile but it's not really working from my side.
I found a workaround for this issue from this comment, with some modification from my side, so you can try this:
I got it working. Thank you so much for your help!
In case others encounter something similar, in addition to the snippet provided that makes sure the BouncyCastle DLLs are in the Target folder after I restore, build, and publish, I also modified my Docker file to use the same pattern as the arguments to FilesToRemoveFromBundle to match the DLLs and copy them into the container in the same folder as the single file produced by the publish.
My csproj file with unrelated entries omitted
<ProjectSdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<AssemblyName>AppService</AssemblyName>
<RootNamespace>AppService</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReferenceInclude="Box.Sdk.Gen"Version="1.4.0" />
</ItemGroup>
<TargetName="ExplicitRemoveFromFilesToBundle"BeforeTargets="GenerateSingleFileBundle"DependsOnTargets="PrepareForBundle">
<ItemGroup>
<FilesToRemoveFromBundleInclude="@(FilesToBundle)"Condition="$([System.String]::new('%(Filename)').ToLower().Contains('bc-fips')) OR $([System.String]::new('%(Filename)').ToLower().Contains('bcpkix'))" />
</ItemGroup>
<MessageText="FilesToRemoveFromBundle '@(FilesToRemoveFromBundle)'"Importance="high" />
<ItemGroup>
<FilesToBundleRemove="@(FilesToRemoveFromBundle)" />
</ItemGroup>
</Target>
<TargetName="CopyFilesToRemoveFromBundle"AfterTargets="Publish">
<CopySourceFiles="@(FilesToRemoveFromBundle)"DestinationFolder="$(PublishDir)" />
<MessageText="Copied files to remove from bundle to '$(PublishDir)'"Importance="high" />
</Target>
</Project>
Description of the Issue
SDK fails with "Module checksum failed: Could not find '/app/'." when deployed in a Linux container on .NET 8
I'm in the process of upgrading some of my organization's .NET Framework apps to .NET Core. I updated the SDK from the deprecated one to Box.SDK.Gen 1.4.0.
My organization's C# architect notes that Bouncy Castle BC-FNA 1.0.2 is certified for use with .NET applications running on CLR 4.
I thought this issue might be similar to the AWS PublishReadyToRun issue, but I wanted to confirm they're related. It seems like in my case, Bouncy Castle is attempting to use Win32 calls in the Linux container.
Steps to Reproduce
I'm working with other teams at my organization to get a minimal example that reproduces the issue. These are the steps that are visible to me so far from our build process:
dotnet build --no-incremental -r linux-x64 --no-self-contained --no-restore --configuration Release AppService.sln
dotnet publish --no-build -c Release -r linux-x64 AppService/src/AppService.csproj -o ./Target --no-self-contained -p:PublishSingleFile=true
COPY Target/AppService app-bin
GetFolderItemsAsync
from the Box client's FoldersManagerExpected Behavior
A list of folders is returned.
Error Message, Including Stack Trace
Versions Used
.NET SDK: 1.4.0
.NET: 8.0.10
The text was updated successfully, but these errors were encountered: