Visual Studio Build - Azure 2.9 SDK

2019-07-31 17:30发布

问题:

I am trying to build my software on Visual Studio Team Services. I recently upgraded from VS 2013 to VS 2015. I upgraded from the Azure 2.6 to the Azure 2.9 SDK. When the software builds, I get this error:

C:\a\src\CCC\Azure\CloudService1\CloudService1.ccproj (95, 0) The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.9\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

Is 2.9 not supported at this time? Here is my ccproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
 <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>2.9</ProductVersion>
<ProjectGuid>XX</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CloudService1</RootNamespace>
<AssemblyName>CloudService1</AssemblyName>
<StartDevelopmentStorage>True</StartDevelopmentStorage>
<Name>CloudService1</Name>
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<UseEmulatorExpressByDefault>False</UseEmulatorExpressByDefault>
 </PropertyGroup>
  <!-- Import the target files for this project template -->
  <PropertyGroup>
    <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
    <CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.9\</CloudExtensionsDir>
  </PropertyGroup>
  <Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />

回答1:

I found out that the XAML Build Definitions are being deprecated, so you cannot publish any builds higher than Azure SDK 2.8. You must upgrade to the hosted build:

  1. In VS, go to team explorer > builds.
  2. Under triggers, set it to manual. This will turn off the automatic XAML builds.
  3. In Visual Studio Online, select your project.
  4. Click builds.
  5. Click the plus sign.
  6. Select Visual Studio.
  7. Create a new build definition.


标签: azure msbuild