Last active
August 6, 2019 18:01
-
-
Save MSiccDev/cc20181de4bbfb3e725240d52c46acc6 to your computer and use it in GitHub Desktop.
Sdk style csproj template that includes resources as well, plus compiles against Android Oreo, UWP Fall Creators Update and iOS 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<!--Work around so the conditions work below--> | |
<TargetFrameworks></TargetFrameworks> | |
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard1.4;MonoAndroid81;Xamarin.iOS10;uap10.0.16299;</TargetFrameworks> | |
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.4;MonoAndroid81;Xamarin.iOS10;</TargetFrameworks> | |
<AssemblyName>[Insert here]</AssemblyName> | |
<RootNamespace>[Insert here]</RootNamespace> | |
<PackageId>[Insert here]</PackageId> | |
<Product>[Insert here]</Product> | |
<AssemblyVersion>1.0.0.0</AssemblyVersion> | |
<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion> | |
<Version>1.0.0.0</Version> | |
<PackageVersion>1.0.0.0</PackageVersion> | |
<PackOnBuild>true</PackOnBuild> | |
<NeutralLanguage>en</NeutralLanguage> | |
<LangVersion>default</LangVersion> | |
<DefineConstants>$(DefineConstants);</DefineConstants> | |
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | |
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile> | |
<UseFullSemVerForNuGet>false</UseFullSemVerForNuGet> | |
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | |
<PackageLicenseUrl>[Insert here]</PackageLicenseUrl> | |
<PackageProjectUrl>[Insert here]</PackageProjectUrl> | |
<RepositoryUrl>[Insert here]</RepositoryUrl> | |
<PackageReleaseNotes>[Insert here]</PackageReleaseNotes> | |
<PackageIconUrl>[Insert here]</PackageIconUrl> | |
<PackageTags>xamarin, windows, ios, android, xamarin.forms</PackageTags> | |
<Title>[Insert here]</Title> | |
<Summary>Summary of nuget</Summary> | |
<Description>[Insert here]</Description> | |
<Owners>YOU</Owners> | |
<Authors>YOU</Authors> | |
<Copyright>Copyright 2018</Copyright> | |
</PropertyGroup> | |
<ItemGroup> | |
<!-- This None is here so the conditionally included files show up in the Solution Explorer --> | |
<None Include="**\*.cs;**\*.xml;**\*.axml;**\*.png" Exclude="obj\**\*.*;bin\**\*.*;bin;obj" /> | |
<!-- global package references--> | |
<PackageReference Include="Xamarin.Essentials" Version="0.6.0-preview" /> | |
<PackageReference Include="Xamarin.Forms" Version="3.0.0.446417" /> | |
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.4.0" PrivateAssets="All" /> | |
<!-- UWP uses also xaml files, naming convention includes shared.* to enable different handling if necessary--> | |
<None Remove="**\shared.*.xaml" /> | |
<Compile Update="**\shared.*.xaml.cs" DependentUpon="%(Filename)" /> | |
<EmbeddedResource Include="**\shared.*.xaml" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</EmbeddedResource> | |
<Compile Include="**\*.shared.cs" /> | |
</ItemGroup> | |
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) "> | |
</ItemGroup> | |
<ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) "> | |
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.4" /> | |
<!-- Xamarin Forms uses also xaml files, naming convention includes uwp.* to enable different handling if necessary--> | |
<None Remove="**\uwp.*.xaml" /> | |
<Compile Update="**\uwp.*.xaml.cs" DependentUpon="%(Filename)" /> | |
<EmbeddedResource Include="**\uwp.*.xaml" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</EmbeddedResource> | |
<Compile Include="**\*.uwp.cs" /> | |
</ItemGroup> | |
<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) "> | |
<!--need to reference all those libs to get Android V8.1... #sigh--> | |
<PackageReference Include="Xamarin.Android.Support.Annotations" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Compat" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v7.Palette" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Core.UI" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Fragment" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Media.Compat" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Transition" Version="27.0.2" /> | |
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable" Version="27.0.2" /> | |
<AndroidResource Include="Resources\**\android.*.axml"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</AndroidResource> | |
<AndroidResource Include="Resources\**\android.*.xml"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</AndroidResource> | |
<AndroidResource Include="Resources\**\android.*.png"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</AndroidResource> | |
<Compile Include="**\*.android.cs" /> | |
</ItemGroup> | |
<ItemGroup Condition=" $(TargetFramework.StartsWith('Xamarin.iOS')) "> | |
<Compile Include="**\*.ios.cs" /> | |
<BundleResource Include="Resources\**\ios.*.png"> | |
<IncludeInPackage>true</IncludeInPackage> | |
</BundleResource> | |
<None Update="Resources\**\ios.*.png"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
</ItemGroup> | |
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" /> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment