Hello pega Team,
I need support regarding one issue. When I validate a script, it works fine, but when I run the process, an error occurs: “Could not load file or assembly ‘Microsoft.AspNetCore.StaticFiles, Version=2.2.0’”.
Any adivece here?
Hello pega Team,
I need support regarding one issue. When I validate a script, it works fine, but when I run the process, an error occurs: “Could not load file or assembly ‘Microsoft.AspNetCore.StaticFiles, Version=2.2.0’”.
Any adivece here?
@MilchoP9 The error you’re seeing “Could not load file or assembly ‘Microsoft.AspNetCore.StaticFiles, Version=2.2.0’” usually means that the required .NET library is either missing or not properly referenced in your application. While validating the script might succeed because it doesn’t actually run the full process, executing it requires all dependencies to be present. To fix this, install the missing package using NuGet by running Install-Package Microsoft.AspNetCore.StaticFiles -Version 2.2.0 in the package manager console or add it to your .csproj file. Make sure your application targets a compatible .NET Core version (like 2.2) and that all required libraries are included during deployment. Rebuild your solution after making these changes to ensure the assembly is loaded correctly.
@MilchoP9Please ignore the AI response before mine. It seems like you’ve likely created a script using a third-party assembly. Make sure you place that assembly and any of its dependencies into %AppData%\Pegasystems\PublicAssemblies when you reference them from Studio. Re-add those references to your project from the Project properties and they should be attached with the deployment package when you create one. If not, you can attach them manually by selecting Add->Advanced->Deployable File.
@ThomasSasnett , I’ve added manually and it works. Thaks