I'm targeting 'netstandard2.0' and I have a C# class (present in the hardwarestation project) where I want to execute a stored procedure on the database. I'm using the below piece of code:
await databaseContext.ExecuteStoredProcedureNonQueryAsync("[ext].[ExternalGiftCardLogPurge]", parameters, resultSettings: null).ConfigureAwait(false);
}
In my project file I have the following:
<PackageReference Include="Microsoft.Dynamics.Commerce.Runtime.DataAccess.SqlServer" Version="9.48.24158.2" />
When I run the Store Commerce app and test this, I get the following error message:
Could not load file or assembly 'Microsoft.Dynamics.Commerce.Runtime.DataAccess.SqlServer, Version=7.0.0.0, Culture=neutral,
When I put the same code in a CommerceRuntime trigger (e.g. 'PurgeSalesTransactionsDataRequest') then it runds fine.
Anyone have an idea how to solve this? I don't even understand why it is asking for version 7.0.0.0 because this version is not even available in NuGet.
Hope someone can point me in the right direction.