Try our conversational search powered by Generative AI!




What procedure are you using for GUID's when creating a new Content Type? When I see example of code that people have written there is often a GUID defined like this:

[ContentType(GUID = "abcdefg-1111-4f56-8a13-28ff2fc62960")]
public class SomePage : PageData

How is that GUID created? Are you entering the database and see what GUID that was generated for a particular class or how is the GUID chosen, in this case the "abcdefg-1111-4f56-8a13-28ff2fc62960"?

Apr 12, 2013 15:15

If you are using Visual Studio 2010 - there is a GUID creation option.

Tools -> Create GUID -> Registry Format

and then trip off the surrounding { }


This is how i've always created my GUIDs for Page and Block types.  If this is a new page type or block type, if you supply the GUID in code, when the site builds and the page or block type is added, EPi will use the GUID you provided for that type.

Apr 12, 2013 15:41

Thanks Mike!

Apr 12, 2013 15:42

You can also use the Visual Studio integration. It creates the GUID for you when you're using the create new template command.

Apr 12, 2013 16:20

Throwing in another option...

You could also set up a macro in Visual Studio to generate the GUID for you. Check out

Apr 12, 2013 17:44

There is also some external websites where you can create GUIDs. My favorite is a site that can generate several at the same time.

Jan 18, 2015 20:27

I guess the easiest thing to do, if you're using resharper, is to type nguid and press Tab.

Feb 13, 2017 18:02
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.