Microsoft.WindowsAzure.targets file location and how to choose between professional and community
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.
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
1 Posted by David S on 04 Jul, 2017 11:34 AM
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.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:18 AM.