Showing posts with label CKSdev. Show all posts
Showing posts with label CKSdev. Show all posts

Wednesday 1 February 2012

Overview:  CKSDev provides mutiple SPI for SharePoint, the Event Receiver SPI is very useful in saving me tome writing all the plumbing code.

Problem: While updating a custom list using my event receicer I am re-firing the event receiver for the item.

Initial HypothesisDisable the event firing as shown in this post.  This post applies to MOSS and the methods have been depreciated in SP2010.

Resolution: Disable the EventFiring
this.EventFiringEnabled = false;
// Perform update
this.EventFiringEnabled = true;

Wednesday 13 April 2011

IW User Group - JBG ToolFest

Yesterday I present Community Kit for SharePoint - Developer tools (CKSDev) as a tool for SharePoint 2010 developers to improve productivity at Microsoft in Johannesburg to the IW user group

CKSDEV is a great tool built by people in the SharePoint community and lives on codeplex.  I highly recommend CKSDev if you use VS2010 - it gives you so much extra functionality from within VS as a SharePoint developer.

My Impression of IW User group Jbg - Brilliant, I was amazed by the whole toolfest idea and think it's a good idea for user groups to follow.  Michael O'Donavan, Veronique Palmer and Rob MacLean are doing a great job for the SharePoint community in SA.  Good idea, great venue, smallish turnout.  SharePoint is flying in SA and the community is good. 

About ToolFest Jbg - This is the second toolfest that has been held in Jbg, I have no doubt there will be more as I learnt tons.  Rob MacLean showed Light Switch using SP lists (In my head i always call it LightBox - no idea why) - it was impressive.  All the presenters showed me new tips and tricks.  I have some thoughts on some of the presentations below:

Installing SP2010 using SPAutoInstaller, I knew Brian Edwards presentation on Brian Lala's Powershell autospinstall was key, all i can say is I wish I had thought of presenting this but alas there are always so many topics and CKSDev I am a big supporter of.  This looked at installing SP2010 using Powershell.  Anyway, Brian is a fellow from Benoni (I did most of my schooling on the East rand).  Brian raised the key point of installing SharePoint correctly using multiple managed accounts. The wizard is fine if you are small and don't have resource but it's an extremely simplified start that I am not a big fan of.  Here is a post on installation options in SP2010 - AutoSPInstaller from Brian Lala is my preferred option, this is under the PowerShell installation option.    Managed Accounts I use for SP2010 installations.
Update: 22/06/2011 - Current versio of AutoSPInstaller is 2.5, additionallly the codeplex project is called AutoSPIntaller not SPAutoInstaller as previously named.

Wicus van den Berg did a good session on upgrading to SP2010 using PS and scripts he build with a nice XML config file.  Also I was unaware of the Powershell ISE option, I use PowerGui but Powershell ISE is built in a looks to do a very good job.  I voted for Wicus - his 1st script failed which made the presentation even better as he showed why it's important to perform the upgrade using Powershell and allowing us to watch the variables returned.

All the presenters gave me info from learning about zipping for document library's to raising my awareness of content types in the eyes of enterprise users.  Workflow and SPD were discussed.  And Rober MacLean had an absolutely blinder with Light Switch - it was brilliant.  His claim to be the greatest person he knows - it may be true!  The reason some sessions are better covered are I feel I am better qualified to discuss these topics but I took a lot from all the presenters and speaking to people at the event.

Veronique Palmer the only SharePoint MVP in SA lead a session "How mature is your SharePoint implementation?" And Veronique walked us through the SharePoint Maturity Model, so this was interesting but the conversation and input from people with actual experiences was the real gem.  I got smashed out the park by a guy from a engineering background when I suggested Workspace easily had sufficient space for all the required documents when going offline.  Well I was wrong and I loved the way he told me.  why - Engineering company's in Africa have a unique set of challenges to say the least, many files, remote locations and absolutely huge files with a requirement for literally thousands of docs.  I said "Who would ever work on more than 500 document offline", now I know this does happen.

Summary:  I loved presenting and people asked me great questions about CKSDev.  The community in Johannesburg is going well.  I have been to a lot of SharePoint user groups and I can honestly say this is the best evening event I have participated in. 

Thursday 7 April 2011

CKSDev My Favourite Features

Overview:  I love the codeplex project CKSDev.  This is the Community Kit for SharePoint 2010 - Developer Tools, it allows me to perform a lot of my tasks within Visual Studio 2010, it has a lot of templates I need and it has great local devlopment environment deployment tools.

Initial Hypothesis:  I estimate that I use 20% of the tools 80% of the time.  In this post I'm looking at what I use and like CKSDev to do for me.  The most important features for me revolve arround deployment.

Features
1) Deploy code quickly - I use to use WSPBuilder for MOSS, all the features and more are now part of CKSDev.  You can deploy code, reset IIS, deploy to the root hive, all faster than do a full deployment from VS.
2) Turn on the Developer Dashboard - OK I run Powershell to turn on my dashboard but it can be done easily using CKSDev.  Using Solution explorer navigate to the Site collection, right click and select "Developer Dashboard", I set mine to "On Demand".
3) Sandbox templates - Ok CKSDev use to include an SPI template for Sandboxed Visual Web Parts, this has been retired and I now use the "Power Tools for SharePoint 2010" (VSIX).  The full trust proxy SPI template is needed to log my Sandbox solution exceptions.
4) Other SPI templates - branding, master pages, Custom Actions, SPMetal... a lot of useful templates.
5) SharePoint Reference Tab - I dislike having to navigate to find the SharePoint dll's when adding references to my projects.  CKSDev add a new "SharePoint" references tab.
6) Discovery/Explorer - Using the solutions explorer when CKSDev is installed I get to see more artifacts from the Site Collection.

Summary:  I highly recommend using CKSDev, it speeds up development for SharePoint 2010 developers considerably.

Sunday 5 December 2010

Sandboxed Solution with Full Trust Proxy

Problem: You deploy code as a sandbox solution however it fails as you need to go beyond the permissions a sandboxed solution can perform.  For example sandbox solution code cannot write to the ULS and security is restricted so you won't be able to use RunWithElevatedPrivileges.

Resolution: You can develop a full trust proxy that is deployed into the GAC, you also need to register the full trust with SharePoint.  Lastly, create the code for your sandboxed solution using the Full Trust Proxy code.  The full trust proxy performs the operations that are beyond what the sandbox solution code is allowed to perform.
Update 23 April 2011 - CKSDev is an extension tool for Visual Studio that has a SPI (template) to create a full trust proxy.  This will do all the plumbing of creating the full trust proxy and the deployment packaging.  So if you are wanting to add a Sandbox Solution Full Trust Proxy for Logging use the VS template provide and all you need to add is your logging code.

More Info:
http://blah.winsmarts.com/2009-12-SharePoint_2010_Sandboxed_Solutions__Full_Trust__Proxies.aspx
http://ranvijaysingh.blogspot.com/2010/06/full-trust-proxy-in-sharepoint-sandbox.html

Tuesday 12 October 2010

CKSDev tool issue - The custom tool SPMetalGenerator failed

Problem: When adding a SPMetal Definition (CKSDev) item in visual studio, the SPMetal proxy generation fails with the error message: The custom tool 'SPMetalGenerator' failed.  Object reference not set to an instance of an object.

Hypothesis: CKSDev item template is failing, next I tried SPMetal from the command line and received the "Invalid File Name" error.  I had previously fixed this issue and here is the link.

I check the issue using the browser:

Resolution: Delete the list showing the Invalid file name error.  I could not do it from the UI so I used PowerShell.

More Info:
http://sp2010uk.blogspot.com/2010/08/issues-with-site-columns-content-types.html

Tuesday 8 June 2010

Developer SharePoint Machine Prep

BgInfo - Automatically display local computer information on the desktop's background, such as the computer name, IP address, ect
Disable ShutDown Event Tracker - Stop the comment box on Shut down of your developer machine.
CKS - Community Kit for SharePoint: Development Tools Edition by Matt Smith and others. Invaluable if not just for deployment of code.
.NET reflector - Explore compiled .NET assemblies
SharePoint Dispose Checker Tool
SharePoint Manger
U2U - CAML builder tool - Still a great tool and works with SP2010
WireShark
SharePoint Designer (SPD) 2010
Visual Studio 2010 (Professional version is the lowest edition but any version will work)
FireFox with Firebug (like the IE developer toolbar, good developer tools e.g. css), collazilla (colour picker for firefox), Firequery (jQuery addin), FiddlerHook (integrate Fiddler) & YSlow (Page performance and optimisation)
Fiddler
IE Developer Toolbar part of IE 8
Update 29/08/2010 - Visual Studio 2010 SharePoint Power Tools - Useful if you are using Sandboxes, adds 2 functions: Sandbox visual web parts & Sandboxed compilation.  Also note CKS has remove there sandboxed template in version CKSDev 1.1 release 1 August 2010.  Update 23/06/2012 - CKSDev is at version 2.4
Accessibility: http://www.cynthiasays.com/ &
Update 20/09/2010 - Also add Visual Studio 2010 Sharepoint Power Tools, it has sandboxed solutions and sandboxed visual web parts has been removed from the CKSDev project, so also get the latest CKSdev code.
Update 20/09/2010 - SPTraceView on codeplex is worth installing.
Update 26/11/2010 - Enable wifi on Windows 2008 R2
Update 24/06/2011 - Smtp4Dev is a useful codeplex project for collecting email sent from the dev machine.
Update 24/06/2011 - Office 2010 Plus has all the office applications and includes InfoPath.
Update 24/06/2011 - Visual Studio 2010 SP1 was realease in May 2011 and should be installed.
Update 24/06/2011 - Unit Testing nUnit, TestDrive.NET & TypeMoch or Rhino Mochs.
Add VS cmd prompt to VS using External Tools:  %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
Update 08/01/2013 - Create Shortcuts on the desktop using Powershell (14 hive folder and  hosts.exe) download
Update 09/01/2013 - Ps to add hosts entries.
Update 13/02/2014 - Process Explorer (Usefule if a machine has high memory, CPU or IO issues)
SoapUI if you are working with web Services.