ylatuya / xamlator Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I tried version from latest commit:
5a62ab0
I was adding the Visual Studio Windows extension and I found a couple of necessary changes to be able to do it.
We have to remove references to MonoDevelop from the Core project. We can create an IDialog interface (or similar) and implement it in each platform (Windows and macOS).
If you want I can add changes in a PR.
Some times (it happens randomly or when there are a lot of files open and you switch on them) the PreviewPage stucks on Evaluation Error: Class, struct or interface method must have a return type. Trying switching to a cs file and back to a xaml one does not fix the issue.
Some times the output prints some gc info and seems that it got the change and trying to preview the file(with no success) and other ones it just does nothing. You have to re-run the application to make it work.
Haven't tried to make a toolbaritem for start and end(if it exists) the preview via an abstraction. Maybe a button on the preview page, like hard reload would resolve this issue.
The preview page should detect the focused page on the IDE and display it correctly.
The preview page after some time of switching files it gets stuck and does not preview the file.
Hi @ylatuya in the new versión
When I open a xaml file in vs for mac, the xamlator always shows this error:
Versions
vs for mac extension: 1.05
nuget version: 2019.2.20.3
Hello,
firstly thank you for your effort making this plugin. It is what I always missed while developing with Xamarin Forms. Unfortunately I can not get it running. So far I did following steps:
-In my .Net Standard typed project in the Android project I opened the references and installed xamlator nuget package.
Am I missing some steps? Did I something wrong?
Yours
XAMLator should support previewing Views and Pages that don't use XAML, written in C#
It's not working with the startup project
Windows 10 updated
VS 2017 Entreprise 15.8.9
Xamarin : 4.11.0.779
Xamarin.Forms :
I'd try on real device galaxy S8+ (oreo 8.0) and chuwi (lollipop)
I'd updated OnCreate Method
The compilation is good,
I'm on debug mode
The deployment is good
The launch is ok
Modifying XAML or XAML.CS (saved of course) - Nothing append on the UI
Thanks
Hi, i followed the instructions
Install the XAMLator add-in for VisualStudio for Mac in the Add-in Manager:
Open Visual Studio->Extensions
Search for XAMLator
Install it!
but no way to find the package.. there is some problem?
Thank you very much!
Angelo
VS4 mac 2019 uses Monodevelop.Core 8.0. This package depends on 7.8.3.
Most projects use .net 4.6.1 sdk as it's the minimum version of .net framework which supports .net standard 2.0
But I can't understand the benefit of choosing .net 4.7
It also prevents people from building project with their visual studio unless they install 4.7 sdk.
Note that 4.6.1 sdk is installed by default.
I'm open to change those configurations and make project built.
I'm willing to help with removing packages.config files too.
How can I run on multiples devices. Example, run on three android devices at the same time or run on an iphone and android at the same time?
In my Mac XamForms app I changed a buttons text from "A" to "B" then saw this in the app:
Feature `pattern matching' cannot be used because it is not part of the C# 7.0 language specification
If you need me to get more information somehow let me know, I couldn't see any logs in the application output and I'm not sure where else to look for logs sorry.
When the xaml references references other xaml files starts to allocate/deallocate memory and after some seconds it breaks. That said tho, that only happens when you made a change and you save. The first time works perfectly. Because the log is too big (18k lines), i uploaded it and added a link. Later, I'll add a repro link.
Grid
in another xaml file, add some dummy text and some bindable properties.Stacklayout
and reference the Grid
that has been previously created.The xaml page should be updated as expected.
The app freezes for about 10-15 seconds and then crashes.
Including a CSS file works on the initial run.
Global.css (EmbeddedResource):
.superLabel {
color: black;
background-color: transparent;
font-size: 64;
}
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:XAMLator.SampleApp"
x:Class="XAMLator.SampleApp.MainPage">
<ContentPage.Resources>
<StyleSheet Source="/Global.css"/>
</ContentPage.Resources>
<StackLayout>
<!-- Place new controls here -->
<Label Text="This is my page!"
TextColor="White"
HorizontalOptions="Center"
BackgroundColor = "Red"
class="superLabel"
VerticalOptions="CenterAndExpand" />
</StackLayout>
</ContentPage>
However upon hitting save and triggering a reload, XAMLator throws an eval error.
Steps to reproduce:
@ylatuya XAMLator is working fine for small pages. But I have some issues in
Custom control preview is not available (e.g Grid Parent)
Sometimes page switches but not reloading.
Sometimes page reloads but content is not updating.
Happens "Internal compiler error: Object reference not set to an instance of an object"
I am greenhorn in Xamarin Forms , So there were some issues in coding like "missing empty constructor"
@ylatuya Could you please give guideline for Xamarin Forms best coding practices for perfect UI rendering & performance.
Hi, when I try build (clean, new project) on iOS Simulator I got error:
Error MSB4044: The "AssemblyWeaver" task was not given a value for the required parameter "Path". (MSB4044) (XAMLatorTest)
The MainPage is work ok, I add next XAML Page and when I try edit it i got error:
Oh no! An evaluation error!
A memebr XAMLatorTest.TestPAge21.TestPage21() is already exists. Rename this member or use different parameters types.
When I change something on this page the number 21 rise.
XAMLator is not working for me. I am using VS2017 Community edition for Mac.
These are the logs I am getting.
Loaded assembly: XAMLator.Server.dll [External]
[Mono] Image addref XAMLator.Server[0x7c337cdb80] -> XAMLator.Server.dll[0x7c337dd000]: 2
[Mono] Prepared to set up assembly 'XAMLator.Server' (XAMLator.Server.dll)
[Mono] Assembly XAMLator.Server[0x7c337cdb80] added to domain RootDomain, ref_count=1
[Mono] AOT: image 'XAMLator.Server.dll.so' not found: dlopen failed: library "/data/app/-1/lib/arm64/libaot-XAMLator.Server.dll.so" not found
[Mono] AOT: image '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-arm64-v8a-release/lib/mono/aot-cache/arm64/XAMLator.Server.dll.so' not found: dlopen failed: library "/data/app/-1/lib/arm64/libaot-XAMLator.Server.dll.so" not found
[Mono] Config attempting to parse: 'XAMLator.Server.dll.config'.
[Mono] Config attempting to parse: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-arm64-v8a-release/etc/mono/assemblies/XAMLator.Server/XAMLator.Server.config'.
[Mono] Assembly Ref addref XAMLator.Server[0x7c337cdb80] -> mscorlib[0x7c473a2480]: 105
[Mono] Assembly Ref addref XAMLator.Server[0x7c337cdb80] -> Xamarin.Forms.Core[0x7c3374ea80]: 25
I'm getting this error message after building for iOS simulator:
"The "AssemblyWeaver" task was not given a value for the required parameter "Path". "
XAMLator is installed in the PCL project and the iOS project with mtouch arguments of: --enable-repl
Thanks!
Getting error on iOS
iOS version 12.1
Xamarin Forms 3.4
Getting Preview Error!
Oh no! An evaluation error!
Below given is the error:
System.NotSupportedException: Specified method is not supported. at Mono.CSharp.Evaluator.ComplileBlock(Mono.CSharp.Class host, Mono.CSharp.Undo undo, Mono.CSharp.Report Report) [0x00060] in /Library/Frameworks/Xamain.iOS.framework/Verions/12.2.1.10/src/Xamrin.iOS/mcs/eval.cs:707
We are missing a Visual Studio add-on for XAMLator.
The vs4mac is less than 100 lines of code:
https://github.com/ylatuya/XAMLator/blob/master/XAMLator.Client.MonoDevelop/MonoDevelopIDE.cs
https://github.com/ylatuya/XAMLator/blob/master/XAMLator.Client.MonoDevelop/StartupHandler.cs
The add-on should implement the IIDE interface and start the monitor when the add-on is launched
Hi @ylatuya,
I would like to say that this library is awesome and I would like to say thank you for that.
I am using ControlTemplate to some pages and it seems that it cannot find the getter. The stacktrace i've got in the screen is:
Xamarin.Forms.Xaml.XamlParseException: Position 2:635.
Property ControlTemplate is not found or does not have an accessible getter
at
Xamarin.Forms.Xaml.ApplyPropertiesVisitor.GetPropertyValye(System.Object xamlElement, Xamarin.Forms.Xaml.XmlName propertyName, Xamarin.Forms.Xaml.HydrationContext context, System.Xml.IXmlLineInfo lineInfo, System.Object& targetProperty) [0x00095] in D:\a\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:377
at
Xamarin.Forms.Xaml.ApplyPropertiesVisitor.TryAddToProperty (it got cut here)
Furthermore, I am using Jetbrains Rider in order to get some Xaml Intellisense improvements and while I am setting the BindingContext at runtime(through a ViewModelLocator) i use
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance typeHere}"
mc:Ignorable="d"
and i get this stacktrace on screen:
Xamarin.Forms.Xaml.XamlParseException: Position 2:774.
MarkupExtension not found for d:DesignIntance
at
Xamarin.Forms.Xaml.ExpandMarkupsVisitor+MarkupExpansionParser.Parse(System.String match, System.String& remaining, System.IServiceProvider serviceProvider) [0x000e4] in D:\a\1\s\Xamarin.Forms.Xaml\ExpandMarkupsVisitor.cs:144
at
Xamarin.Forms.Xaml.ExpandMarkupsVisitor.ParseExpression(System.String& expression, System.Xml.IXmlNamespaceResolver nsResolver, System.Xml.IXmlLineInfo (it got cut here)
FYI, i've got this binding warning with LogWarningsToApplicationOutput = true;
Binding: 'CloseCommand' property not found on 'XAMLator.Server.ErrorViewModel', target property: 'Xamarin.Forms.Button.Command'
I will take a look at the code and may contribute fixing those issues.
Last but not least, I have never worked with VS Extension Development but I would like to start and help to develop the XAMLator VS 2017 Extension, just to make the Xamarin Development much easier 🙂
Thanks again for all your effort
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.