Alexander Vanwynsberghe

"There is nothing impossible to him who will try"

Debugging Apps for SharePoint Online on a non-development site collection

In a previous post, I was talking about how you can use Project Server Online data in a SharePoint 2013 App using CSOM. One thing I was talking about was the fact that you cannot debug an application when you’re not using a development site collection. You will see this nice error:

Eli Sheldon (Program Manager at Microsoft) gave me this explanation (Thanks!):

SharePoint added a site collection level feature near RTM that, once enabled, will allow you to F5 deploy from VisualStudio, no matter what type of site collection you are targeting. Until the new bits roll online and this is documented, your best option here is to F5 debug on-prem and publish an app package and use the corporate catalog to test online.

Well, good news, SharePoint (online) is RTM (since a few weeks). Let’s find out how we can debug our SharePoint app on a non-development site. The reason why I really want to this, is because I have a Project Online App which requires a site collection where PWA (Project Web Access) is activated. Development sites cannot be created with an Active PWA.
I was hoping to see an option in the O365 SharePoint admin center where I could activate this ‘feature’. But unfortunately, there isn’t, or at least I couldn’t find it. So, the next thing I did was opening the solution of my previously created app, and hit F5 debug it. Note: be sure to install the latest version of the Office tools for Visual Studio 2012. As a result F5’ing my solution, I had this error:
So that’s a no-go, because “sideloading of apps is not enabled on this site“. After some research on the MSDN forums, I found a PowerShell script allowing you to enable Sideloading.  Because it’s not available in the interface, the only option you have is to run the PowerShell script to enable this feature. (There is not quite much information about this Sideloading thing yet though).
The first thing you have to do is download the SharePoint Online management Shell (link). The PowerShell script you can use is:
All you need to do is enter you site name, your username and your password. You will get:
That’s it. Now you can F5 your App, and it will be deployed and will also be debuggable on a non-development site, or in my case a PWA site collection. A small app that will load all Projects from my Project Site collection. Nothing fancy, just an example. Have fun!

Windows Azure auto-provisioned apps for SharePoint 2013

I suppose you all heard about the “App” concept in SharePoint 2013? If not, you have a nice overview about this new concept on msdn. An app for SharePoint is a great way to surface a remote web application in SharePoint. In this post, I want to tell you a little bit more about Windows Azure auto-provisioned apps for SharePoint 2013.

Imagine this: Wouldn’t it be cool if you can deploy whatever custom web application with whatever server-code behind it, directly to your Office 365 instance? Well, using the Windows Azure auto-provisioned apps you can. First question you can ask yourself, what’s Windows Azure doing in this story and how does it link to your Office 365? Well, to get this working internally each Office 365 gets automatically an Azure account associated. That’s nice, and really powerful. Because you now have both Azure and Office 365 together, you don’t have any reasons or whatever to stick with your on-premise installation.

An auto-provisioned app contains at least one Windows Azure Web Site that can be launched from a SharePoint 2013 Preview host web, and may also include SharePoint components on an app web and a SQL Server database (based on SSDT and .dacpac packages).

Let’s take a look what the development and deployment process looks like:

  1. The developer builds a SharePoint application into in .APP file
  2. Deploy to SharePoint
  3. SharePoint installs the application for you
  4. SharePoint provisions all Azure components
  5. SharePoint provisions the SQL Azure database and initializes everything included in the .dacpac (Data-tier Application Component Package)

So in general, you create an application, publish it to SharePoint, and SharePoint will do everything for you. So creating an Azure Website, manage your database on SQL Azure and initialize everything.

Let’s try it out. First you have to create a new SharePoint project in Visual Studio 2012. Open Visual Studio and click ‘File –  New Project‘. In the ‘new project‘ window, select ‘Visual C# – Office/SharePoint – Apps‘ and select the ‘App for SharePoint 2013‘ template. Give your project a name and click ‘Ok

Note: If you have never created a SharePoint/Office 2013 app before, you will not find the Project Template in Visual Studio 2012. You need to install the Microsoft Office Developer Tools for Visual Studio 2012. You can download this here. It will start WebMatrix and download all the required components you need.

On the next screen, enter the name of the application, and the URL of your development site. I used my SharePoint Online subscription for this. Be sure to use a ‘Development Site‘, otherwise you will get an error when you try to test your application. (been there, done that!). If you don’t have a development site, create a new one and use the ‘Development’ template when creating. That will do the trick. Ok, in the current window, also be sure to select  and choose “Autohosted”.

When you click ‘Finish’, your project will be created. Basically, it will create a solution with 2 projects. The first project contains an AppManifest file, and the second project is a simple ASP.NET application.

The AppManiFest file is the definition of your SharePoint application. It contains a title, a name, which (tile) icon it uses, what the start page is, which permission requests it need to run (for example accessing  User Profile information),… The ASP.NET application itself is really basic, but one thing to notice is the file ‘TokenHelper.cs‘. This is a file who is responsible for the OAuth 2.0 authentication of your application with SharePoint. This helper class is used in Default.aspx. It includes sample code about how to handle OAuth 2.0 authentication and how to perform callbacks to SharePoint using CSOM.

In this example, we won’t change anything and just continue and get our application up and running. All you have to do is click on ‘Debug‘, or just press ‘F5‘.

In the output console of Visual Studio, you will see that the SharePoint application will be uploaded to SharePoint, and that SharePoint will do the necessary things to install it. Note that your App is NOT provisioned on Azure yet. If the installation was successful, your browser will be opened and will ask you to do a login and it will now ask you: “Do you trust your application”? Click ‘Trust it

You will now have your application listed as an item in the ‘Site Contents‘.  Click on your application and you will get a certificate error. If you look good to the URL of your application you will see ‘http://localhost:xxxx’. What SharePoint did was an installation, and during the installation, the application URL was set to your localhost environment. Indeed, if you look on that taskbar of your machine, Visual Studio started an IISExpress with the same port as the one SharePoint redirects you to. Just ignore the certification error and continue.

What you see now is not quite much. What this example basically does is using the ‘SPHostUrl‘ parameter that is added to the URL when SharePoint opens your application. Using this parameter, the application will get an access token (using OAuth 2.0) and use this token to get a client context object. This object can load the title of the SharePoint site you’re using. Because your app is hosted locally using IISExpress, you can easily debug it.

Ok, let’s assume that our application is ready to be deployed. We can use Visual Studio to deploy our application. Right-click on your project containing the AppManifest file and select ‘Deploy‘. It will now execute the same process as before (as you can see in the Visual Studio Output window). When your application is installed, trust it, and click on the Application icon to open it.

As you can see now, the URL is not on localhost anymore, but it got a unique o365apps.net URL. So our application has been deployed to Windows Azure, awesome!

Of course, we’re still in development. But let’s say that everything is good, tests are written and the application is ready to go live, how can you do this? Well, we first need to create an ‘APP’ package of our application. In Visual Studio, right-click on your project containing the AppManifest file and select ‘Publish‘. You will get this dialog:

Click finish, and the output folder of your .APP file should open. In fact, an APP file is nothing more that a zip file (you can open it with 7Zip for example), containing all your artifacts. A bit like the WSP files.

Ok, so we have our APP file. Now we should ‘upload‘ it to our SharePoint farm, and make it possible for users to select this application on their site. The place where App’s can be managed is called the “App Catalog“. This app catalog is a separate Site Collection, and can be created using the SharePoint Administration Center. There you can click on ‘Apps – App Catalog‘. If you haven’t created one yet, it will create one for your, and otherwise, you will be redirected to the App Catalog itself.

Adding an App to the catalog is really simple. On your App Catalog site, click on ‘Apps for SharePoint‘ (on the left side). You will see an overview of all installed apps, including an indication of the licenses you still have available. To add your App, click ‘New Item

It will open a new dialog where you can select your .App file and give it a version comment. Click ‘OK‘ to continue. The next dialog gives you an overview of everything related to your application. Complete this as you want, and click ‘Save

Now you have your new Application available in the App Catalog. To use it, just go to a site where you want to use the application. On this site, go to ‘Site Contents‘ on the left side, and click on ‘Add an App‘. Look what you see there, the application we’ve just uploaded:

Click the App, trust it, and your application will be provisioned by SharePoint. When this process is ready, your application is installed on your site, and you’re ready to use it. Click on the App, and you should see:

The text displayed is the name of my site, which is ‘Ideation’, and you also see a unique ID in the URL = a unique Windows Azure website. (Note the ‘Website’ part of the name).

So that’s it. We have our SharePoint app up and running on Windows Azure. Great! One thing that’s really important to know: each ‘installation’ of our App will provision a new Windows Azure Website. So this will be a part of your billing/account, don’t forget that.

To finish this post, I’ll give you 2 reasons to use this approach:

  1. When you deploy an autohosted app for SharePoint, all Windows Azure and SQL Azure components are provisioned for you when the app for SharePoint is installed.
  2. The Windows Azure Web Sites infrastructure handles load balancing, multi-tenancy, and other important maintenance tasks for you.

Thanks for reading!

Basic ideation with SharePoint and Project Online

One of the exciting things I saw in the “Get Started with Project Online” video of Christophe Fiessinger was the possibility to use a custom ideation list to capture ideas and ‘convert’ this into a project in Project Online. Managing your companies innovation and ideation solutions with SharePoint and Project Online/Server is really an interesting approach. Both products are well-proven and it can give your company a boost to get the most creative ideas out of your employees. In this post, I will show you how to get started and how to create/design a custom list to capture ideas.

1. Create a SharePoint site

First step is to create a SharePoint site. This will be your ‘community’ site, where ideas will be gathered. One thing to note is that the site needs to be a ‘subsite’ of your PWA (Project Web Access). (see additional information at the bottom of this post) To create a new site, go to the Projects section of Office 365. On the left side, click ‘Site Contents’ and then the ‘new subsite‘ button.

On this new screen, provide a title of your subsite, add a description and the URL. Notice that the URL is a child of your PWA (and that’s what we need for our integration later on). As the template of my site, I used a ‘Community site‘, just because I like the way you can use it for discussions etc. But you can select whatever template you want.

When your site has been created, your browser will automatically redirect you to this new site. You will see a new, empty site based on the template that you selected. In my case, it looks like this:

What you can do now is customize your site, make it attractive, change the colors, do whatever you want (although it looks quite sexy already with the out-of-the-box template).

2. Create an ideation list

What we want to do now is create a new ‘Custom list‘ to capture our ideas. On the left side, click on ‘Site Contents’. This will now list you all ‘apps’ that are available on your site. Click on the ‘Add an item‘ button, and select ‘Custom List‘. Enter a new, and click ‘Create‘:

The list has now been created, time to add some ‘columns‘ where our users can add ideas. Basically, we just want a title field, a description field and a date field where users can add a date of when the idea could possibly be integrated. On your list-page, click the ‘Edit‘ link. You’re now working in the SharePoint editing mode. What you can do is adding columns by clicking on the ‘plus‘ sign. This will give you the option to create a new column based on a the type of information that you want to enter:

3. Rating

Now we have a list with some columns. Off course, we need a way to get our ‘best’ ideas. The easiest way to get the top ideas is by using a voting mechanism. We will let users vote for the best ideas. We will not take voting limits into consideration, and will not use any other advanced techniques, just simple voting.

By default, SharePoint has this possibility built-in. We only have to ‘activate’ this in our custom list. To do this, click on the ‘List‘ item in the ribbon. There you have an option ‘List Settings‘ on the right side.

In the ‘General Settings‘ of your list, you have the option ‘Rating Settings‘. Click this link to show the current Rating Settings. We want to enable Rating, so just select ‘Allow items to be rated?: Yes’.  We will also use ‘Star Ratings‘ because it looks nice.

What this will do is automatically add a column to our custom list. Now let’s add an entry in our list, give it a title, a description, a date and give it a rating. It should look like this:

4. Create a project

Now we have the interesting part: ‘upgrading‘ an idea to a Project in Project Online. Assuming that you are still editing the custom list, click on ‘Stop‘ editing this list. Now you have your list with your one idea. Select this idea by clicking on the first column. This will mark your idea as ‘selected’.

When you click on the ‘Items‘ ribbon item on top, you will see all the possible actions that you can perform on your selected item. And look what we see there: an option to ‘Create Projects‘.

You will now see a dialog with 2 options: The field mappings and the Enterprise Project Type. In the field mappings, you can easily map your list ‘column’ with a ‘Project Web App Field’. Like our title is equal to the Project name, the description equals the Project Description and so on. Do this form each column. Because we’re using a really basic custom list, we can map everything to the ‘standard‘ fields from the Project Web App. But off course, it’s also possible to create Enterprise Custom Fields in PWA, and those fields will automatically become available in this dialog.

The second part of the dialog is where you can select which Enterprise Project Type you want to use. You can select (by default) either an Enterprise Project, or use a SharePoint task list. I’ve already made a comparison between the two in a previous post.

All you have to do now is click on ‘Create Project’. This will do all the necessary things in the background. In my case, it will automatically create a new Enterprise Project containing the mapped information (like the title and description). It will also create a SharePoint Project site. Once everything is setup, you will get the following message:

 Great, so my project has been created. Let’s take a look at it. Go back to the PWA Project Center, and you should see your idea in the list of Projects:

Now to be sure that my field mappings were correct, click on the Project Name. On the left side, click on ‘Project Details‘. There you have a basic overview of your Project information. As you can see, everything is mapped correctly. My title, description, date,.. everything is perfectly mapped. Perfect!

Well, that’s it for today. We’ve created a subsite, added a custom SharePoint list, enabled rating and created a project from an idea. That’s an extremely simplified scenario, but it shows you how easy it is to use the built-in component and capture ideas from your employees. Further extensions could be using Infopath forms, adding some kind of a workflow, treat your ideas in different stages/phases, use collaborative intelligence,… Use your creativity!

Thanks for reading.

A note from John Thoni, part of the engineering team: “One thing to note is that the site needs to be a ‘subsite’ of your PWA (Project Web Access).” This is not entirely correct. The list from which you want to promote items to projects can exist anywhere in the Site Collection where the Project Server Service is enabled. If your PWA, http://myserver/pwa, is not also the Site Collection root, but rather the root ishttp://myserver, then the list could be in the parent, sibling or subweb of PWA (or even PWA itself).

Connecting SharePoint 2013 to TFS 2012 RC

The actual goal of my previous post  was the installation of SharePoint (Foundation) 2013 to be connected with TFS 2012 RC. By default, TFS 2012 RC ships with SharePoint Foundation 2010, but I wanted to use the newest 2013 version of SharePoint.

The installation of TFS 2012 on my Windows Server 2012 was quite straight forward, no special things, no errors, just great! I used the “Advanced” option so I could select my SSRS and SSAS instances, and also select my SharePoint instance. All 3 of them were automatically recognized by the TFS installation wizard, which is really a great experience! Well done Microsoft!

After the installation it was time to create a new Team Project using Visual Studio 2012 RC. I followed the creation wizard, but then I had a strange error when the Team Project was being created:

Exception Message: TF249033: The site template is not available for the locale identifier (LCID). The site template name is: Team Foundation Server Project Portal. The LCID is: 1033.

Hmm that’s strange. The template is not available for the locale ID. But I did an installation of  Windows Server, SQL Server, SharePoint, in English (that’s what the 1033 means). That’s the point that I posted an issue on the MSDN forum, and there I got this answer from Kelly McBride from the TFS Team:

TFS RC Dashboards do not support latest mode site collections. For the RC dashboards, please use a legacy (2010) mode site collection. RTM Dashboards will support latest mode site collections.

And indeed, that solved the issue. SharePoint 2013 has the possibility to select in which ‘mode’ your Site Collection has to run in. As for now, until TFS 2012 RTM is there, we need to have a 2010-version of our Site Collection. To resolve the error, I performed those steps:

First step is to delete your ‘old’ site collection. Go to your SharePoint Central Administration and click on ‘Delete Site Collection’:

Select your site collection. This is the one that has been created by TFS (when your Team Project Collection was created). And click ‘Delete

After you Site Collection has been deleted, create a new one with the same name. Otherwise you have to change the SharePoint site settings in the TFS Administration console to point to this new Site Collection. In my case, I just used the same name. To create a new one, go back to the Application Management section, and select ‘Create Site Collections’. Provide a title, description and an address. The most important thing is the ‘experience version‘. You have to select 2010 instead of 2013. If you select 2010, you will see the option to select the TFS Project Portal template. And that’s what we are looking for. Don’t forget to select the collection administrator too.

Click on the ‘OK‘ button, and your Site Collection should be created. Now let’s create a new Team Project again, et voila, no error this time. SharePoint 2013 is succesfully connected to TFS 2012 RC.

Thanks for reading!

SharePoint Foundation 2013 installation error

Yesterday, I decided to try out SharePoint Foundation 2013 on a fresh Windows Server 2012. I decided to install SharePoint Foundation in a standalone mode. This is the installation process I followed:

First start the SharePoint Foundation installation wizard. There you select ”Install software prerequisites”. During this process, be sure that you have an internet connection, because it will download all dependencies during the installation process of the prerequisites. Your machine will reboot twice (in my case), so just to let you know that your machine must be able to perform a reboot.

Next step is to click on “Install SharePoint Foundation“. In my case, I didn’t reboot yet, so I got this warning:

But once I’ve rebooted, everything went fine. First step in the installation is to select the installation mode. In my case, this was Stand-alone:

After completing the installation, the “SharePoint Products Configuration Wizard” starts. Because it’s a stand-alone mode, it will not ask my any questions, and it will start configuring my SharePoint instance.

On thing that I noticed was the fact that Step 2 took really long, but my system was not really doing anything special. Until I got this error after a while:

Failed to connect to the configuration database.
An exception of type System.Management.Automation.CmdletInvocationException was thrown. Additional exception information: ErrorCode<NonDomainNWService>:SubStatus<ES0001>:Service running under Network Service account in workgroup environment is not supported.

Looks like when you perform a stand-alone installation, and your service is running with the Network Service Account on a machine not connected to Active Directory, the configuration database could not be created. Bummer!

The solution to this can be found on this technet link. It’s quite simple (once you know it). Open your commandline prompt and navigate to “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN”

There you execute the command:

psconfig.exe -cmd Configdb create SkipRegisterAsDistributedCacheHost

This will now create your configuration database, and skipping the error that the GUI gave us. So, one step further, the configuration database has been created. What you can do now is re-run the configuration wizard to continue the rest of the configuration steps. But now, you will see another error:

As Neil Sly described in his post on technet:

This was an issue when installing SP2010 Beta, specifically when trying to create search service where this same error crept up, then the solution was essentially to script the installation of search.

Despite psconfig failing I decided to try Central Admin – which loaded without issue.   Checking service apps I can see “error” next to Search – so again, the issue crops up in this beta.

And indeed, if you open the SharePoint Central Administration window, you see your brand new SharePoint Foundation 2013 instance.

When you look at the “Service Applications“, you will indeed see that there is an error in the Search SA:

That’s all, enjoy your SharePoint 2013 Foundation.

Getting started with Project Online, the power of Project Server 2013 on Office 365

Yesterday, as many of you will already know, Microsoft revealed some nice upcoming stuff like Office 2013, SharePoint 2013, Project Server 2013, Office 365 Preview (including all the new products I just mentioned). One particular thing I was really interested in was Project Server 2013. Lately, I did a lot of experimental work and did some research on Project Server 2010 and particularly the integration ALM and EPM. Therefore, Project Server 2013 is also in my ‘focus’ area right know.

That being said, I was really excited when I saw the new Project Server 2013. I was even more excited when I heard the news about Project Online . As Microsoft describes on their site, they position Project Online as:

”The flexible solution for project portfolio management (PPM) and everyday work, delivered through Office 365″

In fact, Project Online is a full blown Project Server 2013 as you can use on-premise, combined with the power and easiness of the Cloud aka Office 365. So no setup, no SharePoint installation (problems) etc.

What I want to show in this post is how to get started and get your first project up and running.

1. Create your account

First thing you have to do is create your account for Project Online. You can visit this link. You will see a new screen where you can enter your personal information. One thing to notice is that you have an overview of ‘what‘ you will get, on the right side of the screen (you also have other preview programs that you can subscribe)

Once your registration is completed, you will receive an email with some guidance. To start, you can point your browser to “https://portal.microsoftonline.com/admin/default.aspx” and sign in with your credentials (name@domain.onmicrosoft.com). You will now be redirected to the administration page of your subscription.

On this area, you can perform any administrative action that you want. This can be creating users, change service settings, change some options,.. But the most important area is the one on the top-right. That’s the place to be for now.

2. Start with Project Online

If you click on the little arrow next to ‘Admin’, you will see the parts where you can perform the administration. By default, we are now on the ‘Office 365 Preview’ administration part. In the blue part, you have the ‘options/products’ available for your subscription. Let’s click on ‘Projects‘ to open our Project Online.

What you see now is the ‘start‘ page of Project Online. Comparing to Project Server 2010, this is definitely way more attractive. The central space is split in two parts, on top some interesting links to get started, and on the bottom some tiles. There you can see for example your tasks, your pending approvals and some quick access tiles.

On the left side, you have your menu, as you also had in Project Server 2010. This first thing I noticed is the small number of menu items. Project Server 2010 has a more than a dozen by default. But as you can see, there is a button/link called ‘EDIT LINKS‘. Use this menu you can easily modify the menu items on the left. One thing that is important for me (as an administrator), a direct access link to the ‘Server Settings‘ and (as a project manager) the Project Portfolio option. So I selected those items to be set by default:

3. Create a new project by using a SharePoint 2013 site

Now that we are all set, let’s create a new Project. On the ‘Home’ of Project Online, click on the green tile with the label “Create or import project“. You will now see a new popup window asking you for a name of your new project. One thing that you really have to know is that creating a Project using this way, will NOT create an enterprise project. What it will actually do is create a SharePoint site with a task list, and show this in your project list. Let’s illustrate this. I created a new project called ‘My great project’:

When you click on the ‘Create‘ button, it will create a SharePoint site linked to PWA (you can see this in the URL). This SharePoint 2013 site will contain a ‘Task List‘, and this task list will be used for tracking the progress of your project. When the Project is created, Project Online will automatically show the SharePoint site with the possibility to add tasks. On the left side, you also have some other options like adding risks, adding notes (using the OneNote web application, which is really awesome btw!). This is how it looks like:

People using Project Server 2010 will know this type as the regular ‘Project Site’. Only, there is no actual ‘Enterprise project’ now. When you go back to the Project Online place (by clicking on ‘Projects’ on top of the page), and then click on ‘Projects‘ on the left side, you will see the Project Center. As you will notice, you project will be available there. If you click on on the project name (as a link), it will open your brand new SharePoint 2013 Project Site where you can add your tasks.

One thing that you might have noticed is that it’s also possible to import existing SharePoint sites to be used for Project Creation. You can see this on the bottom of the dialog when you click on the green tile ‘Create or import project’. Really nice!

4. Create a new project by using an Enterprise Project Type

Another option to create a new Project is by using an Enterprise Project Type like you know in Project Server 2010. You can create your own EPT’s, modify it, add a workflow, add Project Detail Pages, … You can change and manage everything related to Enterprise Project Types in the ‘Server Settings’ section of your Project Online admin panel.

To create a new project based on your EPT, go to the project center (click on the left side ‘Projects’). In your project center, click on the ‘Project Ribbon’ on top of the page, and click on the ‘New’ button. There you will see the possible options to create a Project based on an EPT.

By default, you have 2 options:

1. Enterprise Project: This is actually based on an Enterprise Project Type. By default, there is no workflow attached to it. It’s just a basic starting point.

2. SharePoint Task List: This is the option that I just described. If you create a project by using the link on the Dashboard, it will use this option.

Let’s create a new Enterprise Project by clicking on ‘Enterprise Project‘.

You will see that by default, you have ‘more’ fields to complete that our basis project we just created (well, just Description field, but hey, you can customize the Project Detail Page). On the top left, click on ‘Save’.

As you can see, comparing with the previous project, it’s not opening a SharePoint Project Site, but it uses the Project Web App instead. There you can do everything with your project that you want, and that you used to do with Project Server 2010 PWA. Note that there is also a Project Site available (on the left side). When you open this, it will look quite similar as the previous one. Except there is one extra link on the menu bar: Project Details. When you click that link you return the Project Web App where all information related to your project is stored (split into several Customizable Project Detail Pages).

5. Conclusion

Now you have an overview of how to get started with Project Online and how to create your first project. I showed you the difference between a SharePoint Project site and an Enterprise Project and how you can create both of them.

Have fun! I’m really excited with this new release! Great job Microsoft!

Thanks for reading,
Alexander

Installing SharePoint 2010 prerequisites offline

When you want to install SharePoint (Foundation) 2010, the first thing you have to do is install the prerequisites required to successfully complete your installation and run SharePoint. One of the annoying things about the prerequisite installation procedure is the fact that your machine does need internet access. In many cases, that’s no problem. But there are some cases where it’s impossible (due company/network restrictions) to have internet access on the machine where you want to install SharePoint.

There is a solution where you can install the prerequisites in an offline mode. In this post, I’ll explain each step how you can install SharePoint (Foundation) 2010 without an internet connection

1. Download and extract your SharePoint Installer

  • The first step is to download SharePoint 2010 using an internet connected machine. You can download this using your MSDN subscription or using this link (for SharePoint Foundation 2010).
  • Once your download is finished, go to the ‘C:\’ drive of your SharePoint machine, and create a new folder. Let’s call this folder ‘SharePointFiles‘.
  • Copy/Paste your downloaded exe in this folder.
  • Open a command line prompt and navigate to this folder ‘cd c:\SharePointFiles
  • In the cmd, enter SharePointFoundation /extract:c:\SharePointFiles (the first term is the name of the downloaded exe, in my case the SP Foundation 2010 one)
  • The command in the previous step will extract everything to your folder ‘c:\SharePointFiles
  • Now you should also see the executable: PrerequisiteInstaller.exe which will allow us to install the prerequisites.

2. Download your prerequisites

3. Create a PrerequisiteInstaller.Arguments file

  • The next step is to create a PrerequisiteInstaller.Arguments.txt file in the SharePointFiles folder. This file will contain arguments, which will be used by the PrerequisiteInstaller executable.
  • Each component required by the PrerequisiteInstaller will have its own argument. This argument has a name, and a location where the installer can be found. In our case, we will create a list of arguments for all required components combined with the location of that particular installer.
  • To get a list of all prerequisite arguments, you can type ‘PrerequisiteInstaller /?‘. This will give you a popup with a list of the prequisites
  • In the PrerequisiteInstaller.Arguments.txt file, add the following commands: (All in one line, with only a space between each separate argument)
    • /Unattended /IDFXR2:C:\SharePointFiles\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu /SQLnCli:C:\SharePointFiles\PrerequisiteInstallerFiles\sqlncli.msi /ChartControl:C:\SharePointFiles\PrerequisiteInstallerFiles\MSChart.exe /Sync:C:\SharePointFiles\PrerequisiteInstallerFiles\Synchronization.msi /adomd:C:\SharePointFiles\PrerequisiteInstallerFiles\SQLSERVER2008_ASADOMD10.msi /Speech:C:\SharePointFiles\PrerequisiteInstallerFiles\SpeechPlatformRuntime.msi /SpeechLPK:C:\SharePointFiles\PrerequisiteInstallerFiles\MSSpeech_SR_en-US_TELE.msi /ReportingServices:C:\SharePointFiles\PrerequisiteInstallerFiles\rsSharePoint.msi
  • Note: Because I’m on a 2008R2 machine, I use the arugment ‘IDFXR2’ instead of ‘IDFX’. Be sure to change this if you’re on a 2008 machine!

4. Run the prerequisites installer

  • The only step left is to install the prerequisites.
  • You can run ‘PrerequisiteInstaller.exe’ manually by double-clicking on it, or using the command line
  • Because the file PrerequisiteInstaller.Arguments.txt is in the same directory, the installer will use this file for its own arguments and thus install the prerequisites in an offline mode.
  • You’re done!

5. Troubleshooting

  • It can be possible (like it was in my case) that the installation using PrerequisiteInstaller.exe did not complete. In my case, it was because there were some arguments missing in my arguments file.
  • There are log-files available who can tell you what went wrong. You can find this log-files in folder: ‘C:\Users\{user}\AppData\Local\Temp
  • The file is called something like  ‘PrerequisiteInstaller.2012.02.15.log

My Prerequisites in a zip file: here
My PrerequisiteInstaller.Arguments.txt: here

Thanks for reading!

TFS Extensions for SharePoint, manual installation

When I was at a customer last week, I had a situation that SharePoint Foundation 2010 was installed as a local instance on the TFS application tier. The TFS extensions for SharePoint were already installed using the TFS installation. Now the SharePoint Foundation 2010 instance had to be changed to a farm installation. So the SharePoint Content and Configuration databases had to be located on a data tier (SQL Server 2008 R2). After the re-install of SharePoint Foundation 2010 in a farm mode, the TFS extensions for SharePoint had to be installed again.

When I went to the Team Foundation Administration Console, the ‘Extensions for SharePoint Products’ were still there (as it was previously connected to our local SharePoint Foundation 2010 instance). The problem was that the TFS extensions were not available anymore on our new SharePoint instance. When I click on the ‘Extensions for SharePoint products’, I got the error:

“TF249063: The following Web service is not available: http://abc:17012/_vti_bin/TeamFoundationIntegrationService.asmx. This Web service is used for the Team Foundation Server Extensions for SharePoint Products”

That’s correct, that TFS integration service asmx was not available anymore. The first thing I did was an un-install from the extensions (using the TFS installation media). Then I did a re-install of the extensions, but without any result. I hoped those steps could solve my problem, but they didn’t.. Time for the next step.

stsadm to the rescue

To resolve the issue, you have to install the TFS extensions manually to the SharePoint solutions store, and then deploy them. To do this, you need the stsadm tool from SharePoint. That’s the command-line administration tool from SharePoint. You have to add 3 .wsp files to your SharePoint farm.

  1. Go to the directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin\
  2. Open a command window (Shift + right-click -> Open Command Window here)
  3. Be sure that you run the command window with a user who has the right credentials (SharePoint Farm Administrator and have rights to the Central Admin Content Database on SQL server)
  4. Run the following commands:
    1. stsadm -o addsolution -filename “C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Templates\Microsoft.TeamFoundation.SharePoint.wsp”
    2. stsadm -o addsolution -filename “C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Templates\ TswaWebPartCollection.wsp”
    3. stsadm -o addsolution -filename “C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Templates\Microsoft.TeamFoundation.SharePoint.Dashboards.wsp”
  5. Open your SharePoint Central Administration (http://server:17012 or something equal)
  6. Go to system settings and click ‘Manage farm solutions’
  7. You should see the 3 TFS wsp files
  8. Click on the first one, and click ‘Deploy Solution’
  9. Deploy the solution by clicking ‘Ok’
  10. When you deployed the 3 solutions, you should see
  11. All you have to do now is grant access for your TFS instance to SharePoint using the TFS Administration console.

That did the trick for me. Thanks for reading!