Archive for September, 2010

How do I – Install FeatureBuilder for Visual Studio 2010 Ultimate

Written by Cornelius J. van Dyk on . Posted in How Do I...

FeatureBuilder is an awesome addition to Visual Studio.  If you wish to give it a spin (highly recommended by the way), it’s easy to do.

  1. Start by getting the Visual Studio 2010 SDK located here:http://www.microsoft.com/downloads/details.aspx?familyid=47305CF4-2BEA-43C0-91CD-1B853602DCC5&displaylang=en 
  2. Double click the installer.  On the dialog prompt, click “Run”.

    image_23_5E30024C
  3. On the Welcome screen, click “Next”.

    image3_1_5E30024C
  4. On the EULA screen, click the “I accept the terms of the License Agreement” check box and click “Next”.<

    image6_5E30024C
  5. On the Destination page, accept the defaults and click “Next”.

    image9_0C1D5505
  6. Wait while Setup installs the SDK.

    image15_0C1D5505
  7. Once the SDK installation is complete, click “Exit”.image18_3A0AA7BD
  8. Now go ahead and get the FeatureBuilder vsix by downloading it from here:

    ;
  9. After downloading, double click the .vsix file.
  10. When prompted to open with an application, select Visual Studio and click “OK”.

    image21_2519254A
  11. On the Target page, select Visual Studio 2010 as a target for the vsix install.
  12. Click “Install”.

    image24_2519254A
  13. Wait while the extension is installed.

    image27_2519254A
  14. Upon install completion, click “Close”.

    image30_2519254A

Start using and enjoy FeatureBuilder!  In future blog articles, I’ll show you how to use FeatureBuilder.



Cheers
C




image

Things that make you go hmmm

Written by Cornelius J. van Dyk on . Posted in Blog

I saw this list of the supposed top 50 influencers in the SharePoint world as far as Systems Integrators/Consultants are concerned…

Now I can go into a long outburst over how they picked their criteria etc. for the list, but I won’t.  I agree with SOME of the names on this list.  My friends Andrew Connell and Scot Hillier absolutely belong on this list, as does long time SharePoint genius Ted Pattison, but some of the people on this list, I don’t even recognize… and I have been in the SharePoint world for almost a decade now… Lots of notable names are not on this list, like Todd Baginski, Gary LaPointeRobert BogueBil Simser among others… Suffice it to say, I think the list isn’t correct.  Now before I get accused of bias, I’ll prove my point simply… riddle me this…

Is ANY list of the Top SharePoint influencers complete or correct without… Joel Oleson???

Cheers
C




image

Installing the .NET Framework 4.0 on your Windows Server 2008 R2 x64 server with SharePoint 2010

Written by Cornelius J. van Dyk on . Posted in Blog

As we all know, SharePoint 2010 is still using the .NET Framework 3.5.  That means that your servers may not have the latest .NET Framework 4.0 installed.  This could cause some issues if you’re trying to use APIs from 4.0, or if you are trying to build some new tools using 4.0, like PowerShell management extensions for example.  The solution is to install 4.0 on your server.  Here’s the quick Step-by-Step for doing this on a Windows Server 2008 R2 x64 system with SharePoint 2010 installed.

  1. Begin by downloading the full version of the Framework from here: 
    http://www.microsoft.com/downloads/details.aspx?FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7&displaylang=en
  2. Once downloaded, double click the installer file named “dotnetFx40_Full_x86_x64.exe”.

    image_15_1B631F9C
  3. Windows may require you to confirm that you wish to launch the EXE.  If it does, simply click “Run”.

    image_14_1B631F9C
  4. You’d have to accept the EULA.  Check the “I have read and accept the license terms” check box.
  5. Click the “Install” button to commence the installation.

    image_13_1B631F9C
  6. The installer will crunch away for a while as it installs the Framework.

    image_12_1B631F9C
  7. Once installation complete, click the “Finish” button.

    image_11_1B631F9C
  8. No server restart is needed. 🙂


Cheers
C




image

How do I – Resolve the failure to load a module into PowerShell when using the Import-Module cmdlet

Written by Cornelius J. van Dyk on . Posted in How Do I...

If you’ve ventured into the world of PowerShell extensions and modules, and more specifically, that world, targeted at SharePoint, then you have probably run into this error before.

Import-Module : Could not load file or assembly 'file:///C:\cjvandyk.SharePoint.PowerShell.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. At line:1 char:14+ import-module <<<< .\cjvandyk.SharePoint.PowerShell.dll + CategoryInfo: NotSpecified: (:) [Import-Module], BadImageFormatException + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand

This error is thrown by PowerShell when you are using the Import-Module cmdlet to import a PowerShell module (redundant, isn’t it?) that was built using the .NET Framework 4.0. The ugly error looks like this:



image_3_5D53F350

If you’re trying to use that module on a SharePoint system, the odds are that the server does NOT have the 4.0 version of the Framework installed. You can easily confirm this by simply checking the sub folders under the C:\Windows\Microsoft.NET\Framework location.



image_9_5D53F350

In the above example, you can see that 1.0, 1.1, 2.0, 3.0, 3.5 and 4.0 are all installed on the server. If you find that 4.0 is NOT installed, you can quickly install it following this guide.

Once it’s installed you only have one more thing left to do. By default, PowerShell will run under the 2.0 Framework. We need to force it to default to the 4.0 Framework and only revert back to 2.0 if it doesn’t find what it’s looking for in 4.0.

That is easily done using a .config file for the PowerShell executable. Browse to the C:\Windows\System32\WindowsPowerShell\v1.0 location.



image_12_5D53F350

You may not have the two .config file on your system. If you don’t, you need to create them manually. Name the files exactly the same as the .exe files, but with a .config extension at the back. Create them as text files, but you will need to show extensions from your Folder Options in Windows Explorer in order to get rid of the .txt extension. The two config files should be named “PowerShell.exe.config” and “PowerShell_ise.exe.config”. The content of the two files is a simple XML snippet that simply points PowerShell to default to 4.0 and fallback to 2.0. Copy and paste the following snippet into the .config files.

Untitled-1

Now when you restart PowerShell, attempting to load your module should yield no errors (if your module is compiled correctly and valid), and you should be able to implement the functionality from the module without any problem.



Cheers
C




image

How do I – Remove all traces of a Workflow from my SharePoint list?

Written by Cornelius J. van Dyk on . Posted in How Do I...

Sometimes when we are working with SharePoint Designer (SPD) workflows on SharePoint lists, things can get a little ugly.  SharePoint preserves every version of the workflow unless you manually go and remove it from the list settings.  If you have a workflow that happens to keep in a running loop, it could appear as if the newly published workflow didn’t actually publish correctly.  In such situations, it’s often better to “reboot” and publish fresh.  What we would do is to remove every instance of our workflow from the list settings and then re-publish the workflow again from SPD.  Here’s how:

  1. Start by navigating to the list on which the workflow was published.
  2. In the ribbon, switch to the “Library” tab.
  3. image_f1f40a95-e10a-42e4-8cb5-32c93b9d650c_381DC2FA
  4. Once on the “Library” tab, you can click the “Workflow Settings” button, but because the ribbon dynamically changes depending on browser size and screen resolution, that button may not always be displayed.  A sure way to get there is to click the “Library Settings” button which is always displayed.
  5. image_c958fd06-c1b7-42af-8077-62ac2f03a1df_381DC2FA
  6. From the Library Settings page, under “Permissions and Management”, click the “Workflow Settings” link.
  7. image_c744fd70-3696-4c45-ad49-121d24099ef3_381DC2FA
  8. You’ll now be presented with a long list of historic versions of the workflow.
  9. Click the “Remove a workflow” link below the historic list.
  10. image_9fd0193e-3116-479c-ab88-10467848488e_381DC2FA
  11. On the right, select the “Remove” radio button for every instance of the workflow.
  12. Once all the buttons are selected, click the “OK” button to completely remove our workflow from the list.
  13. image_6aa1cbe9-3922-4ef3-ab06-9c6b9651427a_381DC2FA
  14. Now simply switch back to SPD and re-publish the workflow for a fresh start.


Cheers
C




image