Thursday, January 14, 2010

keyboard short cut to create GUID in visual studio

Here is a blog entry about how to setup keyboard short cut for creating GUID.

http://mundeep.wordpress.com/2008/03/27/quickly-generating-guids-in-visual-studio-2008/

From the post, copied for my easy reference:

1.Load Visual Studio 2008 and goto Tools -> Macros -> Macro Explorer (Alt-F8 for short)
2.Right-click on “Macros” then select New Macro Project
3.Name your project (eg. GUIDGenerator) and choose a location to save it (note no space allowed in Project Name).
4.This should give you a new project with a “Module1″ sitting underneath it. Right-click on “Module1″ and select “Rename” to give it a more meaningful name (eg. GUIDGenModule).
5.Double-click on the newly renamed module and you should be shown the Visual Studio Macro IDE.
6.Enter the following code (the “D” in ToString can be customised see Leon’s article):
◦view sourceprint?
1 Sub Create_GUID()

2 DTE.ActiveDocument.Selection.Text = System.Guid.NewGuid().ToString("D").ToUpper()

3 End Sub
7.Save and close the Macro IDE.
8.Back in the main Visual Studio window goto Tools -> Options
9.Goto the “Keyboard” option under the “Environment” tab.
10.In the “Show Commands Containing” text box type in “Create_GUID”
11.Select the Macro sub that you just created from the list (it should be the only one)
12.Click inside the “Press Shortcut Keys” textbox then press your desired keyboard shortcut for inserting a GUID (eg. Alt+G as Leon suggested makes a lot of sense).
13.Ensure the “Use Shortcut in” option is “Global” and click on “Assign”
14.Close the options window and you should be able to start using your keyboard shortcut to quickly insert GUIDs into text!
15.If you have any other Visual Studio windows open at the time you will need to close them and reload for the macro for the macro to be loaded (or you can goto the Macro Explorer window and manually load your Macro project)

Monday, January 11, 2010

sharepoint application templates (like timesheet etc)

http://www.microsoft.com/downloads/details.aspx?familyid=5807B5EF-57A1-47CB-8666-78C1363F127D&displaylang=en

Windows SharePoint Services 3.0 Application Templates: All Templates

Server Admin Templates:
Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install. If you do not have Central Server Admin rights, you can still install the site admin templates (see second list below) in the sites/workspaces that you own or administrate.
Absence Request and Vacation Schedule Management
Help Desk
Budgeting and Tracking Multiple Projects
Inventory Tracking
Bug Database
IT Team Workspace
Call Center
Job Requisition and Interview Management
Change Request Management
Knowledge Base
Compliance Process Support Site
Lending Library
Contacts Management
Physical Asset Tracking and Management
Document Library and Review
Project Tracking Workspace
Event Planning
Room and Equipment Reservations
Expense Reimbursement and Approval Site
Sales Lead Pipeline


Site Admin Templates:
Site admin templates are easy for site administrators to install in a template gallery without requiring server administration access.
Board of Directors
Employee Training Scheduling and Materials
Business Performance Rating
Equity Research
Case Management for Government Agencies
Integrated Marketing Campaign Tracking
Classroom Management
Manufacturing Process Management
Clinical Trial Initiation and Management
New Store Opening
Competitive Analysis Site
Product and Marketing Requirements Planning
Discussion Database
Request for Proposal
Disputed Invoice Management
Sports League
Employee Activities Site
Team Work Site
Employee Self-Service Benefits
Timecard Management

creating lists in sharepoint wss 3.0, vseWss 1.3

Good information on creating lists and custom lists here:

http://blog.myitechnology.com/2009/06/how-to-create-list-templates-and-list.html

Also about the error that you may receive:

http://blog.myitechnology.com/2009/06/fixing-feature-guid-for-list-template.html

But the best way is, you create all the lists using SharePoint and then reverse engineer it using 'spshource' - some information on how to: http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/05/04/my-first-experience-with-spsource.aspx

Using SolutionGenerator has following disadvantage:
> For every ListTemplate or Instance etc, it creates a separate feature. You want to have one feature for your project/site that can install everything. Creating multiple features may not be desired in many cases like this.
> The lookup fields were not maintained in the schema.xml

Remember when you add a lookup field in sharepoint, it has to be of type 'Single Line Text'. You can not use Number of Multi-line text or rich text as the Lookup field.

Kite flying festival - 14 Jan

In India Kite Flying is a big festival in Gujarat India, only behind Navratri and Diwali in terms of importance. While I dont want to make this a wiki article of Kite Flying, here are some links on it today:

http://www.dnaindia.com/india/slideshow_no-strings-attached_1333478

http://beta.thehindu.com/life-and-style/leisure/article78494.ece

But look at following one - that argues many birds are killed during this festival because they get trapped in the flying kites.
http://www.sindhtoday.net/news/1/90937.htm

Look who is talking --- why don't you think about how many chickens you are going to eat today, before asking how many birds are killed by kites - which an accident rather than cruelty to fill your hunger.

Tuesday, January 5, 2010

How to find public key token for a .NET DLL or assembly

Here is a nice information from following blog:

http://blogs.msdn.com/wriju/archive/2008/07/01/how-to-find-public-key-token-for-a-net-dll-or-assembly.aspx

The command is: sn.exe -T
Please notice the captial T.

I added this in the external tools to make it quick.
Go to Tools->External Tools-> Add
"Find Public Key Token"

Command = C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe

Arguments = -T $(TargetPath)

Notice that the sn.exe is inside VS 8 - even though you may have VS 9 for 2008.

Tuesday, December 29, 2009

what colors to use for your web design

A nice article for programmers like me who are always confused about what colors to use:

http://articles.sitepoint.com/article/color-for-coders

Another one for web site design:

http://articles.sitepoint.com/article/principles-beautiful-web-design/2

Monday, December 28, 2009

For Share Point Development

Just saw this one. Its a great list of things you need to be a Share Point Developer.

http://blogs.msdn.com/pandrew/archive/2008/05/01/getting-started-with-sharepoint-development.aspx