Microsoft.WindowsAzure.targets file location and how to choose between professional and community

David S's Avatar

David S

04 Jul, 2017 11:07 AM

Hi! We have a azure cloud project (ccproj) that imports Microsoft.WindowsAzure.targets. On my local computer it's located here

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\

Note the 'professional' folder. I tried to substitute with 'Community' but it doesn't seem to work on appveyor visual studio 2017 build environment.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\

Do I have the wrong path or am I doing something wrong in the way that I check whether the paths exist in the ccproj file?

<PropertyGroup>
    <TargetsFileDir Condition="Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\')">C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\</TargetsFileDir>
    <TargetsFileDir Condition="Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\')">C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\</TargetsFileDir>
  </PropertyGroup>
  <Import Project="$(TargetsFileDir)Microsoft.WindowsAzure.targets" />

This is the error message I get in appveyor and it seems that both conditionals fail and it reverts to local project dir, so it should mean I have the wrong path for the targets file right?

C:\projects\myproject\MyProject\MyProject.ccproj(118,3): error MSB4019: The imported project "C:\projects\myproject\MyProject\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

  1. 1 Posted by David S on 04 Jul, 2017 11:34 AM

    David S's Avatar

    Nevermind.

    My setup works but I had a yml file that was overriding the visual studio version. I had set 2017 in appveyor UI but in the yml file it was 2015.

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:18 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jun, 2025 08:45 PM
18 Jun, 2025 04:23 PM
13 Jun, 2025 04:36 PM
13 Jun, 2025 04:27 PM
13 Jun, 2025 07:20 AM

 

10 Jun, 2025 01:56 AM
09 Jun, 2025 07:11 PM
04 Jun, 2025 04:08 PM
27 May, 2025 05:48 PM
27 May, 2025 06:37 AM
27 May, 2025 06:31 AM