none
SharePoint Development without installing Visual Studio in the SharePoint Server. RRS feed

  • Question

  • Hi Guys,

    I have a small question. Can't we develop sharepoint apps and webparts without installing Visual Studio in the SharePoint server?
    Even if we copied the necessary DLL files to the Visual Studio Solution and register the assemblies can't we develop offline?

    Thanks,
    Chiranthaka


    Tuesday, May 31, 2016 6:50 AM

Answers

  • Hello 

    You need to have SharePoint and Visual Studio installed on the machine where you will be developing for SharePoint. Visual Studio needs to have access to all of the SharePoint components that you can include in a project.

    For reference, see: 

    Set up a general development environment for SharePoint 2013

    Best Regards


    Tuesday, May 31, 2016 7:02 AM
  • Hi Chiranthaka,

    If you are looking for on-premises development then you need to have VS installed on your server. However, if you just want to get started with creating SharePoint apps (Add-ins) you can do it through "Napa" which allows you to build apps for SharePoint Online and you don't need to install VS.

    BR,

    Sayantan

    Tuesday, May 31, 2016 7:16 AM
  • Hello Chiranthaka J!

    You don't need local SharePoint farm in order to develop SharePoint 2013 Apps (Add-ins). Just tested on my environment. You only need to deploy Office Development Tools for your Visual Studio and remote SharePoint farm to debug your solutions. In the remote farm it is better to create site collection with "Developer" site template because it has required features activated by default. 


    If my suggestion helped you to solve your problem, please don't forget to mark it as Answer

    Tuesday, May 31, 2016 10:10 AM
  • in most cases when you work with Sharepoint you have several environments:

    - development environment - your local machine with installed Sharepoint, in most cases all-in-one installation and very often it is created as virtual image. On this environment you have Visual Studio and develop components. Also as you have living Sharepoint site you may install your components there and test them before to install them to test or production

    - test environment (optional) - remote farm with Sharepoint installation. Often it is created on customers' side. It should be closed to production from configuration point of view. The goal of this environment is to test custom components before they will be installed on production.

    - production environment - remote farm with Sharepoint installation with production site. Components are installed there after they are developed and tested on development environment and then tested on test environment (if exists).

    It is possible to develop web parts which use only javascript object model directly on production environment, you don't need Visual Studio for that. But if you need to develop component which uses server object model (C#) you need to use Visual Studio. Like I mentioned above in most cases you do it on local development environment with Sharepoint installation.

    In theory you may develop components on environment without installed Sharepoint only by copying necessary dlls from the server with Sharepoint installation and by referencing them in VS like you mentioned. But in this case you will be able only to compile your component and create wsp/app packages, but not run and test them locally. However this is possible scenario - e.g. this is how I develop Camlex open source library, which generates CAML from C# expressions. In this case it is possible because there are no any actual calls to Sharepoint API - only reference on Microsoft.SharePoint.dll is needed for compilation and analysis of expressions.

    And last option is to install VS on production environment and develop here, but it is not recommended way. First of all it will consume system resources and it may affect performance of production sites and at second components won't be tested before they will be installed to production.


    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

    Tuesday, May 31, 2016 12:09 PM

All replies

  • Hello 

    You need to have SharePoint and Visual Studio installed on the machine where you will be developing for SharePoint. Visual Studio needs to have access to all of the SharePoint components that you can include in a project.

    For reference, see: 

    Set up a general development environment for SharePoint 2013

    Best Regards


    Tuesday, May 31, 2016 7:02 AM
  • Hi Chiranthaka,

    If you are looking for on-premises development then you need to have VS installed on your server. However, if you just want to get started with creating SharePoint apps (Add-ins) you can do it through "Napa" which allows you to build apps for SharePoint Online and you don't need to install VS.

    BR,

    Sayantan

    Tuesday, May 31, 2016 7:16 AM
  • Hello Chiranthaka J!

    You don't need local SharePoint farm in order to develop SharePoint 2013 Apps (Add-ins). Just tested on my environment. You only need to deploy Office Development Tools for your Visual Studio and remote SharePoint farm to debug your solutions. In the remote farm it is better to create site collection with "Developer" site template because it has required features activated by default. 


    If my suggestion helped you to solve your problem, please don't forget to mark it as Answer

    Tuesday, May 31, 2016 10:10 AM
  • in most cases when you work with Sharepoint you have several environments:

    - development environment - your local machine with installed Sharepoint, in most cases all-in-one installation and very often it is created as virtual image. On this environment you have Visual Studio and develop components. Also as you have living Sharepoint site you may install your components there and test them before to install them to test or production

    - test environment (optional) - remote farm with Sharepoint installation. Often it is created on customers' side. It should be closed to production from configuration point of view. The goal of this environment is to test custom components before they will be installed on production.

    - production environment - remote farm with Sharepoint installation with production site. Components are installed there after they are developed and tested on development environment and then tested on test environment (if exists).

    It is possible to develop web parts which use only javascript object model directly on production environment, you don't need Visual Studio for that. But if you need to develop component which uses server object model (C#) you need to use Visual Studio. Like I mentioned above in most cases you do it on local development environment with Sharepoint installation.

    In theory you may develop components on environment without installed Sharepoint only by copying necessary dlls from the server with Sharepoint installation and by referencing them in VS like you mentioned. But in this case you will be able only to compile your component and create wsp/app packages, but not run and test them locally. However this is possible scenario - e.g. this is how I develop Camlex open source library, which generates CAML from C# expressions. In this case it is possible because there are no any actual calls to Sharepoint API - only reference on Microsoft.SharePoint.dll is needed for compilation and analysis of expressions.

    And last option is to install VS on production environment and develop here, but it is not recommended way. First of all it will consume system resources and it may affect performance of production sites and at second components won't be tested before they will be installed to production.


    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

    Tuesday, May 31, 2016 12:09 PM