Hi, I'm to add third party vertex DLLS in commerce runtime project part of commerce SDK. Now, when I try to build package its not adding DLLS in "EXT" folder of "commerce SDK" package. can anyone help me out how to resolve this issue. Thanks
Announcements
Hi, I'm to add third party vertex DLLS in commerce runtime project part of commerce SDK. Now, when I try to build package its not adding DLLS in "EXT" folder of "commerce SDK" package. can anyone help me out how to resolve this issue. Thanks
I can see the dependencies are having some conflicts. Can you share what is the issue for references.
Hi Sergey,
Thanks for you kind help.
BR,
Umar Javed
You are providing some more details but still not enough to reproduce the problem on my side - I'm not familiar and don't own the dlls you are talking about. I recommend you to advance in small steps to figure out which one results in a problem:
1. Use Samples with no changes and make sure they work
2. Add a small piece of extension and make sure they still work
3. Repeat the step #2 until it stops working and then analyze the delta
Hi Sergery,
You have mentioned the steps to add a class library in Commerce SDK. I got your point.
In my case, The Commerce SDK was working fine and adding all the project DLLs in EXT folder of Package on building the CSU solution.
Then, I need to add Vertex (third party) code in Commerce SDK to calculate tax.
The Vertex provided me Retail SDK (Legacy CSU Package ) of CSU Code. I just manually converted Retail SDK to Commerce SDK.
Here is the steps.
1. Added Vertex Folder in CommerceRuntime Project.
2. Add Commerce SDK same folder pattern in Vertex i.e added Entities, Controller, Messages, Request Handler folders in Vertex Folder
3. Added Supporting DLLs of Vertex in CommerceRuntime references.
See the Snapshot of Commerce SDK.
Then build the project and it's not working properly.
Thanks
>... in my case, I need to add third party code to my CSU package. ...
In my above examples I described all the steps I made to produce the MyClassLibrary.dll which playis the role of the "third party code" - that essentially a DLL produced completely outside of the SDK.
>... The third party code is in Retail SDK format. ...
Can you please be more specific and describe what you meant by saying "Retail SDK format" exactly and how that differs from the example I outlined in my previous message?
>... and add all the code in format of Commerce SDK. ...
What do you mean exactly by saying the "format of Commerce SDK" ?
>... When I go for build, it created package but there is no dlls in ext folder. ...
Not sure I understand what you meant exactly - are you saying you complied the CommerceRuntime project and as a result you are not seeing ANY DLLs in the EXT folder at all ? If the EXT folder contained the dll prior the modifications you made but the EXT folder is empty after the modifications then, most likely, there were build warnings/errors - did you see any?
>... I also tried the above method but it still doesn't working. ....
When you say "above" - did you mean the one I outlined in my previous message? If so - please be very specific as I did and provide fully reproducible steps so I could try them out on my box, so far you are not providing enough details to help you further.
Hi Sergey,
In my case, I need to add third party code to my CSU package. The third party code is in Retail SDK format.
I just created a new folder in Commerceruntime project. and add all the code in format of Commerce SDK. Then I added third party DLLs in reference of commerceruntime project as well editing the csproj file of commerceruntime project.
When I go for build, it created package but there is no dlls in ext folder.
Before adding new code, the Commerce SDK working fine and also dropping all DLLsin ext folder.
I also tried the above method but it still doesn't working.
Thanks.
I could not reproduce the issue. This is what I did:
1. Created netstandard 2.0 Class Library to be used in my Retail Server extension. I put there the below class:
public class MyExtensionUtility
{
public System.DateTimeOffset GetCurrentTime()
{
return System.DateTimeOffset.Now;
}
}
As a result of this step I have the following DLL generated: MyClassLibrary\bin\Debug\netstandard2.0\MyClassLibrary.dll
2. Cloned the version release/9.40 from GitHub
3. Opened the solution in Visual Studio 2022
4. Modified the project file by adding there this section right before the closing </Project> tag:
<ItemGroup>
<Reference Include="C:\Users\<MyUserNameIsHere>\source\repos\MyClassLibrary\bin\Debug\netstandard2.0\MyClassLibrary.dll" />
</ItemGroup>
5. Modified the file UnboundController.cs
by including there the below method which depends on the above created external DLL:
[HttpGet]
[Authorization(CommerceRoles.Anonymous)]
public Task<System.DateTimeOffset> GetCurrentTime()
{
System.DateTimeOffset result = new MyExtensionUtility().GetCurrentTime();
return Task.FromResult(result);
}
6. Re-built the solution and looked into the folder bin\Debug\netstandard2.0\CloudScaleUnitExtensionPackage\RetailServer\Code\bin\ext under the ScaleUnit, all expected files were there:
So, if that doesn't work for you please provide very detailed repro steps on pair with what I did above.
yes,
I have added these dlls by right clicking to references (manually added from my local machine location) and yes extension code referencing to those dlls. When I build project the package don't contain any commerce runtime dlls.
Thanks
How did you add the DLLs to the CRT extension project? Is your extension code referencing those DLLs ?
Zain Mehmood
462
Moderator
Danny Bilodeau
156
Moderator
Laurens vd Tang
120
Super User 2025 Season 1