views:

154

answers:

2

For example I wanted to create a simple plugin that supports multi-rename. I was thinking of something like a button that could be added to toolbar in windows explorer. But how do I do that and also can this be done in .net?

+3  A: 

This can be done, but it's not necessarily a good idea. You need to wrap the shell extension API, which is all COM based, so can be used from within .NET.

However, the problem arises if the user has any extensions using .NET 1.1. Version 2 of the CLR can't be loaded into an application loading v1.1 of the CLR, so this can cause some very odd behaviors. CLR 4 and .NET 4 addresses this by allowing in process side-by-side hosting of .NET.

Reed Copsey
+1 for " but it's not necessarily a good idea" and the rest of the answer.
David Stratton
+1 discussion and explanation of these issues: http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/
Mauricio Scheffer
+1  A: 

You can certainly write a shell extension in .net - it is actually quite easy although a tad bit tedious. Here is an example: http://www.codeproject.com/KB/cs/dateparser.aspx

Mikos
Deleted my post and added a +1 to yours for a better article.
David Stratton