Would that not mean that all the code in the add-ins is then in a much
less
trustworthy location on the PC?
Hi Mike,
I'd like to share my point of view about "trustworthy". By default, the
assemblies located on local computer are granted the Full Trust permission
set. So putting add-in assemblies in the ProgramData folder really doesn't
make any differences to putting them in the ProgramFiles, in assembly's
Evidence point of view (unless you manually make a permission set that
tells CLR the ProgramData folder should be less trustworthy). Besides, if
we sign the add-in assemblies with stong names, we don't need to worry
about them being tampered either.
Is there no way of just moving the 'cache' files that System.AddIn creates
to the new location?
If you mean the "cache" files for add-ins, then the answer is no.
The add-in assemblies always stay with the AddIns.store in current version.
We can find this out using the .NET Reflector tool and dig into
System.AddIn.Hosting.AddInStore class, from its private static method
"BuildAddInCache" code:
WriteCache(state, rootDir, "AddIns.store", now);
where the rootDir is the root directory for the add-ins. And in the
WriteCache method, it just uses Path.Combine to get a full path to the
cache file.
However, the pipeline segments cache file and the add-in cache files
needn't to be under the same root directory, as we can find out in the
RebuildAddIns / UpdateAddIns methods' references. We can specify seperate
paths for them.
So if your application's spec says the users don't need an Administrator
credential to add / remove / update add-ins, putting the add-ins in
ProgramData would be a better choice. If your application's spec says a
user must be an Admin to add / remove / update add-ins, then I'd just put
the add-ins in the ProgramFiles folder just like now, and users have to run
the application as Administrator to make changes to the add-ins.
Please let me know if this address your concerns, and I'm always ready to
help.
Thanks,
Jie Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.