{"id":44,"date":"2008-05-14T15:21:00","date_gmt":"2008-05-14T20:21:00","guid":{"rendered":"http:\/\/www.dontpapanic.com\/blog\/?p=44"},"modified":"2008-05-14T15:21:00","modified_gmt":"2008-05-14T20:21:00","slug":"adding-useful-visual-studio-external-tools","status":"publish","type":"post","link":"https:\/\/www.dontpapanic.com\/blog\/?p=44","title":{"rendered":"Adding Useful Visual Studio External Tools"},"content":{"rendered":"<div class=\"ExternalClass23BC8AA5395A4AD3BAB362A313B40E1F\">\n<div>\n<p>We add a couple of External Tools to our Visual Studio 2005 environment when teaching SharePoint classes to simplify some two common tasks encountered when developing for SharePoint.&#160; The first tool generates a unique <strong>Globally Unique Identifier<\/strong> (GUID) and places it in your clipboard so that you can paste it directly into Features or Solution manifests.&#160; The other tool can retrieive the Public Key BLOB and Token from a signed dll so that you can use them in custom webpart or dwp files, safe control entries, or custom code access security policies.&#160; Integrating these tools into the menu of Visual Studio makes using them much more convenient than the command line alternatives.<\/p>\n<p>Recently a student asked for a step by step guide to adding these external tools so they can add them to their own development environment.&#160; Rather than simply respond back to them by email I thought it would be worthwhile to document the steps here for others who might also be interested.<\/p>\n<p><strong><u>Implementing guidgen.exe<\/u><\/strong><\/p>\n<ol>\n<li>Select <strong>External Tools<\/strong> from the <strong>Tools<\/strong> menu in Visual Studio 2005. <\/li>\n<li>Click <strong>Add<\/strong> to add a new external tool to the menu.&#160; You will see the following dialog box.           <br \/> \n<p><a title=\"External Tools by pstorkoh, on Flickr\" href=\"http:\/\/www.flickr.com\/photos\/7962873@N07\/2492477380\/\"><img loading=\"lazy\" decoding=\"async\" alt=\"External Tools\" src=\"http:\/\/farm3.static.flickr.com\/2261\/2492477380_84746cd92b.jpg\" width=\"396\" height=\"391\" \/><\/a><\/p>\n<\/li>\n<li>\n<p>Fill in the following:            <br \/>&#160;&#160;&#160;&#160; <strong>C&amp;reate GUID<\/strong> for <em>Title              <br \/><\/em>&#160;&#160;&#160;&#160; <strong>C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools\\guidgen.exe <\/strong>for <em>Command<\/em>             <br \/>&#160;&#160;&#160;&#160; <strong>C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools<\/strong> for <em>Initial directory<\/em><\/p>\n<\/li>\n<li>Click <strong>OK<\/strong> to save the new menu entry. <\/li>\n<li>Select <strong>C<u>r<\/u>eate GUID<\/strong> from the <strong>Tools<\/strong> menu and you will see the following dialog:           <br \/> \n<p><a title=\"Create GUID by pstorkoh, on Flickr\" href=\"http:\/\/www.flickr.com\/photos\/7962873@N07\/2491688867\/\"><img loading=\"lazy\" decoding=\"async\" alt=\"Create GUID\" src=\"http:\/\/farm4.static.flickr.com\/3094\/2491688867_bbfc200aa9.jpg\" width=\"375\" height=\"339\" \/><\/a> <\/p>\n<\/li>\n<li>Be sure to select GUID Format #4, Click the <strong><u>N<\/u>ew GUID<\/strong> button, and then the <strong><u>C<\/u>opy<\/strong> button.&#160; The GUID is now in your clipboard paste buffer.&#160; <\/li>\n<li><strong>E<u>x<\/u>it<\/strong> the tool and paste your GUID into Visual Studio.&#160; (Note: be sure to remove the braces from the outside of the GUID since they aren&#8217;t needed.) <\/li>\n<\/ol>\n<p><strong><u>Implementing SN.exe<\/u><\/strong><\/p>\n<ol>\n<li>Select <strong>External Tools<\/strong> from the <strong>Tools<\/strong> menu in Visual Studio 2005. <\/li>\n<li>Click <strong>Add<\/strong> to add a new external tool to the menu.&#160; You will see the following dialog box. <\/li>\n<li>Fill in the following:          <br \/>&#160;&#160;&#160;&#160; <strong>&amp;Get Token<\/strong> for <em>Title            <br \/><\/em>&#160;&#160;&#160;&#160; <strong>C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\Bin\\sn.exe <\/strong>for <em>Command<\/em>           <br \/>&#160;&#160;&#160;&#160; <strong>-Tp &quot;$(TargetPath)&quot;<\/strong> for <em>Arguments<\/em> <\/li>\n<li>Select the <strong>Use Output Window<\/strong> checkbox <\/li>\n<li>Click <strong>OK<\/strong> to save the new menu entry. <\/li>\n<li>Once you&#8217;ve built your project select <strong><u>G<\/u>et Token<\/strong> from the <strong>Tools<\/strong> menu while one of your code files is open in the code editor and you will see something like the following in your Output Window:           <br \/> \n<p><a title=\"Output Window by pstorkoh, on Flickr\" href=\"http:\/\/www.flickr.com\/photos\/7962873@N07\/2491726501\/\"><img decoding=\"async\" alt=\"Output Window\" src=\"http:\/\/farm4.static.flickr.com\/3234\/2491726501_96f63af595.jpg\" \/><\/a><\/p>\n<\/li>\n<li>You can now highlight and copy either the Public key token or the Public key BLOB for use in your code. <\/li>\n<\/ol><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We add a couple of External Tools to our Visual Studio 2005 environment when teaching SharePoint classes to simplify some two common tasks encountered when developing for SharePoint.&#160; The first tool generates a unique Globally Unique Identifier (GUID) and places it in your clipboard so that you can paste it directly into Features or Solution &hellip; <a href=\"https:\/\/www.dontpapanic.com\/blog\/?p=44\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Adding Useful Visual Studio External Tools<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[19,15,23],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2007-dev","tag-development","tag-sharepoint_2007","tag-tips"],"_links":{"self":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":0,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}