dansiegel / prism-templates Goto Github PK
View Code? Open in Web Editor NEWPrism Templates using the DotNet New cli
Prism Templates using the DotNet New cli
Can someone please point me to (either in the source code here or just a good resource online in general) how Prism adds a ViewModel along with your page template and a line of code in your App class to register it with the ioc container for navigation? That's a nice feature that I'm looking to replicate. Any help would be much appreciated.
this is what i am using
dotnet new prismforms -id com.dinkkiia.workandplay -n Dinkkiia.Workandplay --include-uwp true -fr netstandard2.0 -di unity -data AzureMobileClient -barcode true
The Secrets.cs file is removed after opening the solution in VS2017, and is subsequently not regenerated.
When creating a new QuickStart template using the Template Pack a Dialog should be added that will allow the user to choose a local image that will be added to the app for the app icon
Add code snippets for those wishing to explicitly implement INPC and for creating a DelegateCommand
The TemplateEngine included in VS Mac contains some bugs in file name generation which includes the .gitignore in the iOS & Android projects not being renamed. The VS Mac Wizard will need to check for this malformed named .gitignore files and rename them.
Ninject with Prism Forms 6.3 does not work well with this template. This will require Prism Forms 7.0
There is no way to do this directly with the dotnet templating engine, however VSMac will allow us to hook into the post project creation to perform additional tasks. A user dialog could be added to the Project creation wizard to allow developers to add additional Views and specify the Page Type, for the Views to then be first created as a Post project creation task, and then update App.RegisterTypes
to register the new views for Navigation automatically.
New views are are named "ItemTemplate.xaml" instead of the class name when creating new items using
dotnet new prismitem -n "GeneralPopupPage" -namespace $namespace
All of the code within the view is correct.
This is using the latest version of the templates, as I pulled a new version this morning.
Installing locally dotnet new -i content/MobileApp-CSharp/
and dotnet new content/XamarinItems/
installs either template, however installing form a packed NuGet fails.
Not sure if @mlorbetske has made the fix to be able to see install errors?
Type Registration for the Azure Mobile Client in Unity is not complete.
The tag in line 18 in the solution's directory.build.targets is not closed, which causes the solution's projects not to load. The fix is close the tag as mentioned in response 5
A Custom UI and VSIX will need to be generated to integrate the templates into Visual Studio 2017
The LoginProvider should include an implementation and setup instructions for working with the following Authentication Sources:
A custom UI and mpack need to be created for VS4Mac integration
I am sorry if i am been aggressive .
Hope your holidays went well.
Cheers
When creating a UWP project there is currently no way to update the project with a new temporary signing certificate.
cc: @mlorbetske
Replace the custom build props/targets with a NuGet so that updates can be more easily applied to projects
Hi,
first of all amazing work! thank you for doing this.
I've restored Prism Forms Mobile App - Quickstart template, updated all packages and successfully run the IOS app.
The app loads up, shows me a todo list of 3 items. I click on the add button it shows a dialog where I enter a test todo, hit the button save.
App goes to
_navigationService.GoBackAsync("todoItem", Model);
but never reaches MainPageViewModel, it breaks with above message inside of IOS Main class
Stack trace is
As reported in #20 upon building there is a build error:
Error: Can't load types from xmlns http://schemas.microsoft.com/winfx/2006/xaml/presentation
The UWP project will need to be updated and fixed
The template doesn't work in VS4Mac. I simple create a new solution and select "Blank Prism Application" and select DryIoc. When I try to run the solution, I get a lot of errors like "Predifined type 'System.Void' is not defined or imported" several places in the net standard library. Also multiple like this "Error CS1703: Multiple assemblies with equivalent identity have been imported: '/usr/local/share/dotnet/sdk/NuGetFallbackFolder/netstandard.library/2.0.1/build/netstandard2.0/ref/System.Collections.dll' and '/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.collections/4.3.0/ref/netstandard1.3/System.Collections.dll'. Remove one of the duplicate references. (CS1703)"
VS4Mac is updated to latest in Stable channel and dotnet core 2.1 is installed
An option to add either Xamarin.Forms.Maps or Xamarin.Forms.GoogleMaps should be added to the QuickStart Template
The EOL notice says the templates are going away in favour for the Prism Developer Toolkit.
When I google that, the first hit I get is this EOL notice. Is the developer toolkit a thing yet? I am trying to get started using Prism but there seems to be no easy way to get started (which is a shame because it looks awesome)
The Project and Item Templates should also be available in F#
When creating a new application options should be exposed to set the default color palette in the app.
The MFractor config will need to be removed and updated to include a NuGet Prism config for MFractor.
Currently you can set the Project Name like Contoso.Mobile
, however it would be better if you could additionally set the App Name that is displayed when you install the App. This should probably be a required attribute.
Currently the Templates only include the possibility of including a Xamarin UI Test project. This may not be the best decision for some developers.
A UI Test Project option should be provided so that developers can choose between different UI Test Frameworks such as:
My companies house style is to name projects like so: Company.Projectname.ProjectType, This means I am creating a project called "mycompany.myapp.app" When this creates, the namespaces are not correctly implemented:
This should created the namespace mycompany.myapp.app
, however in the iOS / droid project, it will create mycompany_myapp.app
as the namespace. This means a blank project won't build & I can't seem to rename everything to correct this issue.
dotnet --info
.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.4/
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
I installed prism templates for VS mac, and created a new solution.
The Template Pack for Visual Studio Mac currently includes item templates for common Pages including PopupPage's. Additional item templates should be added to make it a little quicker when working on custom controls. Templates should be added for Layouts and the ViewCell
Add Module Name parameter to the Module Template, this can then be used to set the project name like Contoso.Mobile.ModuleA
and set the Module name ModuleA
this will help eliminate the current class name that gets generated like Contoso_Mobile_ModuleA
Thanks for creating these templates. They are a real time saver and really simplify prism Tabbed navigation.
The ViewModelBase class doesn't contain instantiate the IsActiveChanged eventHandler resulting in an exception when trying to use any page that implements IActiveAware.
If anyone should run into this issue before its fixed, it is easily fixed by adding the following line to the constructor.
IsActiveChanged += (sender, e) => System.Diagnostics.Debug.WriteLine($"{Title} IsActive: {IsActive}");
Thanks.
The Data Providers currently only includes the anticipation of Offline Sync. Some apps do not require Offline Sync and as such should offer the ability to add SQLite as part of the QuickStart Template.
This should probably be done with both Bundle_Green & Bundle_SQLCipher
Autofac with Prism Forms 6.3 does not work well with this template. This will require Prism Forms 7.0
A General Unit Test project should be added that can be used on existing projects, as well as being included in the existing project templates as a test option. This will help to address the various questions and difficulty that developers have had with how to setup unit tests.
Support for StyleCop Analyzers should be added to the templates. This should provide a default stylecop.json file while allow users to specify a custom stylecop.json file to use. This will be a Template Pack only feature and will not be supported by the dotnet templates.
When developing reusable Modules, it would be helpful to have single template that could be used that would address the following issues:
Larger Development teams can focus building modular apps while empowering each team to be able to properly test and validate their Module.
Is there a nuget package or is it VS extension?
How to use these templates?
When creating a new project from the template the correct Weavers file is being excluded via the wildcard, however the rename is not occurring. This problem exists with both "**/RealmFodyWeavers.xml": "FodyWeavers.xml"
and specifying like "src/MobileApp/RealmFodyWeavers": "src/MobileApp/FodyWeavers.xml"
@mlorbetske not sure if perhaps you see what the problem would be here?
"sources": [
{
"modifiers": [
...
{
"condition": "(UseRealm)",
"rename": {
"**/RealmFodyWeavers.xml": "**/FodyWeavers.xml"
},
"exclude": [
"**/NormalFodyWeavers.xml"
]
},
{
"condition": "(!UseRealm)",
"rename": {
"**/NormalFodyWeavers.xml": "**/FodyWeavers.xml"
},
"exclude": [
"**/RealmFodyWeavers.xml"
]
},
....
]
}
],
A generated solution will build just fine in VS4Mac but when building the Android project in VS2017 there are several build errors pointing at Android Support Libraries not being referenced properly.
When creating item templates the Views & ViewModels should be customizable. While some default behavior such as scanning for a ViewModelBase in the project should be done, it would be good to have an override type behavior for importing things like the base class for the ViewModel as well as any namespace imports for the XAML file.
{
"viewModel" : {
"class": "ViewModelBase",
"namespace": "Contoso.Mobile.Mvvm"
},
"xaml": {
"imports": [
{
"clr-namespace": "Prism.Behaviors",
"assembly": "Prism.Forms",
"namespace": "behaviors"
}
],
"merge": false
}
}
When a project using the following command is created on Windows.
dotnet new prismforms -id com.company.app -fr netstandard1.6 -localization -mc -ios-secret "xxxx-xxxx-xxxx-xxxxxxxx" -android-secret "xxx-xxxxxx-xxxxxx-xxxxxxx" -data None -au AADB2C -client-id "xxxx-xxxx-xxxxx-xxxxxxx" -di Unity
AndroidInitializer.cs
is missing a reference to Android.App
and as the result Activity
symbol in the following code cannot be resolved.
container.RegisterInstance(new UIParent(Xamarin.Forms.Forms.Context as Activity));
When creating new files in VS Mac it would be helpful to have better file templates. Currently VSMac does not support dotnet item templates. This will have to be done using legacy templates.
I have generated a project using the following code on Windows:
dotnet new prismforms -id com.contoso.awesomeapp -di Unity -fr netstandard1.6 -mc -ios-secret
"{my ios secret}" -android-secret "{my android secret}" -data None
-auth AADB2C -client-id "{my AADB2C application id}"
However, the csproj is not generated properly and it does not contain the item group defining embedded resources like:
<EmbeddedResource Include="Views\MainPage.xaml"> Generator>MSBuild:UpdateDesignTimeXaml</Generator> </EmbeddedResource>
As the result, the xaml.g.cs files are not being generated, when building the project and I get
The name 'InitializeComponent' does not exist in the current context
Secrets.cs file is not generated automatically either.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.