Vince365

    • 31/10/2014

    Presenting at the MVP Showcase 2014

    As some of you know, this is my first year as an MVP. Next week will be the MVP summit and I’m very exited about it.

    For those whom don’t know it, Microsoft is actually bringing 1800+ persons from all around the world to their headquarters so they can share information with them and gather feedback.

    We have a huge week coming up, well I can’t really say anything more about it, pretty much everything is under NDA.

    During the summit Microsoft is organizing a showcase so MVP’s form all around the world can show what they are doing if it’s innovating.

    Nicolas Georgeault (@ngeorgeault) and I will be presenting the Enterprise Brain and Attribute.

    At work we are developing a new way to interact with information. In a world where you have so much information everywhere in your company (or even outside) how can you find the content which is relevant to you? Without spending hours creating/classifying it? Could this content be produced and classified for you? Could it be suggested to you when you need it?

    Well you are lucky, we’ve been thinking about it for a while now and we are working on delivering the enterprise brain products/services suite. Which will be of course integrated with latest version of office 365 (graph, delve, search, SharePoint online….)

    So if you are an MVP, definitively drop by our booth on Sunday, if you don’t have the chance to come to the summit and you would like to know more about what we do just ping me on twitter (@baywet) or send me an e-mail.

    Check out the other amazing projects to be presented during showcase:

    http://blogs.msdn.com/b/mvpawardprogram/archive/2014/10/30/mvp-showcase-at-the-mvp-summit.aspx

    • 29/10/2014

    Automated build for SharePoint server (fulltrust) solutions with visual studio online

    Introduction

    It has been a few articles I’ve been mentioning the fact that we (Negotium, the company I work for) have migrated to visual studio online (TFS Online). This service offers most of the features offered by the on premises version of Team Foundation Server 2013 and even some exclusive features.

    If you have only a vague idea of what can do TFS2013/VSO and you want to learn more I very highly recommend Professional Application Lifecycle Management from Wrox.

    The main parts of Visual Studio Online

    TFS2013/VSO is divided in the strongly integrated with each other following parts:

    • Work (understand plan): Allows you to schedule the work to be performed (agile or waterfall,...), track the progress, see the evolution of the delivery capacity...

    • Code: Allows to centralize the code, follow the evolution of the code, everything that makes a great source control.

    • Build: Generate compiled and versioned versions of code, tracked, with a changelog.

    • Test: Ensures the quality of versions by running unit tests, deployments, functional tests automated or not.

    How to set up everything?

    Of course all these elements are related to each other which allows scenarios like “such automated test uses this portion of the code and has crashed, send reports and traces to the concerned developer and add elements to track the progress of the bug fix”.

    When we begin to learn how this software factory works one realizes the need to implement things in a certain order. In July we migrated our existing code (ok not in order but it’s due to migration), immediately after that we reconsolidated our backlogs and reorganized the scrum teams. We were already using scrum in the past but following numerous movements of teams, the methodology was just not very well applied.

    Automated build - benefits

    The next step was the establishment of automated build with the following main objectives:

    • Tracked, versioning and change notes of releases (already done but manually)

    • Progress towards the implementation of automated tests

    • Save Time

    Choices you have with Visual Studio Online

    You have two possibilities to perform automated builds with Visual Studio Online:

    • Use the preconfigured online build service (hosted build)

    • Setup your own machine and connect it to the service

    The obvious advantage of hosted build service is not having to spend time in configuration of the environment and paying only for the build time that you use and not for the rest of the time where the machine would be unused.

    According to this page http://www.VisualStudio.com/en-us/get-started/hosted-build-controller-vs.aspx#software SharePoint 2010 and 2013 (as well as many other components) are installed on the hosted build environments provided by Visual Studio Online. So I naturally started to configure my build plan using this service.

    However what is not clear it is that installed SharePoint edition is Foundation. My project being based on some of the dll's of the Server edition (publication, translation...) two choices were available to me:

    • Including a local copy of the missing dll's in my source code control

    • Set up my build machine

    It is obvious that including the missing dll's will clearly increase the weight of source code, may cause conflicts and will require updating them regularly. I therefore chose the second option.

    Configure build machine for SharePoint Server 2013 (full trust)

    The build machine setup steps are not so complicated that what I had to do:

    • Install SharePoint server 2013 (only the binary, not psconfig to pass)

    • Install Visual Studio 2013

    • Install the Office dev tools (from web platform installer)

    • Install the TFS build agent and controller, then connect it to my visual studio online (http://msdn.microsoft.com/en-US/library/ms181712#deploy ) )

    First error: version MSBuild is using

    Once finished I had the privilege to get this beautiful error message: cannot find build process template for project type SharePoint...

    This is due to the fact that for some reason, MSBuild framework (this is the technology that runs the build process) believes that it has to use version 11 (2012) of Visual studio. This does not match the installed versions of visual studio and Office development tools.

    To fix this problem simply edit build definition, on the process tab, click on advanced, and then specify /p:VisualStudioVersion=12.0 for MS Build Arguments.

    Second error: Version of the SharePoint tooling

    Once this is done, you’ll get another error, which is mainly related to the same problem: with the new version of workflows, process templates of traditional workflows have been moved but the references were not updated. I am also surprised that 2 years after the first releases of the tools, this still hasn’t been fixed.

    Start by making a backup of the file C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SharePointTools\Microsoft.VisualStudio.SharePoint.Workflow.targets and then edit it.

    Replace lines 37 and 38

    <Import Condition="'$(Language)' == 'C#'" Project="$(MSBuildFrameworkToolsPath)\Workflow.Targets" />

    <Import Condition="'$(Language)' == 'VB'" Project="$(MSBuildFrameworkToolsPath)\Workflow.VisualBasic.targets" />

    By

    <Import Condition="'$(Language)' == 'C#'" Project="$(MSBuildFrameworkToolsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets" />

    <Import Condition="'$(Language)' == 'VB'" Project="$(MSBuildFrameworkToolsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.VisualBasic.targets" />

     

    Conclusion

    Et voila! Now automated builds of SharePoint Server 2013 full trust projects are set up. Note that this works for Team Foundation Server 2013 as well as for Visual Studio Online. Also, my build machine is hosted on Azure but it could be on prem too.

    Next time I'll probably be writing about assemblies version numbers increment and/or pre/post build scripts since these are the two elements that I’m me before being able to implement automated test.

    • 27/10/2014

    Q&A with the SharePoint MVP Experts Chat On Oct 29th @1pm EST or 10am PDT

     Hello everyone

     

    Microsoft is launching a SharePoint MVP Expert Chats again!  Have questions about SharePoint 2010 or 2013?  Or SharePoint Online? Office 365?  Please join us October 29th at 1pm EST or 10am PDT where you can have your questions answered live!  We will be using the Reddit Ask Me Anything format.  This is new to us but many of Microsoft teams are using this medium now.  Please create a Reddit account beforehand so you can be ready to ask questions.  More information on the chat and room location will be available on Oct 29th in the SharePoint forum.  Hope you can join us!

     

    https://www.reddit.com/r/sharepoint

     

    Hope you can join us!

     

    MVP Experts Participating:

     

    1. Andrew Connell

    2. Cathy Dew

    3. Doug Hemminger

    4. Doug Ware

    5. Eric Shupps

    6. Gavin Barron

    7. John Ross

    8. Kris Wagner

    9. Randy Drisgill

    10. Sahil Malik

    11. Sean McNeill

    12. Shane Young

    13. Spencer Harbar

    14. Todd Bleeker

    15. Trevor Seward

    16. Wictor Wilen

    • 8/10/2014

    Speaking at the SharePoint Saturday Ottawa 2014 !

    I’m proud to announce I’ll be speaking at the SharePoint Saturday Ottawa 2014. The event will be held close to Ottawa on November the 18th and you can get all the details here http://www.spsevents.org/city/ottawa/ottawa2014

    I will be presenting this session with Fabrice Vaxelaire (AKA Great Venerable) and we’ll be talking about building your business portal in Office 365: Nowadays we have business tools and portals everywhere in the company, what are the benefits of having everything at one place? How can we bring core business applications to Office 365? Etc…

    Full extract of the session is available here and we’ll be posting source code and slides after giving the session so stay tuned!

    http://www.spsevents.org/city/Ottawa/Ottawa2014/sessions

    PS: SPS’s events are free and a great opportunity to learn a lot of things and to connect with experts so if you are in the area definitively check it out!

     

    • 4/10/2014

    Converting a protected by password certificate (pfx) to an unprotected one (snk)

    At work I am trying to implement automated build for SharePoint (full trust) projects on visual studio online. (Expect to have several articles about this as and when I meet and solve errors)

    When doing SharePoint development we have to sign assemblies with a certificate. When the project is initialized there are two options:

    • Certificate is protected by a password: (pfx extension) that was with first versions of SharePoint tooling, or if you have created the structure of (visual studio) solution yourself with several assemblies.

    • Certificate is not protected: (snk extension) default option of the tooling for a few years

     

    In my case the certificate was protected by a password which causes the following problem: that you have to type this password when you want to build the source on a new machine for the first time. This is really not convenient when doing automated build (no human to type a password when building). This gives us this error message.

    Cannot import the following key file: cert.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_XXXXXXXXXXXXXXX

    It is even worse when you try to configure it with the build hosted machines. These machines are machines pre configured by Microsoft to avoid having to setup your own build machine. (you cannot access it).

    The msbuild framework does not provide a simple way to configure the password and the command line tool sn.exe (used to import the certificates in the store of the machine) also prompts for the password. In fact it makes sense: a password should be memorized and never written down (security 101).

    So I had to delete the password for the certificate, only the visual studio interface does not allow us to do this. The only solution is to generate a new certificate in this case? Certainly not! This will change the public key of the assembly and potentially cause problems for all the items saved in database after the update! (I’m particularly thinking about the event receivers).

    The solution? Convert the certificate using a little bit of code (running it in a console app) found on pastebin http://pastebin.com/dpMxqsK4

     

    X509Certificate2 cert = new X509Certificate2(@"KEY.pfx", "pfxPassword", X509KeyStorageFlags.Exportable |) X509KeyStorageFlags.PersistKeySet);

    RSACryptoServiceProvider provider = (RSACryptoServiceProvider) cert.PrivateKey;

    Byte [] array = provider.ExportCspBlob(!provider.)PublicOnly);

    using (FileStream fs = new FileStream ("FileName.snk", FileMode.Create, FileAccess.Write))

    {

    FS.Write(array, 0, array.)Length);

    }

    Hoping it makes you save time in implementing your automated builds with visual studio online.

    PS: Ideally your company should buy a public intermediate authority certificate and setup a PKI. From this PKI you should generate your password-protected certificates. These certificates should be imported once (via GPO if possible) on the developers and the build machines. This would:

    • keep the private key protected even in case of theft of the sources

    • not require you to give the password to developers or to put it in a script anymore

    • allow your customers to ensure that the assembly they receive is published by you and not by an attacker

    • implement the automated build (on your machines only not the one provided by VS online)

     

    (see authenticode http://msdn.microsoft.com/fr-fr/library/ms172240.aspx )

    • 1/10/2014

    Speaking at the SharePoint Saturday New Hampshire 2014 !

    I’m proud to announce I’ll be speaking at the SharePoint Saturday New Hampshire 2014. The event will be held in Nashua on October the 18th and you can get all the details here http://bit.ly/spsnh2014

    I will be presenting this session with Fabrice Vaxelaire (AKA Great Venerable) and we’ll be talking about building your business portal in Office 365: Nowadays we have business tools and portals everywhere in the company, what are the benefits of having everything at one place? How can we bring core business applications to Office 365? Etc…

    Full extract of the session is available here and we’ll be posting source code and slides after giving the session so stay tuned!

    http://www.spsevents.org/city/NH/2014/sessions

    PS: SPS’s events are free and a great opportunity to learn a lot of things and to connect with experts so if you are in the area definitively check it out!