diff options
author | Bret Johnson <bret.johnson@microsoft.com> | 2022-01-14 22:58:47 +0300 |
---|---|---|
committer | Bret Johnson <bret.johnson@microsoft.com> | 2022-01-14 22:58:47 +0300 |
commit | 346cbe818d613f63bf13437af36e91b7c053ca3d (patch) | |
tree | 44ae43a3f76bc969549c987392fdbe2c18cef637 | |
parent | aa8bc4641c18821269ef10117f05e71f7b7110be (diff) |
Fix Mac.Standalone project to build with .net6
4 files changed, 9 insertions, 177 deletions
diff --git a/Xamarin.PropertyEditing.Mac.Standalone/Info.plist b/Xamarin.PropertyEditing.Mac.Standalone/Info.plist index a9d6ddb..3f7108c 100644 --- a/Xamarin.PropertyEditing.Mac.Standalone/Info.plist +++ b/Xamarin.PropertyEditing.Mac.Standalone/Info.plist @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> @@ -11,7 +11,7 @@ <key>CFBundleVersion</key> <string>1</string> <key>LSMinimumSystemVersion</key> - <string>10.11</string> + <string>10.14</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleInfoDictionaryVersion</key> @@ -28,6 +28,5 @@ <string>Main</string> <key>XSAppIconAssets</key> <string>Assets.xcassets/AppIcon.appiconset</string> - </dict> </plist> diff --git a/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.cs b/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.cs deleted file mode 100644 index ad2e4d0..0000000 --- a/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using Foundation; -using AppKit; -using Xamarin.PropertyEditing.Tests.MockControls; - -namespace Xamarin.PropertyEditing.Mac.Standalone -{ - public abstract class MockedAppKitControlButton<T> : AppKit.NSButtonCell where T : MockControl - { - protected MockedAppKitControlButton (T mockedControl, IntPtr handle) : base (handle) - { - MockedControl = mockedControl; - Initialize (); - } - - protected MockedAppKitControlButton (T mockedControl, NSCoder coder) : base (coder) - { - Initialize (); - MockedControl = mockedControl; - } - - // Shared initialization code - void Initialize () - { - } - - public T MockedControl { get; } - } - - public partial class MockedAppKitButton : MockedAppKitControlButton<MockNSButton> - { - // Called when created from unmanaged code - public MockedAppKitButton (IntPtr handle) : base (new MockNSButton (), handle) - { - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public MockedAppKitButton (NSCoder coder) : base (new MockNSButton (), coder) - { - } - } -} diff --git a/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.designer.cs b/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.designer.cs deleted file mode 100644 index c81fc16..0000000 --- a/Xamarin.PropertyEditing.Mac.Standalone/MockedAppKitControlButton.designer.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Xamarin.PropertyEditing.Mac.Standalone -{ - - // Should subclass AppKit.NSView - [Foundation.Register ("MockedAppKitButton")] - public partial class MockedAppKitButton - { - } -} diff --git a/Xamarin.PropertyEditing.Mac.Standalone/Xamarin.PropertyEditing.Mac.Standalone.csproj b/Xamarin.PropertyEditing.Mac.Standalone/Xamarin.PropertyEditing.Mac.Standalone.csproj index a92df9b..6ea6b0a 100644 --- a/Xamarin.PropertyEditing.Mac.Standalone/Xamarin.PropertyEditing.Mac.Standalone.csproj +++ b/Xamarin.PropertyEditing.Mac.Standalone/Xamarin.PropertyEditing.Mac.Standalone.csproj @@ -1,134 +1,19 @@ <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{8319A66C-72AE-4C40-B737-97279D4AB899}</ProjectGuid>
- <ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TargetFramework>net6.0-macos</TargetFramework>
<OutputType>Exe</OutputType>
- <RootNamespace>Xamarin.PropertyEditing.Mac.Standalone</RootNamespace>
- <AssemblyName>Xamarin.PropertyEditing.Mac.Standalone</AssemblyName>
- <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <TargetFrameworkProfile />
- <XamarinMacAnalyzerMinimumOSVersion>10.12</XamarinMacAnalyzerMinimumOSVersion>
+ <SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <EnableCodeSigning>false</EnableCodeSigning>
- <CodeSigningKey>Mac Developer</CodeSigningKey>
- <CreatePackage>false</CreatePackage>
- <EnablePackageSigning>false</EnablePackageSigning>
- <IncludeMonoRuntime>false</IncludeMonoRuntime>
- <UseSGen>true</UseSGen>
- <UseRefCounting>true</UseRefCounting>
- <Profiling>false</Profiling>
- <HttpClientHandler></HttpClientHandler>
- <LinkMode></LinkMode>
- <XamMacArch></XamMacArch>
- <XamarinInspectorDisabled>True</XamarinInspectorDisabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <DefineConstants></DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <EnableCodeSigning>false</EnableCodeSigning>
- <CreatePackage>true</CreatePackage>
- <EnablePackageSigning>false</EnablePackageSigning>
- <IncludeMonoRuntime>true</IncludeMonoRuntime>
- <UseSGen>true</UseSGen>
- <UseRefCounting>true</UseRefCounting>
- <LinkMode>None</LinkMode>
- <HttpClientHandler></HttpClientHandler>
- <XamMacArch></XamMacArch>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="Xamarin.Mac" />
- </ItemGroup>
- <ItemGroup>
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-128%402x.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-16%402x.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-256%402x.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-32%402x.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512.png" />
- <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\AppIcon-512%402x.png" />
- <ImageAsset Include="Assets.xcassets\Contents.json" />
- <ImageAsset Include="Assets.xcassets\Checkerboard0.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\Checkerboard1.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\ForegroundColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\PadBackgroundColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\PopoverContentBackground.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\ValueBlockBackgroundColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\DescriptionLabelColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\TabBorderColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\PanelTabBackground.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\FrameBoxBorderColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\FrameBoxBackgroundColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\FrameBoxButtonBorderColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\FrameBoxButtonBackgroundColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\ListHeaderSeparatorColor.colorset\Contents.json" />
- <ImageAsset Include="Assets.xcassets\ControlBackground.colorset\Contents.json" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Resources\" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Info.plist" />
- <None Include="Entitlements.plist" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Main.cs" />
- <Compile Include="AppDelegate.cs" />
- <Compile Include="ViewController.cs" />
- <Compile Include="ViewController.designer.cs">
- <DependentUpon>ViewController.cs</DependentUpon>
- </Compile>
- <Compile Include="MockedControlButton.cs" />
- <Compile Include="MockedAppKitButton.cs" />
- <Compile Include="IMockedControl.cs" />
- <Compile Include="MockedSampleControlButton.cs" />
- </ItemGroup>
- <ItemGroup>
- <InterfaceDefinition Include="Main.storyboard" />
- </ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Xamarin.PropertyEditing.Mac\Xamarin.PropertyEditing.Mac.csproj">
- <Project>{E8F4F0EB-C2B1-4116-8459-E076E0E0E485}</Project>
- <Name>Xamarin.PropertyEditing.Mac</Name>
- </ProjectReference>
- <ProjectReference Include="..\Xamarin.PropertyEditing\Xamarin.PropertyEditing.csproj">
- <Project>{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}</Project>
- <Name>Xamarin.PropertyEditing</Name>
- </ProjectReference>
- <ProjectReference Include="..\Xamarin.PropertyEditing.Tests\Xamarin.PropertyEditing.Tests.csproj">
- <Project>{84101D04-9CE4-4CE7-916E-21F86EE96898}</Project>
- <Name>Xamarin.PropertyEditing.Tests</Name>
- </ProjectReference>
+ <ProjectReference Include="..\Xamarin.PropertyEditing.Mac\Xamarin.PropertyEditing.Mac.csproj" />
+ <ProjectReference Include="..\Xamarin.PropertyEditing\Xamarin.PropertyEditing.csproj" />
+ <ProjectReference Include="..\Xamarin.PropertyEditing.Tests\Xamarin.PropertyEditing.Tests.csproj" />
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Target Name="AfterBuild">
<ItemGroup>
<PropertyEditingResourceBundlePath Include="$(OutputPath)\PropertyEditingResource.bundle\**\*" />
</ItemGroup>
- <Copy
- SourceFiles="@(PropertyEditingResourceBundlePath)"
- DestinationFiles="@(PropertyEditingResourceBundlePath->'$(OutputPath)\$(AssemblyName).app\Contents\MonoBundle\PropertyEditingResource.bundle\%(RecursiveDir)%(Filename)%(Extension)')"
- SkipUnchangedFiles="true" />
+ <Copy SourceFiles="@(PropertyEditingResourceBundlePath)" DestinationFiles="@(PropertyEditingResourceBundlePath->'$(OutputPath)\$(AssemblyName).app\Contents\MonoBundle\PropertyEditingResource.bundle\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
\ No newline at end of file |