Archive | MOSS RSS for this section

SharePoint Code Analysis Framework (SPCAF) BETA Free

Finally Matthias Einig and Torsten Mandelkow published the SharePoint Code Analysis Framework (SPCAF) as the first public beta release.

Get it from here
Watch a demo video here

The SharePoint Code Analysis Framework (SPCAF) provides tools to analyze SharePoint code. This includes

  • SharePoint solutions (.wsp) for SharePoint 2007 / 2010 / 2013
  • SharePoint 2013 apps

SPCAF cannot only analyze assemblies like other tools as FxCop or SPDisposeCheck. It can also analyze all the XML code in SharePoint packages like Features, ContentTypes, ListTemplates and all the other files like controls (.ascx), pages (.aspx) and master pages (.master) etc.

SPCAF can be used directly in Visual Studio 2012 or 2010 to analyze SharePoint projects. It also provides a client application to analyze existing WSP packages, can be integrated into a Team Build via a custom build activity, it can be run on command line or as MSBuild task during each local build.

Highlights

Sample analysis results

Who should use it?

  • SharePoint Architects can ensure proper application design and detect violations against best practices
  • SharePoint Developers can ensure that their code is correct and that errors in XML code can be found early directly in Visual Studio and not only after deployment to SharePoint.
  • SharePoint Quality Assurance can ensure that WSP packages are developed according to the best practices and the e.g. Customization Policies are not violated.
  • IT Pros can ensure that the WSP files does not contain “dangerous” code and that they can install the packages without fear. The inventory reports gives a detailed overview about the contents in the packages and is a good documentation of the code.

Use SPCAF directly in Visual Studio

Get Errors and Warnings and open the files directly in VS

Visualize Dependencies

Use the client application to analyze existing WSPs or APPs

MSDN Blog Post

Displaying attachment link in a SharePoint custom list form – “DispForm.aspx”

Recently while working with SharePoint lists I required to customize the out-of-the-box list item display form “DispForm.aspx” to present a design-frenzy item view format.

During the modification process, I never assumed that the list item attachments would abruptly dissapear from the display form. All I was looking to do was to display the list item in a good looking format by modifying the XSLT, but the attachments were gone!

Lesson Learnt: Never modify the out-of-the-box list item display form “DispForm.aspx”. Create a new one if you need to and call it “DispForm_WhateverYouCallIt.aspx”

Now the attachments that were gone seemed quite easy to be brought back on the page. It needed a SharePoint control AttachmentsField that went missing from the picture. Below is the code that you need to add into the XSLT template dvt_1.rowview (into your custom form) that constructs theDataFormWebPart that SharePoint Designer creates for you when you insert a Custom List Form:

Show Description/Comment History in Display Form of SharePoint Designer 2007

Hey Guys,

Yeah, it seems little weird for me to go back working on SharePoint (or may be MOSS) 2007 but it was for a while  🙂

So, when you have a requirement to showing Description/Comments History in your display form, for which, the field was multi line text, what would you do?

1

For Description, it’s pretty straight forward!!

<xsl:value-of select=”@Comments” />

But for Comments History, in my edit page, I was able to see the Comments History like this:

1

In HTML Code, I show something like below,

<xsl:value-of select=”@Comments” />

but nothing comes under the Comments Text in my Display form!!  😦

I went and edited the Edit Form where it does shows the comment history, so how to show the comment history in Display form??

It’s simple (looks simple when you know it 🙂 )

Just Changed the below code,

<xsl:value-of select=”@Comments” />

To

<SharePoint:AppendOnlyHistory FieldName=”Comments” runat=”server” ControlMode=”Display” ItemId=”{@ID}”/>

That’s it.

Thanks & Enjoy!! 🙂

%d bloggers like this: