Skip to content

Commit

Permalink
Merge pull request #640 from jamesmontemagno/jamesmontemagno-patch-6
Browse files Browse the repository at this point in the history
Build a class library
  • Loading branch information
jamesmontemagno authored Oct 18, 2024
2 parents 525fd07 + f4aba4c commit 9a17c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/Plugin.InAppBilling/CrossInAppBilling.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public static IInAppBilling Current
}
}

#if ANDROID || IOS || MACCATALYST || MACOS || WINDOWS
static IInAppBilling CreateInAppBilling() => new InAppBillingImplementation();
#else
static IInAppBilling CreateInAppBilling() => null;
#endif

internal static Exception NotImplementedInReferenceAssembly() =>
new NotImplementedException("This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.");
Expand Down
6 changes: 3 additions & 3 deletions src/Plugin.InAppBilling/Plugin.InAppBilling.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-macos</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-macos</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<UseMaui>true</UseMaui>
<UseMauiEssentials>true</UseMauiEssentials>
<UseMaui Condition="'$(TargetFramework)' != 'net8.0'">true</UseMaui>
<UseMauiEssentials Condition="'$(TargetFramework)' != 'net8.0'">true</UseMauiEssentials>
<SingleProject>true</SingleProject>
<AssemblyName>Plugin.InAppBilling</AssemblyName>
<RootNamespace>Plugin.InAppBilling</RootNamespace>
Expand Down

0 comments on commit 9a17c00

Please sign in to comment.