Answered by:
Excluding Office.js files from solution

Question
-
Given an office add-in that picks up Office.js from the cdn, it is possible remove the Office.js files from the solution/project and still get Intellisense to work?
If yes, please provide some pointers. Thanks!
Friday, January 15, 2016 8:42 PM
Answers
-
Which files are your removing from your solution? I assume its the "Office" folder and all the files in it that's is automatically added to your web project?
You'll have to update your _references.js files and remove the references to the offline intellisense files. If you use the basic office add in template created by VS, the file should then look similar to this:
/// <reference path="jquery-1.9.1.js" />
/// <reference path="_officeintellisense.js" />
/// <reference path="https://appsforoffice.microsoft.com/lib/1/hosted/outlook-win32.debug.js" />
/// <reference path="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" />- Proposed as answer by Fei XueMicrosoft employee Monday, January 18, 2016 5:56 AM
- Marked as answer by E. Alex Davis Wednesday, January 20, 2016 11:37 PM
Saturday, January 16, 2016 3:47 PM
All replies
-
Which files are your removing from your solution? I assume its the "Office" folder and all the files in it that's is automatically added to your web project?
You'll have to update your _references.js files and remove the references to the offline intellisense files. If you use the basic office add in template created by VS, the file should then look similar to this:
/// <reference path="jquery-1.9.1.js" />
/// <reference path="_officeintellisense.js" />
/// <reference path="https://appsforoffice.microsoft.com/lib/1/hosted/outlook-win32.debug.js" />
/// <reference path="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" />- Proposed as answer by Fei XueMicrosoft employee Monday, January 18, 2016 5:56 AM
- Marked as answer by E. Alex Davis Wednesday, January 20, 2016 11:37 PM
Saturday, January 16, 2016 3:47 PM -
Hi E.Alex Davis,
IntelliSense helps you write code faster and with fewer errors by providing information while you code. As you work with client script in the JavaScript editor, IntelliSense lists the objects, functions, properties, and parameters that are available based on your current context. You can select a coding option from the pop-up list provided by IntelliSense to complete the code.
The IntelliSense wouldn't affect how the JavaScript work and there are kinds of way to determine IntelliSense Context. As Hennie mentioned, if you create the Office add-in using the templates provide by Visual Studio, there are two files _officeintellisense.js and _references.js to make the JavaScript IntelliSense work for the Office.js.
We are not necessary to refer to the Office.js to make the JavaScript IntelliSense wok. You can get more detail about this topic from link below:
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Edited by Fei XueMicrosoft employee Monday, January 18, 2016 6:04 AM
Monday, January 18, 2016 6:03 AM