XAMLator icon indicating copy to clipboard operation
XAMLator copied to clipboard

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

Open Widder2023 opened this issue 6 years ago • 10 comments

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

Widder2023 avatar Mar 25 '19 09:03 Widder2023

XAMLator can't be installed in the .net standard shared project, it has to be installed in the native project, the Android application in your case. The visual studio addin is WIP in #16, it will be soon submitted to the market place

ylatuya avatar Mar 25 '19 10:03 ylatuya

Hello ylatuya,

thanks for the fast reply.

For my understanding you mean when I want to use this tool, I need to choose as project template Xandroid-XAML-App (Xamarin.Forms) and not the Cross-Platform template where I install it in the Android project?

Yours

Widder2023 avatar Mar 25 '19 16:03 Widder2023

You can use the .netstandard approach instead of the shared project one. If you look at the sample app in XAMLator, it's also using a .netstandard project to share code, but the XAMLator nuget is added to the application projects: XAMLator.SampleApp.Android, XAMLator.SampleApp.iOS, etc... instead of the .netstandard library project XAMLator.SampleApp.

ylatuya avatar Mar 25 '19 16:03 ylatuya

Hi @ylatuya, Is the https://www.nuget.org/packages/XAMLator/2019.3.24.12 ready for Windows ? I just downloaded one. Will appreciate your input. Thanks

npagare avatar Mar 25 '19 16:03 npagare

@ylatuya: I tried the provided Samples but it also not working with them. Seems that something is wrong with my IDE configuration. I just wait until the nuget package releases.

Widder2023 avatar Mar 25 '19 22:03 Widder2023

We will release the Visual Studio for Windows extension soon, are you testing with the extension installed compiling the code or without the extension?. Without the extension will not work.

jsuarezruiz avatar Mar 26 '19 07:03 jsuarezruiz

@jsuarezruiz , I didn't have the extension installed. Is there a extension from the CI build that we can download before it is published in the marketplace ?

Besides hot-reload (which we are excited for), will XAMLator help us with the location of the errors where XAML may be failing / causing issues ? I think that's a very important need for Xamarin Forms development community. Thanks for everything. Can't wait longer... :)

npagare avatar Mar 26 '19 15:03 npagare

@jsuarezruiz

  • I installed the nuget Xamlator package under the android project
  • I start my emulated Android device
  • add LoadApplication(new App()); #if DEBUG XAMLator.Server.PreviewServer.Run(); #endif in main activity
  • Extras->Android->adb cmd "adb reverse tcp:8488 tcp:8488" typed
  • start debugging, does not work

Widder2023 avatar Mar 28 '19 20:03 Widder2023

This won't work on Windows until we publish the Visual Studio plugin. Closing this as duplicate of #16

ylatuya avatar Apr 04 '19 13:04 ylatuya

@ylatuya , @jsuarezruiz - can you please advice us when will this extn be available for VS 2019 on windows? Thanks

npagare avatar Apr 28 '19 01:04 npagare