Visual Studio error when trying to create MVC appl

2019-09-19 07:52发布

I want to create a new MVC application with Visual Studio Community 2015. I've followed this tutorial on how to do this and I've gone as far as creating the application, but after I click 'Create' to create the application, the error message below is displayed. Error message

Is this message referring to the Azure API version for Visual Studio? If so, how should I resolve this? I've looked online and I can't seem to find anything about this error. I'm a newbie at this, so I'm not sure if I've overlooked anything, but I don't seem to according to the tutorial. Any help is greatly appreciated!

UPDATE The image below shows the SQL API version I've found. It's odd thought, because it does not match the version shown in the error message. enter image description here

2条回答
forever°为你锁心
2楼-- · 2019-09-19 08:05

I'm not sure how, but this evening when I went to try it again, it worked. Thank you all for your answers!

查看更多
做自己的国王
3楼-- · 2019-09-19 08:10

As the error message says the API have to be in correct format yyyy-MM-dd.

API version I was using recently was 2014-04-01 or 2014-04-01-preview. Try any of these when defining SqlServer resouce.

Also have a look at resources.azure.com if you have any SqlServers created and double check the API version from there..

This does not relate to the Azure Sdk version for Visual Studio. It relates to the (in your case) API version used to create SqlServer instance using Azure Resource Manager

Sample SqlServer and database resource node:

"resources": [
    {
      "name": "[parameters('sqlServerName')]",
      "type": "Microsoft.Sql/servers",
      "location": "[resourceGroup().location]",
      "apiVersion": "2014-04-01-preview",
      "dependsOn": [ ],
      "tags": {
        "displayName": "SqlServer"
      },
      "properties": {
        "administratorLogin": "[parameters('sqlDatabaseUserName')]",
        "administratorLoginPassword": "[parameters('sqlDatabasePassword')]",
        "version": "12.0"
      },
      "resources": [
        {
          "name": "AllowAllWindowsAzureIps",
          "type": "firewallrules",
          "location": "[resourceGroup().location]",
          "apiVersion": "2014-04-01-preview",
          "dependsOn": [
            "[concat('Microsoft.Sql/servers/', parameters('sqlServerName'))]"
          ],
          "properties": {
            "startIpAddress": "0.0.0.0",
            "endIpAddress": "255.255.255.255"
          }
        },
        {
          "name": "[parameters('databaseName')]",
          "type": "databases",
          "location": "[resourceGroup().location]",
          "apiVersion": "2014-04-01-preview",
          "kind": "v12.0",
          "dependsOn": [
            "[parameters('sqlServerName')]"
          ],
          "tags": {
            "displayName": "SqlDatabase"
          },
          "properties": {
            "collation": "[parameters('sqlDatabaseUriNameCollation')]",
            "edition": "[parameters('sqlDatabaseUriNameEdition')]",
            "maxSizeBytes": "10737418240"
            //10 gigs currently
          }
        }
      ]
    }

Also as @Robert McKee pointed make sure you have latest Azure SDK (2.7.1 or 2.8 released recently)

查看更多
登录 后发表回答