Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 00e1282

Browse files
committed
conditional references (projects nugets)
1 parent 1067b96 commit 00e1282

File tree

16 files changed

+584
-263
lines changed

16 files changed

+584
-263
lines changed

source/Extensions/Xamarin.Auth.Extensions.LinkSource/Xamarin.Auth.Extensions.LinkSource.csproj

+34-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1111
<NuGetPackageImportStamp>
1212
</NuGetPackageImportStamp>
13-
<XamarinAuthCustomPreprocessorConstantsDefines></XamarinAuthCustomPreprocessorConstantsDefines>
13+
<XamarinAuthCustomPreprocessorConstantsDefines>
14+
</XamarinAuthCustomPreprocessorConstantsDefines>
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>
@@ -23,7 +24,8 @@
2324
<ConsolePause>false</ConsolePause>
2425
</PropertyGroup>
2526
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType></DebugType>
27+
<DebugType>
28+
</DebugType>
2729
<Optimize>true</Optimize>
2830
<OutputPath>bin\Release</OutputPath>
2931
<ErrorReport>prompt</ErrorReport>
@@ -63,11 +65,35 @@
6365
<ItemGroup>
6466
<None Include="packages.config" />
6567
</ItemGroup>
66-
<ItemGroup>
67-
<ProjectReference Include="..\..\Core\Xamarin.Auth.Common.LinkSource\Xamarin.Auth.Common.LinkSource.csproj">
68-
<Project>{ede30d4f-fc0d-458a-a358-a745fc138df3}</Project>
69-
<Name>Xamarin.Auth.Common.LinkSource</Name>
70-
</ProjectReference>
71-
</ItemGroup>
68+
<!--
69+
==================================================================================================
70+
If projects for references can be found use ProjectReferences otherwise use NuGet references
71+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
72+
msbuild Choose When ProjectReference Reference Include
73+
-->
74+
<Choose>
75+
<When Condition="! exists('..\..\Core\Xamarin.Auth.Common.LinkSource\Xamarin.Auth.Common.LinkSource.csproj')">
76+
<!-- nuget packages (dll) refs -->
77+
<ItemGroup>
78+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
79+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+XamarinIOS10\Xamarin.Auth.dll</HintPath>
80+
<Name>Xamarin.Auth.LinkSource NuGet Bait-n-Switch</Name>
81+
</Reference>
82+
</ItemGroup>
83+
</When>
84+
<Otherwise>
85+
<!-- project refs -->
86+
<ItemGroup>
87+
<ProjectReference Include="..\..\Core\Xamarin.Auth.Common.LinkSource\Xamarin.Auth.Common.LinkSource.csproj">
88+
<Project>{ede30d4f-fc0d-458a-a358-a745fc138df3}</Project>
89+
<Name>Xamarin.Auth.Common.LinkSource</Name>
90+
</ProjectReference>
91+
</ItemGroup>
92+
</Otherwise>
93+
</Choose>
94+
<!--
95+
If projects for references can be found use ProjectReferences otherwise use NuGet references
96+
==================================================================================================
97+
-->
7298
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7399
</Project>

source/Extensions/Xamarin.Auth.Extensions.NetStandard16/Xamarin.Auth.Extensions.NetStandard16.csproj

+29-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,35 @@
2121
<Compile Include="..\Xamarin.Auth.Extensions.LinkSource\Properties\AssemblyInfo.cs" Link="Properties\AssemblyInfo.cs" />
2222
</ItemGroup>
2323

24-
<ItemGroup>
25-
<ProjectReference Include="..\..\Core\Xamarin.Auth.NetStandard16\Xamarin.Auth.NetStandard16.csproj" />
26-
</ItemGroup>
27-
24+
<!--
25+
==================================================================================================
26+
If projects for references can be found use ProjectReferences otherwise use NuGet references
27+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
28+
msbuild Choose When ProjectReference Reference Include
29+
-->
30+
<Choose>
31+
<When Condition="! exists('..\..\Core\Xamarin.Auth.NetStandard16\Xamarin.Auth.NetStandard16.csproj')">
32+
<!-- nuget packages (dll) refs -->
33+
<ItemGroup>
34+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
35+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\netstandard16\Xamarin.Auth.dll</HintPath>
36+
<Name>Xamarin.Auth.NetStandard16 NuGet Bait-n-Switch</Name>
37+
</Reference>
38+
</ItemGroup>
39+
</When>
40+
<Otherwise>
41+
<!-- project refs -->
42+
<ItemGroup>
43+
<ProjectReference Include="..\..\Core\Xamarin.Auth.NetStandard16\Xamarin.Auth.NetStandard16.csproj">
44+
<Name>Xamarin.Auth.UniversalWindowsPlatform Project Reference</Name>
45+
</ProjectReference>
46+
</ItemGroup>
47+
</Otherwise>
48+
</Choose>
49+
<!--
50+
If projects for references can be found use ProjectReferences otherwise use NuGet references
51+
==================================================================================================
52+
-->
2853
<ItemGroup>
2954
<Folder Include="Properties\" />
3055
</ItemGroup>

source/Extensions/Xamarin.Auth.Extensions.Portable/Xamarin.Auth.Extensions.Portable.csproj

+32-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<NuGetPackageImportStamp>
1414
</NuGetPackageImportStamp>
15-
<XamarinAuthCustomPreprocessorConstantsDefines></XamarinAuthCustomPreprocessorConstantsDefines>
15+
<XamarinAuthCustomPreprocessorConstantsDefines>
16+
</XamarinAuthCustomPreprocessorConstantsDefines>
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>
@@ -53,12 +54,36 @@
5354
<ItemGroup>
5455
<None Include="packages.config" />
5556
</ItemGroup>
56-
<ItemGroup>
57-
<ProjectReference Include="..\..\Core\Xamarin.Auth.Portable\Xamarin.Auth.Portable.csproj">
58-
<Project>{87580927-9f8e-42ae-bdfe-35f95abf17d8}</Project>
59-
<Name>Xamarin.Auth.Portable</Name>
60-
</ProjectReference>
61-
</ItemGroup>
57+
<!--
58+
==================================================================================================
59+
If projects for references can be found use ProjectReferences otherwise use NuGet references
60+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
61+
msbuild Choose When ProjectReference Reference Include
62+
-->
63+
<Choose>
64+
<When Condition="! exists('..\..\Core\Xamarin.Auth.Portable\Xamarin.Auth.Portable.csproj')">
65+
<!-- nuget packages (dll) refs -->
66+
<ItemGroup>
67+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
68+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+XamarinIOS10\Xamarin.Auth.dll</HintPath>
69+
<Name>Xamarin.Auth.Portable NuGet Bait-n-Switch</Name>
70+
</Reference>
71+
</ItemGroup>
72+
</When>
73+
<Otherwise>
74+
<!-- project refs -->
75+
<ItemGroup>
76+
<ProjectReference Include="..\..\Core\Xamarin.Auth.Portable\Xamarin.Auth.Portable.csproj">
77+
<Project>{87580927-9f8e-42ae-bdfe-35f95abf17d8}</Project>
78+
<Name>Xamarin.Auth.Portable</Name>
79+
</ProjectReference>
80+
</ItemGroup>
81+
</Otherwise>
82+
</Choose>
83+
<!--
84+
If projects for references can be found use ProjectReferences otherwise use NuGet references
85+
==================================================================================================
86+
-->
6287
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
6388
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
6489
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

source/Extensions/Xamarin.Auth.Extensions.WindowsPhone81/Xamarin.Auth.Extensions.WindowsPhone81.csproj

+29-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,35 @@
9191
<Link>Properties\AssemblyInfo.cs</Link>
9292
</Compile>
9393
</ItemGroup>
94-
<ItemGroup>
95-
<Reference Include="Xamarin.Auth">
96-
<HintPath>..\..\packages\Xamarin.Auth.1.3.0-alpha-03\lib\wp8\Xamarin.Auth.dll</HintPath>
97-
</Reference>
98-
</ItemGroup>
94+
<!--
95+
==================================================================================================
96+
If projects for references can be found use ProjectReferences otherwise use NuGet references
97+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
98+
msbuild Choose When ProjectReference Reference Include
99+
-->
100+
<Choose>
101+
<When Condition="! exists('..\..\Core\Xamarin.Auth.WindowsPhone81\Xamarin.Auth.WindowsPhone81.csproj')">
102+
<!-- nuget packages (dll) refs -->
103+
<ItemGroup>
104+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
105+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\wp8\Xamarin.Auth.dll</HintPath>
106+
<Name>Xamarin.Auth.WindowsPhone81 NuGet Bait-n-Switch</Name>
107+
</Reference>
108+
</ItemGroup>
109+
</When>
110+
<Otherwise>
111+
<!-- project refs -->
112+
<ItemGroup>
113+
<ProjectReference Include="..\..\Core\Xamarin.Auth.WindowsPhone81\Xamarin.Auth.WindowsPhone81.csproj">
114+
<Name>Xamarin.Auth.WindowsPhone81 Project Reference</Name>
115+
</ProjectReference>
116+
</ItemGroup>
117+
</Otherwise>
118+
</Choose>
119+
<!--
120+
If projects for references can be found use ProjectReferences otherwise use NuGet references
121+
==================================================================================================
122+
-->
99123
<ItemGroup>
100124
<None Include="packages.config" />
101125
</ItemGroup>

source/Extensions/Xamarin.Auth.Extensions.XamarinAndroid/Xamarin.Auth.Extensions.XamarinAndroid.csproj

+30-6
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,36 @@
107107
<ItemGroup>
108108
<AndroidResource Include="Resources\values\Strings.xml" />
109109
</ItemGroup>
110-
<ItemGroup>
111-
<ProjectReference Include="..\..\Core\Xamarin.Auth.XamarinAndroid\Xamarin.Auth.XamarinAndroid.csproj">
112-
<Project>{47ec107c-ebb2-4676-82db-f77b7bfc17ac}</Project>
113-
<Name>Xamarin.Auth.XamarinAndroid</Name>
114-
</ProjectReference>
115-
</ItemGroup>
110+
<!--
111+
==================================================================================================
112+
If projects for references can be found use ProjectReferences otherwise use NuGet references
113+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
114+
msbuild Choose When ProjectReference Reference Include
115+
-->
116+
<Choose>
117+
<When Condition="! exists('..\..\Core\Xamarin.Auth.XamarinAndroid\Xamarin.Auth.XamarinAndroid.csproj')">
118+
<!-- nuget packages (dll) refs -->
119+
<ItemGroup>
120+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
121+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\MonoAndroid10\Xamarin.Auth.dll</HintPath>
122+
<Name>Xamarin.Auth.XamarinAndroid NuGet Bait-n-Switch</Name>
123+
</Reference>
124+
</ItemGroup>
125+
</When>
126+
<Otherwise>
127+
<!-- project refs -->
128+
<ItemGroup>
129+
<ProjectReference Include="..\..\Core\Xamarin.Auth.XamarinAndroid\Xamarin.Auth.XamarinAndroid.csproj">
130+
<Project>{47ec107c-ebb2-4676-82db-f77b7bfc17ac}</Project>
131+
<Name>Xamarin.Auth.XamarinAndroid</Name>
132+
</ProjectReference>
133+
</ItemGroup>
134+
</Otherwise>
135+
</Choose>
136+
<!--
137+
If projects for references can be found use ProjectReferences otherwise use NuGet references
138+
==================================================================================================
139+
-->
116140
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
117141
<Import Project="..\..\packages\Xamarin.Android.Support.Compat.25.1.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Compat.25.1.1\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets')" />
118142
<Import Project="..\..\packages\Xamarin.Android.Support.Core.UI.25.1.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Core.UI.25.1.1\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets')" />

source/Extensions/Xamarin.Auth.Extensions.XamarinIOS/Xamarin.Auth.Extensions.XamarinIOS.csproj

+36-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<AssemblyName>Xamarin.Auth.Extensions</AssemblyName>
1212
<NuGetPackageImportStamp>
1313
</NuGetPackageImportStamp>
14-
<XamarinAuthCustomPreprocessorConstantsDefines></XamarinAuthCustomPreprocessorConstantsDefines>
14+
<XamarinAuthCustomPreprocessorConstantsDefines>
15+
</XamarinAuthCustomPreprocessorConstantsDefines>
1516
</PropertyGroup>
1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1718
<DebugSymbols>true</DebugSymbols>
@@ -24,7 +25,8 @@
2425
<ConsolePause>false</ConsolePause>
2526
</PropertyGroup>
2627
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType></DebugType>
28+
<DebugType>
29+
</DebugType>
2830
<Optimize>true</Optimize>
2931
<OutputPath>bin\Release</OutputPath>
3032
<DefineConstants>__UNIFIED__;__MOBILE__;__IOS__;$(XamarinAuthCustomPreprocessorConstantsDefines)</DefineConstants>
@@ -73,13 +75,37 @@
7375
<ItemGroup>
7476
<None Include="packages.config" />
7577
</ItemGroup>
76-
<ItemGroup>
77-
<ProjectReference Include="..\..\Core\Xamarin.Auth.XamarinIOS\Xamarin.Auth.XamarinIOS.csproj">
78-
<Project>{15be2387-8e72-4c0b-8a6a-460ef5fa4539}</Project>
79-
<Name>Xamarin.Auth.XamarinIOS</Name>
80-
<IsAppExtension>false</IsAppExtension>
81-
<IsWatchApp>false</IsWatchApp>
82-
</ProjectReference>
83-
</ItemGroup>
78+
<!--
79+
==================================================================================================
80+
If projects for references can be found use ProjectReferences otherwise use NuGet references
81+
http://laurentkempe.com/2009/12/03/ProjectReference-with-Condition-in-your-MSBuild-project-files/
82+
msbuild Choose When ProjectReference Reference Include
83+
-->
84+
<Choose>
85+
<When Condition="! exists('..\..\Core\Xamarin.Auth.XamarinIOS\Xamarin.Auth.XamarinIOS.csproj')">
86+
<!-- nuget packages (dll) refs -->
87+
<ItemGroup>
88+
<Reference Include="Xamarin.Auth NuGet Bait-n-Switch">
89+
<HintPath>..\packages\Xamarin.Auth.1.5.0.3\lib\Xamarin.iOS10\Xamarin.Auth.dll</HintPath>
90+
<Name>Xamarin.Auth.XamarinIOS NuGet Bait-n-Switch</Name>
91+
</Reference>
92+
</ItemGroup>
93+
</When>
94+
<Otherwise>
95+
<!-- project refs -->
96+
<ItemGroup>
97+
<ProjectReference Include="..\..\Core\Xamarin.Auth.XamarinIOS\Xamarin.Auth.XamarinIOS.csproj">
98+
<Project>{15be2387-8e72-4c0b-8a6a-460ef5fa4539}</Project>
99+
<Name>Xamarin.Auth.XamarinIOS</Name>
100+
<IsAppExtension>false</IsAppExtension>
101+
<IsWatchApp>false</IsWatchApp>
102+
</ProjectReference>
103+
</ItemGroup>
104+
</Otherwise>
105+
</Choose>
106+
<!--
107+
If projects for references can be found use ProjectReferences otherwise use NuGet references
108+
==================================================================================================
109+
-->
84110
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
85111
</Project>

0 commit comments

Comments
 (0)