Follow through the setup and tutorials if you’re new to the SPFx and how it all hangs together.
With the new SPFx we get given a context object as part of the core which provides properties we can leverage inside our web part. This example is super simple and is aimed just to provide an easy to consume view of the context.
Dan Kogan, principal group program manager, covers the SPFx in his video from the event. Watch this if you haven’t already as it details all the cool new things that the SPFx will bring.
Most of the demo’s and blogs have focused on using Visual Studio Code. You can still develop using Visual Studio 2015 if you choose. This article will explain how to hook up the SPFx solution and use Visual Studio 2015.
This article is based on the SharePoint Framework preview and is subject o change for the GA. Any information is correct at the time of publication, but you should check with the latest Microsoft information.
Getting Visual Studio 2015 ready
The SPFx experience is normally used from VS Code so we have to add a few things to Visual Studio 2015 to enable it to use the node and npm tech.
If you have the right folder you should see the gulpfile.js.
Click finish to complete the project import.
Let’s take a look through the new project and solution.
We can see that there is an npm node which allows us to explore the node modules. There are also plenty of regular files like tsd.json, tslint.json, package.json etc. These should be fairly recognisable from common web dev projects. Remember that SPFx is expecting you to have working knowledge of modern web dev like TypeScript and gulp.
Fixing gulpfile.js for Visual Studio 2015
We need to just change the gulpfile.js to use var instead of let.
Setting up for F5 running
We need to modify the project settings to include the node module gulp and argument serve.
Once you make those changes F5 will build and run the server files and open the SharePoint Workbench
As I stated earlier these are steps based on the DevKitchen pre-release SPFx bits and will almost certainly change for GA. It hopefully shows how you can still make use of Visual Studio 2015 and don’t have to move to using VSCode if you’d prefer VS2015.
I hope you found this info useful and onwards to the Future of SharePoint