none
Customize Visual Studio Javascript Intellisense _references.js with different target

    Question

  • Hi,

    is there a way to customize _references.js, so it could target different folders for different users ?

    We are sharing projects between different developpers and path should be personalized, depending on installation folders of some 3rd party tools.

    I was hoping to use an environnement variable to reference a script, like this:

    /// <reference path="$(MyVar)\somescript.js">

    but it does not seem to work.

    Any idea of we could achieve this ?

    Thanks,

    Wednesday, January 11, 2017 2:03 PM

Answers

  • Hi Nicolas,

    Sorry to trouble you and I just want to confirm that your issue is solved or not? If not, please provide the detail information, that will help us to research your issue, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Nicolas Roux Friday, January 20, 2017 4:34 PM
    Monday, January 16, 2017 8:59 AM
    Moderator

All replies

  • Hi Nicolas Roux,

    Welcome to the MSDN forum.

    What’s your project type? If it is ASP.NET project, you can have a try with add reference using the following method:

    <script src="path">

    </script>

    Meanwhile, it looks like you want to dynamically add the reference, you can also have a look at this: https://api.jquery.com/jquery.getscript/

    Since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor, your issue is more relates to the development issue about the JavaScript with different project type. Refer to the project type, we will confirm the appropriate forum to provide a better support for your issue, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, January 12, 2017 6:30 AM
    Moderator
  • Hi Sara,

    Thanks for your reply.

    My case is very particular.

    We are several developpers working with a reference js that is not included in our project. And we need to reference this js file in the _references.js file, to have intellisense. But this js is not in the same folder on our different machines.

    By the way, I can not see your code:

    <script src="路径">

    Nicolas

    Thursday, January 12, 2017 2:53 PM
  • Hi Nicolas,

    Thank you for your reminder and I already updated it.

    >>We are several developpers working with a reference js that is not included in our project.

    What's your project type? Is the ASP.NET or others, the more detail information can help us to research your issue, thank you for your support.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 13, 2017 7:27 AM
    Moderator
  • Hi Nicolas,

    Sorry to trouble you and I just want to confirm that your issue is solved or not? If not, please provide the detail information, that will help us to research your issue, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Nicolas Roux Friday, January 20, 2017 4:34 PM
    Monday, January 16, 2017 8:59 AM
    Moderator
  • Hi Sara,

    I have found a workaround.

    Thanks for your help

    Friday, January 20, 2017 4:45 PM
  • Hi Nicolas,

    I'm so glad to hear that your issue is solved and could you please share your workaround in here when you have free time? It will help other community members who meet the same issue to find your helpful solution, thanks for your support.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 23, 2017 1:25 AM
    Moderator