@@ -11,23 +11,23 @@ Copyright (C) 2011-2016 Xamarin. All rights reserved.
11
11
-->
12
12
<Project InitialTargets =" RedirectMonoAndroidSdkPaths;RemoveSdksCache" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
13
13
14
- <PropertyGroup >
14
+ <PropertyGroup Condition = " '$(VsInstallRoot)' != '' " >
15
15
<!-- Grab InstallationID from devenv.ini.isolation's InstallationID=[ID] -->
16
16
<DevEnvIni >$([System.IO.File]::ReadAllText('$(VsInstallRoot)\Common7\IDE\devenv.isolation.ini'))</DevEnvIni >
17
17
<InstallationIDEqualsIndex >$(DevEnvIni.IndexOf('InstallationID='))</InstallationIDEqualsIndex >
18
18
<InstallationIDEqualsIndex >$([MSBuild]::Add('$(InstallationIDEqualsIndex)', '15'))</InstallationIDEqualsIndex >
19
19
<VsInstallationID >$(DevEnvIni.Substring($(InstallationIDEqualsIndex), 8))</VsInstallationID >
20
20
</PropertyGroup >
21
21
22
- <PropertyGroup >
22
+ <PropertyGroup Condition = " '$(VsInstallRoot)' != '' " >
23
23
<!-- Until VS2017+ includes its own ReferenceAssemblies outside of C:\Program Files (x86)\Reference Assemblies and into
24
24
the VsInstallRoot, we must override this ourselves for our SDKs -->
25
- <TargetFrameworkRootPath >$(VsInstallRoot)\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\</TargetFrameworkRootPath >
26
- <FrameworkPathOverride >$(TargetFrameworkRootPath)MonoAndroid\v1.0</FrameworkPathOverride >
25
+ <TargetFrameworkRootPath Condition = " '$(TargetFrameworkRootPath)' == '' " >$(VsInstallRoot)\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\</TargetFrameworkRootPath >
26
+ <FrameworkPathOverride Condition = " '$(FrameworkPathOverride)' == '' " >$(TargetFrameworkRootPath)MonoAndroid\v1.0</FrameworkPathOverride >
27
27
<XamarinAndroidSdkPropsImported >true</XamarinAndroidSdkPropsImported >
28
28
</PropertyGroup >
29
29
30
- <Target Name =" RedirectMonoAndroidSdkPaths" >
30
+ <Target Name =" RedirectMonoAndroidSdkPaths" Condition = " '$(VsInstallRoot)' != '' " >
31
31
<PropertyGroup >
32
32
<MonoAndroidToolsDirectory Condition =" '$(MonoAndroidToolsDirectory)' == '' " >$(VsInstallRoot)\MSBuild\Xamarin\Android</MonoAndroidToolsDirectory >
33
33
<MonoAndroidBinDirectory Condition =" '$(MonoAndroidBinDirectory)' == '' " >$(VsInstallRoot)\MSBuild\Xamarin\Android</MonoAndroidBinDirectory >
@@ -40,7 +40,7 @@ Copyright (C) 2011-2016 Xamarin. All rights reserved.
40
40
<Delete Files =" $(IntermediateOutputPath)sdks.cache" />
41
41
</Target >
42
42
43
- <UsingTask TaskName =" SetVsMonoAndroidRegistryKey" TaskFactory =" CodeTaskFactory" AssemblyFile =" $(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
43
+ <UsingTask Condition = " '$(VsInstallRoot)' != '' " TaskName =" SetVsMonoAndroidRegistryKey" TaskFactory =" CodeTaskFactory" AssemblyFile =" $(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
44
44
<ParameterGroup >
45
45
<InstallationID Required =" true" />
46
46
<VisualStudioVersion Required =" true" />
0 commit comments