Tuesday, December 11, 2007

Final Post?

For the last year I have been using this blog as a sort of playground, however, now that the mirror site is up internally on Microsoft at http://sharepoint.microsoft.com/blogs/levelorange I feel that it may be prudent to start directing people that way.

Thank you for all the support that I have received and this may or may not be the last post ;) We shall see.

Cheers

Monday, December 10, 2007

Finding Assembly Information

Once again, in an attempt to segment information to prevent information overload, this is a simple one. In MOSS development, you will many times have to reference assemblies by class name and assembly name along with the public key token. To accomplish this I use a tool called .NET reflector which can be located here.

If you drag your assembly on the user interface of the tool, you can click on it and see the assembly information as such:


If you drill down to the actual class, you can see the class information as such:


Promised it would be short but invaluable if this is the first time you've seen the tool.

GAC’ing an assembly

Probably not a blog-able subject but wanted something to link to so here goes.

  1. First thing to do here is strong-name your assembly. Simply go to properties on the project and signing section.


  2. Build your assembly by pressing F7 or however you wish
  3. From here you can use gacutil, add gacutil to a post-build event or simply navigate to dll and drop it into "c:\windows\assembly"

Find GUID of List

Ok, I have decided to compartamentalize some of these into just a couple searchable topics that I can link to in other things so this is simply going to find out the GUID of an existing list. There are several ways we can do this including simply writing a quick code snippet. Technically, we should even be able to write a quick Console App that spits out the GUID based on a URL. However, we can simply look at the URL after going to the list we want.


 

See (If you look at the URL you will see a URLEncoded GUID at the List=: )


 

Generating a new GUID

Inevitably in MOSS if you are doing custom development there will come a point where you will have to generate new GUIDs for your features, lists, fields and whatever else. There is a quick and easy way of doing this from Visual Studio.

Simply open Visual Studio and go to Tools à Create GUID



 

Choose Registry Format and then Copy. Done and Done. Know that certain GUIDs in MOSS will complain if you have curly braces {} and some will not.

If you are more of a command-line person you can get to the same screen by typing:

guidgen


 

in the Visual Studio Command Window