454,424 Members | 1,376 Online
Need help? Post your question and get tips & solutions from a community of 454,424 IT Pros & Developers. It's quick & easy.

# Assembly and Type Name

 P: n/a Hi, When I want to specify a type \in web.config or app.config files, I have to type it like this: type="Microsoft.WCF.Documentation.EnforceGreetingF aultBehavior, HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" The name is usually long especially if it is a strongly named assembly and we have to type PublicKeyToken. Is there any tool that I can use to copy and paste the type name? Thank you, Max Jun 27 '08 #1
5 Replies

 P: n/a I don't know if there is an easier way - but I usually just throw something like below into the code and copy it from the output window... Debug.WriteLine(typeof(AttributeCollection).Assemb lyQualifiedName); Jun 27 '08 #2

 P: n/a For the full type name you need to put in configuratin file, it is actually called "Assembly qualified name". For complex type and assmebly, I usually use the following code to print them out: ================== Type type = typeof(System.Net.Cookie); string fullname = type.AssemblyQualifiedName; Response.Write("
" + fullname); ========================= Or you can also use some tool such as reflector to inspect assembly's FullName and append them to the Full typename so as to make up the Full assembly qualified type name. Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead 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: ms****@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- >From: "Max2006" Subject: Assembly and Type NameDate: Tue, 24 Jun 2008 20:56:43 -0400 >Hi,When I want to specify a type \in web.config or app.config files, I have to >type it like this:type="Microsoft.WCF.Documentation.EnforceGreeting FaultBehavior,HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"The name is usually long especially if it is a strongly named assembly andwe have to type PublicKeyToken.Is there any tool that I can use to copy and paste the type name?Thank you,Max Jun 27 '08 #3

 P: n/a Hi Steven, Could you refer me to any documentation that explains the syntax for "Assembly qualified name"? I had a look at this: http://msdn.microsoft.com/en-us/library/k8xx4k69.aspx However, it doesn't explain the endpointValidate section here: "Microsoft.ServiceModel.Samples.EndpointValidateEl ement, endpointValidate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Thank you for help, Max "Steven Cheng [MSFT]" " + fullname); ========================= Or you can also use some tool such as reflector to inspect assembly's FullName and append them to the Full typename so as to make up the Full assembly qualified type name. Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead 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: ms****@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- >>From: "Max2006" Subject: Assembly and Type NameDate: Tue, 24 Jun 2008 20:56:43 -0400 >>Hi,When I want to specify a type \in web.config or app.config files, I have to >>type it like this:type="Microsoft.WCF.Documentation.EnforceGreetin gFaultBehavior,HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"The name is usually long especially if it is a strongly named assembly andwe have to type PublicKeyToken.Is there any tool that I can use to copy and paste the type name?Thank you,Max Jun 27 '08 #4

 P: n/a On Jun 25, 4:52 pm, "Max2006"

 P: n/a Hi Max, As for the Assembly Qaulified name, it is actually combined with two parts: 1. The full type name 2. The full assemby name For the type's fullname, it's quite straightforard, just [Namespace]+[TypeName] For assembly full name, you can refer to the following reference: #Assembly Names http://msdn.microsoft.com/en-us/libr...69(VS.71).aspx #Assembly Display Names http://blogs.msdn.com/suzcook/archiv.../29/57137.aspx a full assembly name contains [AssemblyName], [Version],[Culture],[Public Key Token] Sincerely, Steven Cheng Microsoft MSDN Online Support Lead 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: ms****@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- >From: "Max2006" References: >Subject: Re: Assembly and Type NameDate: Wed, 25 Jun 2008 11:52:23 -0400 >Hi Steven,Could you refer me to any documentation that explains the syntax for"Assembly qualified name"?I had a look at this:http://msdn.microsoft.com/en-us/library/k8xx4k69.aspxHowever, it doesn't explain the endpointValidate section here:"Microsoft.ServiceModel.Samples.EndpointValidateE lement, endpointValidate,Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"Thank you for help,Max "Steven Cheng [MSFT]" For the full type name you need to put in configuratin file, it isactuallycalled "Assembly qualified name". For complex type and assmebly, Iusuallyuse the following code to print them out:================== Type type = typeof(System.Net.Cookie); string fullname = type.AssemblyQualifiedName; Response.Write("
" + fullname);=========================Or you can also use some tool such as reflector to inspect assembly'sFullName and append them to the Full typename so as to make up the Fullassembly qualified type name.Hope this helps.Sincerely,Steven ChengMicrosoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments andsuggestions 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 serviceprovided. You can send feedback directly to my manager at:ms****@microsoft.com.================================================= =Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif >ications.================================================= =This posting is provided "AS IS" with no warranties, and confers norights.-------------------- >>>From: "Max2006" Subject: Assembly and Type NameDate: Tue, 24 Jun 2008 20:56:43 -0400 >>>Hi,When I want to specify a type \in web.config or app.config files, I have to >>>type it like this:type="Microsoft.WCF.Documentation.EnforceGreeti ngFaultBehavior,HostApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"The name is usually long especially if it is a strongly named assembly and >>>we have to type PublicKeyToken.Is there any tool that I can use to copy and paste the type name?Thank you,Max Jun 27 '08 #6

### This discussion thread is closed

Replies have been disabled for this discussion.