locked
Visual Studio Code finds errors in Azure Deployment JSON templates due to capitalisation RRS feed

  • Question

  • I download the 'Automation Script' from Azure Resource Manager Portal and here is a snippet of it:

    {
        "$schema": "xxxxs://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
            "virtualMachines_ICB_Jumpbox_name": {
                "defaultValue": "ICB-Jumpbox",
                "type": "String"
            },

    When I open the template.json file from the downloaded Zip file in Visual Studio Code it finds errors because

    "type": "String"

    uses a capital 'S' rather than a lowercase 's'.

    If I copy the warning in VS Code it is this:

    file: 'file:///c%3A/IB/AzureRepos/Jumpbox/template.json'
    severity: 'Warning'
    message: 'Value is not accepted. Valid values: ["string","securestring","int","bool","object","secureObject","array"]'
    at: '7,21'
    source: ''

    As can be seen this is because VS Code is expecting "string" not "String".

    I am don't know for sure which is correct but since Azure doesn't care about capitalisation the simplest solution would be seem to be to edit the file that forms the error checking in VS Code to let VS Code know that "String" is equally valid.

    Alternatively escalate to the Azure team to have them create Automation Scripts with JSON formatted with lowercase.

    In the meantime I can ignore the errors (or edit String to string) but if anyone has a good way to remove the errors by editing the error checking file in VS Code please let me know.

    Thanks, Ian

    Friday, June 16, 2017 9:13 AM

All replies

  • Hi lan B999,

    Thanks for posting here.

    This forum is about the Visual Studio IDE, as your issue is more related to the Visual Studio code, This is out of our support. Please reopen a new thread on GitHub or Stackoverflow .

    If you have some VS IDE questions, please feel free to contact us. We will try our best to give you a solution.

    Thanks for your understanding and cooperation.


    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, June 19, 2017 7:34 AM