Saturday 23 April 2011

JavaScript Bridge Update

Just added a MVVM pattern. Demo can be switched between UserControl and MVVM mode by using the startPage WebPart property. Use 'mvvm' for MVVM demo and 'uc' for UserControl demo.

Tuesday 5 April 2011

SharePoint 2010 WSP Packaging on TFS Build Server

I thought I'd make a not of this so I remember it. When VS builds a SharePoint 2010 project, it doesn't automatically create a WSP package (it does this on deploy). This is fine in the development environment, but when it comes to using a build server, the WSP must be created on build. I've found 2 ways of doing this.

1. When queuing a build, the following MSBuild arguments can be specified to package the project:

/p:IsPackaging=True



I found the first here:

http://msdn.microsoft.com/en-us/ff622991.aspx

2. To save doing this everytime a build is made, the following modification can be made the the project file:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />
  <PropertyGroup>
    <BuildDependsOn>$(BuildDependsOn);CreatePackage</BuildDependsOn>
    <PreBuildEvent>

    </PreBuildEvent>
  </PropertyGroup>


If found the second here:

http://www.sharemuch.com/2010/03/23/how-to-package-on-build-in-your-visual-studio-sharepoint-2010-solution/

Change Visual Studio Project Strong Name Properties in TFS Build Server TFSBuild.proj

This is an interesting one I stumbled upon today, I'm setting up a new TFS Build Server for VS2010 SharePoint projects and decided to re-visit a problem we've had for a while. We delay sign our assemblies with a public key and have key verification skipping on our dev servers, then fully sign the assemblies on the build server with a potected key.

To do this in the past we had to hack each csproj file and put a choose switch in to change the signing settings for debug and release build modes. This is quite annoying especially for solutions with many projects.

I decided to revisit this and after some googling and finding snippits of information about the TFSBuild.proj file, I found that properties can be substituted during the build server:

<ItemGroup>
    
    <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Main/Source/ProjectXYZ/ProjectXYZ.sln">
        <Targets></Targets>
        <Properties>SignAssembly=true;DelaySign=false;AssemblyOriginatorKeyFile=C:\SNKFolder\Key.snk</Properties>
    </SolutionToBuild>

  </ItemGroup>

Adding a semicolon separated list of key/values in the <Properties> block under the <SolutionToBuild> block does the trick.

Saturday 2 April 2011

SharePoint 2010 BdcModelBuilder Beta Release

SharePoint 2010 BdcModelBuilder Beta Release

Finally finished the SharePoint 2010 BDC Model Builder Beta Release (Documentation to follow):

http://bdcmodelbuilder.codeplex.com/