Redistributing a WinForms component with design-time functionality in a separate DLL without admin rights

半腔热情 提交于 2020-01-16 07:52:31

问题


I am trying to modify the installation package for one of our legacy WinForms component. The goal I want to achieve is to avoid elevating privileges and do all works without admin rights. The problem is that the component is implemented in two DLLs - the core functionality redistributed with compiled apps and the design-time functionality needed only for the WinForms designer. To provide all design-time features of the component, VS should "know" how to find the design-time DLL.

Earlier we created the corresponding records in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx registry key, and this has been working ok for years - starting from VS 2005. However, we can't write to this registry key without admin rights. Other ways to do what I need are adding assemblies to GAC (using gacutil or from code using the System.EnterpriseServices.dll) or copying DLLs to the PublicAssemblies folder of VS, but they all require admin rights too.

Is there another reliable way to redistribute the design-time DLL without admin rights that works, at least, for all latest versions of VS starting from VS 2010?

来源:https://stackoverflow.com/questions/48766967/redistributing-a-winforms-component-with-design-time-functionality-in-a-separate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!