To scaffold a new MvvmCross Xamarin application you must use the mvxnative
command. To specify a name for the projects you can use the -n|--name
option and -sln|--solution-name
for the solution name.
Example command to create a projects prefixed with MyXamarinApp
and a solution file named MyXamarinApp
dotnet new mvxnative --name MyXamarinApp --solution-name MyXamarinApp
For details on the available customisation options for the template use the -h|--help
option
dotnet new mvxnative --help
To scaffold a new MvvmCross Xamarin Forms application you must use the mvxforms
command. To specify a name for the projects you can use the -n|--name
option and -sln|--solution-name
for the solution name.
Example command to create a projects prefixed with MyXamarinFormsApp
and a solution file named MyXamarinApp
dotnet new mvxforms --name MyXamarinFormsApp --solution-name MyXamarinFormsApp
For details on the available customisation options for the template use the -h|--help
option
dotnet new mvxforms --help
MvxScaffolding provides three choices for structuring projects inside of the generate solution: flat
, test-group
or platform
. To select a solution project grouping preference you can use the -sln-gp|--solution-project-grouping
option. The default is flat
.
Example command to create a solution named MyXamarinApp
and solution project grouping of flat
dotnet new mvxnative -n MyXamarinApp -sln MyXamarinApp --solution-project-grouping `flat`
or
dotnet new mvxnative -n MyXamarinApp -sln MyXamarinApp
. βββ !Solution Items β βββ .editorconfig # Root editor config (Optional) βββ {NAME}.Core # Core .NET Standard library βββ {NAME}.Core.Test # Core .NET Standard library (Optional) βββ {NAME}.Droid # Android project (Optional) βββ {NAME}.Droid.Shared # Android shared project included for unit testing (Optional) βββ {NAME}.Droid.Test # Android unit test project (Optional) βββ {NAME}.Droid.UI.Test # Android UI test project (MvxNative Optional) βββ {NAME}.iOS # iOS project (Optional) βββ {NAME}.iOS.Test # iOS unit test project (Optional) βββ {NAME}.iOS.UI.Test # iOS UI test project (MvxNative Optional) βββ {NAME}.UI # Forms UI project (MvxForms Optional) βββ {NAME}.UI.Test # Forms UI test project (MvxForms Optional) βββ {NAME}.UWP # UWP project (Optional) βββ {NAME}.UWP.Test # UWP unit test project (Optional) βββ {NAME}.UWP.UI.Test # UWP UI test project (Optional)
Example command to create a solution named MyXamarinApp
and solution project grouping of test-group
dotnet new mvxnative -n MyXamarinApp -sln MyXamarinApp --solution-project-grouping test-group
. βββ !Solution Items β βββ .editorconfig # Root editor config (Optional) βββ Tests β βββ {NAME}.Core.Test # Core .NET Standard library (Optional) β βββ {NAME}.Droid.Test # Android unit test project (Optional) β βββ {NAME}.Droid.UI.Test # Android UI test project (MvxNative Optional) β βββ {NAME}.iOS.Test # iOS unit test project (Optional) β βββ {NAME}.iOS.UI.Test # iOS UI test project (MvxNative Optional) β βββ {NAME}.UI.Test # Forms UI test project (MvxForms Optional) β βββ {NAME}.UWP.Test # UWP unit test project (Optional) β βββ {NAME}.UWP.UI.Test # UWP UI test project (Optional) βββ {NAME}.Core # Core .NET Standard library βββ {NAME}.Droid # Android project (Optional) βββ {NAME}.Droid.Shared # Android shared project included for unit testing (Optional) βββ {NAME}.iOS # iOS project (Optional) βββ {NAME}.UI # Forms UI project (MvxForms Optional) βββ {NAME}.UWP # UWP project (Optional)
Example command to create a solution named MyXamarinApp
and solution project grouping of platform
dotnet new mvxnative -n MyXamarinApp -sln MyXamarinApp --solution-project-grouping platform
. βββ !Solution Items β βββ .editorconfig # Root editor config (Optional) βββ Android β βββ {NAME}.Droid # Android project (Optional) β βββ {NAME}.Droid.Shared # Android shared project included for unit testing (Optional) β βββ {NAME}.Droid.Test # Android unit test project (Optional) β βββ {NAME}.Droid.UI.Test # Android UI test project (MvxNative Optional) βββ iOS β βββ {NAME}.iOS # iOS project (Optional) β βββ {NAME}.iOS.Test # iOS unit test project (Optional) β βββ {NAME}.iOS.UI.Test # iOS UI test project (MvxNative Optional) βββ UWP β βββ {NAME}.UWP # UWP project (Optional) β βββ {NAME}.UWP.Test # UWP unit test project (Optional) β βββ {NAME}.UWP.UI.Test # UWP UI test project (Optional) βββ {NAME}.Core # Core .NET Standard library βββ {NAME}.Core.Test # Core .NET Standard library (Optional) βββ {NAME}.UI # Forms UI project (MvxForms Optional) βββ {NAME}.UI.Test # Forms UI test project (MvxForms Optional)
MvxNative and MvxForms options
-n|--name The name for the generated projects.
string - Required
-droid|--include-android Whether to include Xamarin Android project.
bool - Optional
Default: true
-ios|--include-ios Whether to include Xamarin iOS project.
bool - Optional
Default: true
-uwp|--include-uwp Whether to include UWP project.
bool - Optional
Default: false
-core-t|--include-core-test Whether to include Core unit test project.
bool - Optional
Default: false
-droid-t|--include-android-test Whether to include Xamarin Android unit test project.
bool - Optional
Default: false
-ios-t|--include-ios-test Whether to include Xamarin iOS unit test project.
bool - Optional
Default: false
-uwp-t|--include-uwp-test Whether to include UWP unit test project.
bool - Optional
Default: false
-uwp-ui-t|--include-uwp-ui-test Whether to include UWP UI test project.
bool - Optional
Default: false
-ed|--include-editor-config Whether to include an EditorConfig in the root directory.
bool - Optional
Default: true
-sln-gp|--solution-project-grouping The grouping for projects into folders inside of the solution.
flat - All projects are placed at the root of the solution
test-group - All test projects are placed in a test folder,
other projects are placed at the root of the solution
platform - Projects are grouped based on their target platform
Default: flat
-id|--app-id The Android package name or iOS bundle Id <com.company.appname>.
string - Optional
Default: com.mvxscaffolding.app
-app-n|--app-name The application display name.
string - Optional
Default: Mvx Scaffolding
-sln|--solution-name The solution name.
string - Required
-f|--framework The version of .NET Standard to use in the Core project.
2.1 - .NET Standard 2.1
2.0 - .NET Standard 2.0
Default: 2.0
-droid-sdk|--android-min-sdk Minimum Android SDK version.
30 - Android 11 - R v30
29 - Android 10 - Q v29
28 - Android 9 - Oreo v28
27 - Android 8.1 - Oreo v27
26 - Android 8 - Oreo v26
25 - Android 7.1 - Nougat v25
24 - Android 7 - Nougat v24
23 - Android 6 - Marshmallow v23
22 - Android 5.1 - Lollipop v22
21 - Android 5 - Lollipop v21
19 - Android 4 - KitKat v19
18 - Android 4.3 - Jelly Bean v18
17 - Android 4.2 - Jelly Bean v17
16 - Android 4.1 - Jelly Bean v16
15 - Android 4.0.3 - Ice Cream Sandwich v15
14 - Android 4 - Ice Cream Sandwich v14
Default: 21
-ios-sdk|--ios-min-sdk Minimum iOS SDK version.
14.0 - iOS 14.0
13.7 - iOS 13.7
13.6 - iOS 13.6
13.5 - iOS 13.5
13.4 - iOS 13.4
13.3 - iOS 13.3
13.2 - iOS 13.2
13.1 - iOS 13.1
13.0 - iOS 13.0
12.4 - iOS 12.4
12.3 - iOS 12.3
12.2 - iOS 12.2
12.1 - iOS 12.1
12.0 - iOS 12.0
11.4 - iOS 11.4
11.3 - iOS 11.3
11.2 - iOS 11.2
11.1 - iOS 11.1
11.0 - iOS 11
10.3 - iOS 10.3
10.2 - iOS 10.2
10.1 - iOS 10.1
10.0 - iOS 10
9.3 - iOS 9.3
9.2 - iOS 9.2
9.1 - iOS 9.1
9.0 - iOS 9
Default: 12.0
-uwp-desc|--uwp-app-description The UWP application description.
string - Optional
Default: Laying the foundation with Mvx Scaffolding
-uwp-sdk|--uwp-min-sdk Minimum UWP target SDK version.
19041 - 2004 - April 2020 Update
18362 - 1903 - May 2019 Update
17763 - 1809 - October 2018 Update
17134 - 1803 - April 2018 Update
16299 - 1709 - Fall Creators Update
Default: 16299
-st|--scaffold-type The view pattern to scaffold the solution with.
single-view - Scaffold an app with a single starting view and view model.
navigation-menu - Scaffold an app with a slide out menu. Template contains two starting views with view models.
blank - Scaffold an app with bare basic features.
Default: single-view
MvxNative only options
-droid-ui-t|--include-android-ui-test Whether to include Xamarin Android UI test project.
bool - Optional
Default: false
-ios-ui-t|--include-ios-ui-test Whether to include Xamarin iOS UI test project.
bool - Optional
Default: false
-droid-l|--android-layout-type The Android project layout pattern to use.
axml - axml, Android layout format compatible with Visual Studio tooling.
xml - xml, Android layout format compatible with Android Studio tooling.
Default: axml
-ios-l|--ios-layout-type The iOS project layout pattern to use.
fluent - FluentLayout, a fluent API for creating constraint-based layouts.
storyboard - Storyboard, iOS layout format compatible with Xcode interface builder.
Default: fluent
MvxForms only options
-ui-t|--include-ui-test Whether to include Xamarin Android and iOS UI test project.
bool - Optional
Default: false