Wednesday, September 16, 2015

How do I add a column (meta data) to SharePoint folders?

My first thought is to modify the Content Type named Folder, but it is "sealed". (Microsoft locked the door!) So I created a new Content Type based on Folder, added the custom column, added the content type to the library and magically I found my custom folder type in the New dropdown. Here's the steps:


  1. Go to Site ActionsSite Settings 
  2. Click Site Content Types 
  3. Click Create
  4. Give the new content type a name such as "Enhanced Folder" or "Product Spec Folder"
  5. Set the parent content type group as Folder Content Types
  6. Set the parent content type to Folder
  7. Add the new content type to a Group. I put it back in the "Folder Content Types" group
  8. Click OK
  9. Scroll down to the columns section and click Add from new site column
  10. Name the column and set all the usual column options
  11. Repeat for any additional columns (Release Date, etc)
  12. Click OK
  13. Go to your document library
  14. Click Settings and Library Settings, or in 2010 click the Library ribbon tab and then click Library Settings
  15. Click Advanced and set Allow management of content types to Yes and click OK (this may already selected)
  16. Scroll down to Content Types and click Add from existing site content types and add your new folder content type
  17. Go to your document library and click the New dropdown, or the New button in the 2010 Document ribbon, and add your new folder!
  18. Go to the View dropdown and click Modify this view and add your new folder meta data columns (you will probably want to move them to just after the Name column)

Monday, September 14, 2015

How to find Runtime version of a DLL

What is Runtime version: ?

Runtime version is the .Net framework version that the library was built against. 

We can be able to find runtime version of our custom DLL using assembly reflection:

Sample code:

 System.Reflection.Assembly myDll = System.Reflection.Assembly.ReflectionOnlyLoadFrom("C:\\mySolution.dll");
            Console.WriteLine(myDll.ImageRuntimeVersion);\