Reverts IsXamarinForms changes in Playground (#2754)

* Reverts MvvmCross\Projects\Directory.build.props IsXamarinForms changes because it was causing the Xamarin.Forms library to be imported into Playground.Droid.

Adds <PackageReference/> to import Xamarin.Forms for Playground.Forms.* projects.

* Moving Xamarin Forms Package Reference into separate targets file - allows for XF version to be changed in one place
This commit is contained in:
Trevor Balcom 2018-04-03 11:38:45 -04:00 коммит произвёл Tomasz Cielecki
Родитель c8d773d253
Коммит 48cfc8a73b
10 изменённых файлов: 13 добавлений и 14 удалений

Просмотреть файл

@ -35,8 +35,4 @@
<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsLibraryProject)' == 'true'"> <ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsLibraryProject)' == 'true'">
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" /> <PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(IsXamarinForms)' == 'true'">
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project> </Project>

Просмотреть файл

@ -38,4 +38,6 @@
<ItemGroup Condition="$(TargetFramework.StartsWith('uap')) and '$(IsLibraryProject)' == 'true' "> <ItemGroup Condition="$(TargetFramework.StartsWith('uap')) and '$(IsLibraryProject)' == 'true' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.8" /> <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.8" />
</ItemGroup> </ItemGroup>
<Import Project="XamarinForms.targets" Condition="'$(IsXamarinForms)' == 'true'"/>
</Project> </Project>

Просмотреть файл

@ -12,10 +12,5 @@
<Platform>AnyCPU</Platform> <Platform>AnyCPU</Platform>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<IsXamarinForms>$(MSBuildProjectName.Contains('.Forms'))</IsXamarinForms>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(IsXamarinForms)' == 'true'">
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project> </Project>

Просмотреть файл

@ -200,5 +200,6 @@
<Name>Playground.Forms.UI</Name> <Name>Playground.Forms.UI</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="..\..\..\XamarinForms.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project> </Project>

Просмотреть файл

@ -120,10 +120,6 @@
<Name>Playground.Forms.UI</Name> <Name>Playground.Forms.UI</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <Import Project="..\..\..\XamarinForms.targets" />
<PackageReference Include="Xamarin.Forms">
<Version>2.5.0.280555</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
</Project> </Project>

Просмотреть файл

@ -13,4 +13,5 @@
<ProjectReference Include="..\Playground.Core\Playground.Core.csproj" /> <ProjectReference Include="..\Playground.Core\Playground.Core.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\..\XamarinForms.targets" />
</Project> </Project>

Просмотреть файл

@ -176,6 +176,7 @@
<Name>Playground.Forms.UI</Name> <Name>Playground.Forms.UI</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="..\..\..\XamarinForms.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

Просмотреть файл

@ -125,5 +125,6 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<Import Project="..\..\..\XamarinForms.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

Просмотреть файл

@ -156,5 +156,6 @@
<BundleResource Include="Resources\MvvmCross%402x.png" /> <BundleResource Include="Resources\MvvmCross%402x.png" />
<BundleResource Include="Resources\MvvmCross%403x.png" /> <BundleResource Include="Resources\MvvmCross%403x.png" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\..\XamarinForms.targets" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project> </Project>

5
XamarinForms.targets Normal file
Просмотреть файл

@ -0,0 +1,5 @@
<Project>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>