Visual Studio Tools for Xamarin

Lee, Eunkyung 1 Reputation point
2023-01-06T01:08:09.437+00:00

Install Xamarin cross-platform in VS 2019, and run programs previously developed with C# WinForms.
I wonder if automatic conversion to the app is possible with the conversion concept.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,924 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Takahito Iwasa 4,851 Reputation points MVP
    2023-01-06T06:02:25.993+00:00

    Hi, @Lee, Eunkyung

    no you can't.

    Separating the business logic may allow some portability. Especially the user interface needs to be reworked.
    And they don't convert automatically in Visual Studio 2019.

    See "Porting Guidance" below.

    https://learn.microsoft.com/en-us/xamarin/cross-platform/desktop/porting

    Some code is compatible and may be portable.
    You can do the analysis by using the .NET Portability Analyzer, but not the automatic conversion.

    1 person found this answer helpful.

  2. Lex Li (Microsoft) 6,022 Reputation points Microsoft Employee
    2023-01-07T19:37:24.787+00:00

    If you have a WinForms app at hand and would like to support other platforms, you need to port the useful code over and write some new code.

    There are quite a few UI frameworks you can evaluate and utilize, mobile or desktop,

    https://halfblood.pro/the-story-about-net-cross-platform-ui-frameworks-dd4a9433d0ea

    However, no automatic conversion exists.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.