Can I deploy a farm solution to my site collection only
-
30-09-2020 - |
Question
I have created a visual web part using visual studio of type "Farm solution", then I add the wsp file using the following command:-
PS C:\Users\Administrator> Add-SPSolution c:\RedirectManagedMetaData.wsp
after that this solution appeared under the "CA>>System Setting>>Manage Farm Solutions", as follow:-
now from the central administration I only have the option to deploy it to web application/s level, while in my case I only need this wsp solution to be inside single site collection and not to all site collections within my web application. So is there a way to deploy a farm solution to specific site collection/s?
Solution
No, there is no way to deploy a solution to a particular site collection. A solution is deployed either Globally to all web applications or a single web application. It is the feature inside the solution which can be deployed to a farm/webapplication/site collection/web.
OTHER TIPS
Usually you deploy your farm solution to web application, but you activate solution's feature(s) only on desired site collection.
Set Your Feature Scope to "Site" instead of "Farm".