Giter Site home page Giter Site logo

plac3hold3r / mvxscaffolding Goto Github PK

View Code? Open in Web Editor NEW
122.0 122.0 40.0 6.59 MB

๐Ÿ—๏ธ A customizable template used to scaffold a cross-platform MvvmCross application.

License: MIT License

C# 97.42% Pascal 0.24% PowerShell 2.34%
dotnet-template mvvmcross templates uwp visual-studio-extension xamarin-android xamarin-forms xamarin-ios

mvxscaffolding's People

Contributors

azure-pipelines[bot] avatar benoitjadinon avatar cheesebaron avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar fossabot avatar hackmodford avatar lukepothier avatar plac3hold3r avatar yanxiaodi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mvxscaffolding's Issues

Not able to update App Icon in iOS

Below issue i am getting while running the app
Error: File not found: /Users/ABC/Documents/Projects/XYZ/XYZ/src/XYZ.iOS/Resources/Media.xcassets/AppIcons.appiconset/Icon-87.png (XYZ.iOS)

Can some help me to resolve this? Thanks in advance.

Thanks,
Ram

iTunesArtwork missing

I am on a Mac with VS 2019 doing a compile in debug or release mode but using iPhone; the iPhoneSimulator works OK and i receive the following message:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(3,3): Error: '/Users/MM/Documents/GitHub/MOrtho/src/MOrtho.iOS/iTunesArtwork' not found. (MOrtho.iOS)

I have changed the properties of the iTunesArtwork to always copy. Any idea for this problem?

Migrate template to .NET 6

Hi, as .net 6 is out, would it be possible to do some work to make the projects target the new .net 6 tfm's?

Kind regards,
Vanja

Wrong MvxViewController sizing within Mvx native iOS project

Created a native Mvx project using the following command (running the latest version of MvxScaffolding)

    --name "$testProjectName" \
    --solution-name "$testProjectName" \
    --app-name "$testProjectName" \
    --app-id $bundleId \
    --scaffold-type blank \
    --include-android false \
    --include-editor-config false```

but when the app runs the UI looks like this ; there are black bars above ad below the actual view

![img_4760](https://user-images.githubusercontent.com/10697741/49158443-131a7380-f31a-11e8-884a-3513e3ea7b21.png)

The application is in break mode

When trying to run the newly created project Android application of type "Navigation Menu" the following error occurs: "Your app has entered a break state, but there is no code to show because all threads were executing external code (typically system or framework code)."

Error

Extension: MvxScaffolding v1.5.0
Android: 9.0 - API 28
Visual Studio: Visual Studio Professional 2017 - v15.9.17
App Details: Navigation Menu (Xamarin.Forms)

Is any other configuration required?

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /src/Templates/**/*.csproj/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Unable to add NuGet package MvvmCross.Binding

Hi Team,

We are trying to use MvxImageViewLoader in MvxTableViewCell. But we are not able to use this until and unless we add NuGet package MvvmCross.Binding.

But after adding MvvmCross.Binding, we are getting the below an issue

XXX.iOS/Linker/LinkerPleaseInclude.cs(29,29): Error CS0433: The type 'MvxTaskBasedBindingContext' exists in both 'MvvmCross.Binding, Version=5.7.0.0, Culture=neutral, PublicKeyToken=null' and 'MvvmCross, Version=6.3.1.0, Culture=neutral, PublicKeyToken=null' (CS0433) (XXX.iOS)

Thanks in advance,
Ram.

UWP Forms Test project does not build

- Repro:

  1. In VS 2019 Pro, scaffold a XF project with Navigation and Droid,iOS,UWP
  2. Restore Nuget packages
  3. Build

- Expected result

Build completes

- Actual result

Build fails. Compiler complains Microsoft.VisualStudio.TestPlatform namespace not found

Intellisense/syntax color/etc. not functional after new project

I've noticed Visual Studio 2017 15.7.5 needs to be restarted to get basic functionality like syntax coloring, Intellisense, etc. to work immediately after generating a new project with MvxScaffolding. Everything works fine after I restart Visual Studio 2017.

These are the steps I used to create a new project and reproduce the error:

  1. Use the MvxScaffolding MvvmCross Native template
  2. Have the following Visual Studio options set:
    • Create new directory for solution.
    • Create new Git repository
  3. Leave the MvxScaffolding App Defaults screen as-is. Click Next.
  4. Click on iOS to deselect it. Android is the only platform selected.
  5. Leave the MvxScaffolding Android screen as-is. Click Next.

Some examples of things that aren't working after generating the new solution:

  1. MvxFragmentAttribute is not colored in a .CS file.
  2. MainContainerViewModel is not colored in a .CS file.
  3. Intellisense doesn't trigger when you type the period after Resource.Layout.

Building the project doesn't change anything.

Can not create any project

Visual Studio 2019 (Version 16.6.5)
.NET Framework 4.8.03752
.NET Core SDK 3.1.302

I installed the template from the marketplace and try to create a new "MvxScafolding MvvmCross Forms" project.
But if I click "Done" after setup the project, I only get the following error message

image

Of course I tried to set this options, but it doesn't matter if I check the option or not. Furthermore I searched and tried some of the solutions I found, but none of them helped.

Maybe you have an idea what's going wrong? Thx.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /src/Templates/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Project template fails to create project on VS 15.7.1

I'm not able to create a new project using the template in Visual Studio v15.7.1. After selecting the project template and entering a project name/path, Visual Studio raises an error and the project wizard doesn't appear.

The error message given by Visual Studio is:

Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

mvxscaffolding_1
mvxscaffolding_2

Android Constraints in default views are wrong

fragment_main and fragment_settings both use ConstraintsLayout and attempt to use them. However, the constraints are not really taking effect, because width and height are set to wrap_content. If it is fully constrained 0dp should be used instead.

Rotation issue on created project

When creating a new project using the wizard and running it with no alterations there seems to be a bug when rotating on an Android device.
You can rotate once, but when rotate back you get the following error:

System.NotSupportedException: 'Unable to activate instance of type Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer from native handle 0x79 (key_handle 0xe57b367).'

Setup:

  • Master Detail application
  • All test applications
  • Android and iOS
  • Visual Studio 2019
  • Extension version: 1.3.0

Not an MVVM Cross issue by default, as have another template app setup from MVVM Cross directly but doesn't have the same issues.

Failed create Xamarin Forms project

When I try to create Xamarin Forms project - it throws an error:

---------------------------
MvxScaffolding unhandled exception
---------------------------
There was an exception thrown when trying to run MvxScaffolding. Please log an issue on GitHub if the error persists.

Exception Message: Set connectionId threw an exception.
Exception StackTrace:   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)

   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)

   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)

   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)

   at MahApps.Metro.Controls.GlowWindow.InitializeComponent()

   at MahApps.Metro.Controls.GlowWindow..ctor(Window owner, GlowDirection direction)

   at MahApps.Metro.Behaviours.GlowWindowBehavior.AssociatedObjectOnLoaded(Object sender, RoutedEventArgs routedEventArgs)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)

   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)

   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)

   at MS.Internal.LoadedOrUnloadedOperation.DoWork()

   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)

   at System.Windows.Interop.HwndTarget.OnResize()

   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner Exception Message: [A]MahApps.Metro.Controls.Glow cannot be cast to [B]MahApps.Metro.Controls.Glow. Type A originates from 'MahApps.Metro, Version=1.6.5.1, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\extensions\eibxuxcf.gui\MahApps.Metro.dll'. Type B originates from 'MahApps.Metro, Version=1.6.5.1, Culture=neutral, PublicKeyToken=e33b67d3bb5581e4' in the context 'LoadFrom' at location 'C:\USERS\JANPAWEL\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_ACB3C1E0\EXTENSIONS\QSL0EYGU.WKG\MahApps.Metro.dll'.
Inner Exception StackTrace:   at MahApps.Metro.Controls.GlowWindow.System.Windows.Markup.IComponentConnector.Connect(Int32 connectionId, Object target)

   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetConnectionId(Object root, Int32 connectionId, Object instance)
---------------------------
OK   
---------------------------

[Android] Both AXML and XML files are being generated

Both AXML and XML files are being generated when creating a new solution using the MvxScaffolding MvvmCross Native Template using the default settings. The AXML files are present in both the solution and the file system. The XML files are present in the solution but not the file system, so Visual Studio shows a yellow triangle next to these files. Clicking the file shows the error:

The item 'activity_main_container.xml' does not exist in the project directory. It may have been moved, renamed, or deleted.

Failed to start Wizard - Forms

Exception on clicking create new project:
initialization of mahapps.metro.controls.windowcommands threw exception

VS: 15.9.9

Edit - Works when running VS as Admin

[Feature Request] Tabs navigation

Would be great to have a template for tabs navigation as an alternative to Master/Detail.

I'd love to see it working with the BottomNavigationView from support design packages on Android and the default tabs support on iOS.

UWP App does not work with Windows Application Packaging Project

Hello, I have a problem with UWP App and Windows Application Packaging Project.

I described my problem at stackoverflow: https://stackoverflow.com/questions/69476713/windows-10-uwp-app-crash-at-start-faulting-module-name-windows-ui-xaml-dll.

In a nutshell I using UWP app which using MvvmCros and it is scaffolded with MvxScaffolding.

Sample App which reproduce my problem: https://github.com/pinkysek/SampleApp
When you set in Package project UWP app as entry point and deploy Package it crash after start but when you set UWP.Blank project as entry point it works.

[Feature Request] Request for a stripped back template

Would be great to have a template that just included the bare minimums needed to create a working app :

  • Remove external dependencies (currently uses FluentLayout, same goes for CodeAnalysis)
  • Remove custom base classes; yes they are used but often each team has their own that have been created in-house
  • Remove styling of views (including the ColourPalette class), just create the bare minimum so that we can check the app runs after creating a new solution
  • Remove the artwork used for the launch-screen and the app-icon. Again teams normally have all this already, creating more work to remove it all manually, and it's not needed to check if the app runs the first time.

Error updating package Microsoft.NET.Test.Sdk in project App1.UWP.Test

Reproduce the issue:

  • Add a new Forms project Navigation type with UWP in VS2017 with the name of App1
  • try to update the package with the command "Install-Package Microsoft.NET.Test.Sdk -ProjectName App1.UWP.Test"

Log:
Restoring packages for C:\Users\romeo\source\repos\App1\test\App1.UWP.Test\App1.UWP.Test.csproj...
Install-Package : The system cannot find the file specified.
At line:1 char:1

  • Install-Package Microsoft.NET.Test.Sdk -ProjectName App1.UWP.Test
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Time Elapsed: 00:00:05.1343707

Build of UWP project after project create generates Xaml Internal error WMC9999

Hi,

When I attemp to build the UWP app after creating solution I get the following error:>

C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(375,5): Xaml Internal Error error WMC9999: Sequence contains no elements

All I did was make the UWP project the startup and then did a build.

Thanx for any help

jra

exclamation mark before Base package name

Don't use ! in Base package name in:

  • Core/ViewModels
  • Platform/Views

AFAIR this name is against C# packages naming convetions and mislead developers.
BTW. I've never seen such name earlier ;]

BTW. Why there is used '!' ?

Folders deleted

When I create a new project and select an existing folder, all content in that folder is removed.

E.g. Existing structure:

D:
  \Source
    \Project1
    \Project2

Create a new MvxScaffolding MvvmCross Forms project in VS 2017. Leave Name: and Solution name: fields as default. Change Location to D:\Source.

On 1st screen, set Solution Name as Test.

Click through remaining screens leaving all defaults. Application is built and VS 2017 restarts.

Folder now contains:

D:
  \Test
  \src
  .editorconfig
  .sln

Original Source, Project1, and Project2 folders are wiped without warning.

This differs from normal VS operations where a subfolder based on the project name is automatically created for the generated code.

Workaround is to create a new folder first then put the project there.

Missing NavigationMenu template for Xamarin.Forms

Hi, I forked the source code and I found that it does contain a NavigationMenu template for Xamarin.Forms but it is missed in the config file. I can update the config file to show it, but actually the template is a single view project, not a NavigationMenu project.

I just completed a simple demo to implement the hamburger menu layout by MasterDetailPage for iOS, Android and UWP. If you would agree, I can make a PR for this feature. Thank you very much.

Btw, it is the best template for Xamarin&MvvmCross at the moment. Good job!

Rider Support

Is it possible to have this as a plugin for Jetbrain's Rider IDE?

Examples of MvxScaffolding with simple projects

This is probably not the correct way to ask about this type of problem, so please let me know hot this is normally suppose to be done.
Also, I greatly appreciate this project, i think this is totally amazing what you have done
My request is for an enhancement to have examples of using MvxScaffolding using many different settings; ex IOS, Android, whatever.
I am new to Xamarin Forms and am having trouble creating a binding with this solution using a Picker binding to 2 Edit fields. I have looked in many places, including MvvmCross and cannot find current information on how to do this example; old example do not seem to work.
Thanks either way.

Mono.Android.Export is missing ?

Hey !

I just downloaded the last version of MvxScaffolding.

Right after the splash screen i get this ;)

image

Just looked in MyApp.Droid references :
image

image

I'm on visual studio 2019 preview , version 16.4.0 Preview 2.0

I'll try with visual studio 2019.

iOS linker errors when MtouchLink=Full

The LinkerPleaseInclude.cs included in iOS project templates lacks constructor references to certain new MvvmCross types. These references should be added to enable MtouchLink=Full builds directly from the unchanged templates to run without risk of runtime crashes, errors, and unresponsiveness.

The missing constructor references are for the following types:

  • MvvmCross.Core.MvxSettings
  • MvvmCross.Core.MvxStringToTypeParser
  • MvvmCross.ViewModels.MvxViewModelLoader
  • MvvmCross.ViewModels.MvxViewModelViewLookupBuilder
  • MvvmCross.Commands.MvxCommandCollectionBuilder
  • MvvmCross.ViewModels.MvxStringDictionaryNavigationSerializer
  • MvvmCross.ViewModels.MvxChildViewModelCache

Configure your new Project, hit Create, Visual Studio closes unexpectedly

Hi there when creating a new MvxScaffolding MVVM cross native project in VS 2019 (further details below) then visual studio closes and the project does not create the project, I had no issues with VS 2017

Microsoft Visual Studio Community 2019
Version 16.1.1
VisualStudio.16.Release/16.1.1+28922.388
Microsoft .NET Framework
Version 4.7.03190

[Feature Request] Master-Detail View or any other layout

Hi, first of all thanks for the great tool for creating the basic boilerplate for MvvmCross application. Works perfectly both on Windows and Mac.

I wonder whether it would be possible to add option to create basic Master-Detail view with menu drawer or any other typical layout - e.g. bottom/top tabs navigation.

Dependabot couldn't find a <anything>.(cs|vb|fs)proj for this project

Dependabot couldn't find a .(cs|vb|fs)proj for this project.

Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /src/Templates/<anything>.(cs|vb|fs)proj.

If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Fragment BindingInflate ignores `container` argument

https://github.com/Plac3hold3r/MvxScaffolding/blob/master/src/Templates/MvxNative/SingleView/src/MvxNative.Droid/Views/!Base/BaseFragment.cs#L27

https://github.com/Plac3hold3r/MvxScaffolding/blob/master/src/Templates/MvxNative/NavigationMenu/src/MvxNative.Droid/Views/!Base/BaseFragment.cs#L27

The call to BindingInflate in BaseFragment ignores the container ViewGroup. The issue with this is that the child view we are inflating then won't know the parent's LayoutParameters and in worst cases will get the incorrect size when then using GenerateDefaultLayoutParameters.

LinkerPleaseInclude.cs UISearchBar addition?

Does this need to be added to the linkerPleaseInclude.cs file?

public void Include(UISearchBar searchBar)
{
   searchBar.Text = $"{ searchBar.Text }";
   searchBar.TextChanged += (sender, e) => searchBar.Text = "";
   searchBar.CancelButtonClicked += (s, e) => searchBar.Text = $"{ searchBar.Text }";
}

Android linker errors when AndroidLinkMode=Full

The LinkerPleaseInclude.cs included in Android project templates lacks constructor references to certain new MvvmCross types. These references should be added to enable AndroidLinkMode=Full builds directly from the unchanged templates to run without risk of runtime crashes, errors, and unresponsiveness.

The missing constructor references are for the following types:

  • MvvmCross.Core.MvxSettings
  • MvvmCross.Core.MvxStringToTypeParser
  • MvvmCross.ViewModels.MvxViewModelLoader
  • MvvmCross.ViewModels.MvxViewModelViewLookupBuilder
  • MvvmCross.Commands.MvxCommandCollectionBuilder
  • MvvmCross.ViewModels.MvxStringDictionaryNavigationSerializer
  • MvvmCross.ViewModels.MvxChildViewModelCache

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.