Coder Social home page Coder Social logo

xamlator's Issues

Remove MonoDevelop dependencies from Core project

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.

Stuck on evaluation error

Description

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.

Expected Behavior

The preview page should detect the focused page on the IDE and display it correctly.

Actual Behavior

The preview page after some time of switching files it gets stuck and does not preview the file.

The socket has been shut down

Hi @ylatuya in the new versión

When I open a xaml file in vs for mac, the xamlator always shows this error:

screenshot 2019-02-20 at 16 23 06

Versions
vs for mac extension: 1.05
nuget version: 2019.2.20.3

Can't get it work with android emulator on VS 2017 15.9.9

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.

  • Then I started my emulated device and after starting typed from Extras->Android->adb cmd "adb reverse tcp:8488 tcp:8488" (also tried typing first then starting the emulator device
  • I added the additional lines in the OnCreate class.
  • I build the project and started debugging without erros but nothing happened modifying xaml and saving it.

Am I missing some steps? Did I something wrong?

Yours

Not working at all

It's not working with the startup project
Windows 10 updated
VS 2017 Entreprise 15.8.9
Xamarin : 4.11.0.779
Xamarin.Forms :

  • 3.4.0.987044 pre2
  • 3.3.0.967583
  • 3.3.0.912540

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

cannot find XAMlator in VS 2017 Extensions

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

The reason behind choosing Target framework v4.7

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.

Run on multiple devices

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?

Preview Error/evaluation error

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.

Cannot update xaml that uses other xaml files

Description

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.

Steps to Reproduce

  1. Create a Grid in another xaml file, add some dummy text and some bindable properties.
  2. Create a page with a Stacklayout and reference the Grid that has been previously created.
  3. Start the app.
  4. Made a minor change to the Page and save.

Expected Behavior

The xaml page should be updated as expected.

Actual Behavior

The app freezes for about 10-15 seconds and then crashes.

Logs

https://goo.gl/qMsVYA

[CSS] Including a StyleSheet throws an error on reload

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>

screenshot 2018-09-22 09 36 21

However upon hitting save and triggering a reload, XAMLator throws an eval error.

screenshot 2018-09-22 09 38 54

Not working on macOS target

Steps to reproduce:

  1. Remove the XAMLator.Server project dependency from your XAMLator.SampleApp.MacOS project.
  2. Add the XAMLator nuget package as a reference.
  3. See it can't see the XAMLator namespace and will not compile.

Forms Best coding practices

@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.

AssemblyWeaver error

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)

A member is already defined

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.

iOS NavigationPage is gone when xaml reloaded

when i making changes to xaml file, NavigationPage is gone. btw i am using prism for mvvm. your tools is awesome, but please fix it. i attached screenshot before and after making changes
simulator screen shot - iphone 8 - 2018-11-05 at 09 59 12
simulator screen shot - iphone 8 - 2018-11-05 at 09 59 28

Not Working In Mac

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

[iOS] An evaluation error

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

[Enhancement] Some improvements that may be necessary

Hi @ylatuya,

I would like to say that this library is awesome and I would like to say thank you for that.

ControlTemplate

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)

DesignInstance

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

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.