开发者

Importing / referencing an external Silverlight dll library from a workflow 4.0 Activity

开发者 https://www.devze.com 2023-02-15 13:34 出处:网络
I have created a Silverlight class library which holds a lot of the common utility methods I use day to day in my Silverlight development.

I have created a Silverlight class library which holds a lot of the common utility methods I use day to day in my Silverlight development.

I am starting to play around with Workflow and would like to reuse this common dll. After referencing this dll in my workflow project I see a yellow warning icon beside it.

Importing / referencing an external Silverlight dll library from a workflow 4.0 Activity

I can use the functionality from this dll when creating ‘Code Activities’ without issue. After adding the using statement for it all works AOK.

using EquinoxeAISManagementSystem.Comm开发者_如何学Pythonon.Helpers;

BUT when I try to import the dll from the activity designer, I do not see the dll in the import window.

If I edit the XAML and add it directly, I get a warning.

Importing / referencing an external Silverlight dll library from a workflow 4.0 Activity

Is it possible to reuse Silverlight dlls?


I believe I can answer my own question.
The project EquinoxeAISMAnagementSsystem.Common is part of another solution. I had added this single project for the other solution into my new workflow solution (which I was having this issue in).

When I added the reference to the EquinoxeAISMAnagementSsystem.Common.dll initilly, it was by referencing the project in the workflow solution.

Importing / referencing an external Silverlight dll library from a workflow 4.0 Activity

This seems to be the cause of the issue (for workflow anyway). I was able to correct this issue by adding the EquinoxeAISMAnagementSsystem.Common.dll to a common folder where I keep all my external dlls (for ease of use).

..\Projects\EquinoxeAISManagementSystem.DLL\ 

I set up the output destination folder for this EquinoxeAISMAnagementSsystem.Common project to the folder above. I was then able to add the reference to Common.dll by browsing directly to the folder above.

Hay presto, all works.

I’m not sure id this is the ‘correct’ way to do things, but I needed to get over this hump. I would be interested in anyone’s comments and if there is a correct(er), why to fix this issue.

Thanks ….

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号