Connected Webparts using the same Interface but different vs-solutions
-
07-12-2019 - |
Question
I built a sample containing two webparts(provider and consumer) in one vs-solution and it works great. So technicaly I know how connected webparts work.
I want to develop a provider webpart that passes a simple string via an interface to several other webparts.
In this post Do connectable webparts need to be in the same project? I read that my webparts don't need to be in the same project, but they are in one single solution.
Because I need to get my already developed webparts working with the "new" provider I can't add them to a single solution.
Here's my question:
How can I access/provide an Interface for multiple webparts in different vs-solutions?
What I tried already is to add a copy of my Iinterface.cs to my existing solutions and work work with this one, but my webparts can't find possible connections to each other after deploying them.
Thanks a lot Stefan
Solution
After a long period of trial and error I fount a solution.
I created a new vs-solution that only includes my interface.cs and deployed it to GAC.
I referenced this dll from the gac using the absolute path to it in my other solutions and now it's working well.