Xamarin .NET 6 *early* preview. Not for production use.
Перейти к файлу
Juan Marcelo Tondato 1e38062b9b
[vs] Fix solution configurations, add platform-specific solutions (#38)
Changes required to open solution in Visual Studio. The original `.sln` files were not quite correct.

Created a new `vs` directory to include additional platform-specific solutions.
2020-10-16 13:20:06 -05:00
HelloAndroid Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
HelloForms Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
HelloForms.Droid Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
HelloForms.iOS Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
HelloiOS Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
scripts Bump to .NET 5.0.100-rc.2.20480.7 (#36) 2020-10-08 13:55:38 -05:00
vs [vs] Fix solution configurations, add platform-specific solutions (#38) 2020-10-16 13:20:06 -05:00
.gitignore New project templates from VS 2019 16.5 2020-04-15 15:00:54 -05:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-04-15 08:04:22 -07:00
Directory.Build.targets Use TargetFramework=net5.0-android/ios and other cleanup (#33) 2020-09-24 08:23:30 -05:00
Directory.iOS.targets Bump iOS, add workarounds for Forms issues and improve README. (#8) 2020-04-24 08:49:39 -05:00
LICENSE Initial LICENSE commit 2020-04-15 08:04:23 -07:00
NuGet.config Uppdate NuGet.config for net6/net5 feeds (#31) 2020-09-08 23:10:29 -05:00
README.md Bump to .NET 5.0.100-rc.2.20480.7 (#36) 2020-10-08 13:55:38 -05:00
SECURITY.md Initial SECURITY.md commit 2020-04-15 08:04:26 -07:00
azure-pipelines.yml Bump to .NET 5.0.100-rc.2.20480.7 (#36) 2020-10-08 13:55:38 -05:00
global.json Bump iOS to get fix for #35 (#37) 2020-10-12 10:40:57 -05:00
net6-samples.sln [vs] Fix solution configurations, add platform-specific solutions (#38) 2020-10-16 13:20:06 -05:00

README.md

net6-samples

This is an early preview of Xamarin in .NET 6 not for production use. Expect breaking changes as Xamarin is still in development for .NET 6.

This repo requires a specific build of .NET 5 rc 2:

NOTE: newer builds may work, but your mileage may vary. You can find the full list of builds at the dotnet/installer repo.

Projects:

  • HelloAndroid - a native Xamarin.Android application
  • HelloiOS - a native Xamarin.iOS application
  • HelloForms, HelloForms.iOS, HelloForms.Droid - a cross-platform Xamarin.Forms application

Android

Prerequisites:

  • You will need the Android SDK installed as well as Android SDK Platform 30. Simplest way to get this is to install the current Xamarin workload and go to Tools > Android > Android SDK Manager from within Visual Studio.

For example, to build the Android project:

dotnet build HelloAndroid/HelloAndroid.csproj

You can launch the Android project to an attached emulator or device via:

dotnet build HelloAndroid/HelloAndroid.csproj -t:Run

iOS

Prerequisites:

  • Xcode 11.4. Earlier versions won't work.

To build the iOS project:

dotnet build HelloiOS/HelloiOS.csproj

To launch the iOS project on a simulator:

dotnet build HelloiOS/HelloiOS.csproj -t:Run

Known Issues

Currently...

  • There is not a way to setup a binding project for Xamarin.iOS.
  • System.Console.WriteLine does not work on Xamarin.Android. Use Android.Util.Log.Debug for now.
  • Building for device doesn't work for iOS.
  • Building for tvOS or watchOS does not work.

Workarounds

These are notes for things we had to workaround for these samples to work.

NuGet

Currently, NuGet is not able to restore existing Xamarin.Android/iOS packages for a .NET 6 project. We tried $(AssetTargetFallback), however, this option does not work in combination with transitive dependencies. The Xamarin.AndroidX.* set of NuGet packages has a complex dependency tree.

Additionally, we had some problems with the Xamarin.Forms NuGet package listing the same assembly in both:

  • lib\netstandard2.0\Xamarin.Forms.Platform.dll
  • lib\MonoAndroid10.0\Xamarin.Forms.Platform.dll

For now we added workarounds in xamarin-android, see xamarin-android#4663.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.