3

i created an very simple Xamarin.forms project in VS2015 following Xamarin quickstart. I want to deploy and debug on emulator. though eumulator can be launched and app is deployed successfully, I dont see my app showing in the emulator, and none of the breakpoints is hit. i tried to connect emulator from command ling using adb. it says already connected.

1>Starting deploy VS Emulator 5.7" Marshmallow (6.0.0) XHDPI Phone ... 
1>Deploying VS Emulator 5.7" Marshmallow (6.0.0) XHDPI Phone ...
1>Build started.

1>Touching "obj\Debug\android_debug_keystore.flag".
1>Skipping target "_Sign" because all output files are up-to-date with respect to the input files.
1>Detecting installed packages...
1>Getting installation path...
1>Using fast dev path: /storage/emulated/0/Android/data/PhoneWorld.PhoneWorld/files/.__override__
1>Synchronizing assemblies...
1>Done building project "PhoneWorld.Droid.csproj".
1>Build succeeded.
1>Deploy successfully on VS Emulator 5.7" Marshmallow (6.0.0) XHDPI Phone
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Ping
  • 46
  • 4
  • Possible duplicate: http://stackoverflow.com/questions/32560853/app-not-run-in-visual-studio-emulator-for-android-in-visual-studio-2015 – CSharpRocks Jan 26 '16 at 18:40
  • 1
    Have a look here: http://stackoverflow.com/questions/34800168/xamarin-forms-android-app-crashes-running-debug-with-vs-android-emulator/35779589#35779589 – Zverev Evgeniy May 13 '16 at 17:44

1 Answers1

0

According to this comment on Xamarin's forums, this issue can be caused by having a space in the physical folder path of your project -- spaces in the project name are okay, though. Apparently a space in the physical folder path causes the MDB files to not be copied correctly, which are required for debugging.

If that isn't your issue, an earlier comment provided a fix to better instruct Visual Studio to copy all the MDB files to the output directory for debugging by modifying his MSBuild:

<Copy SourceFiles="@(_Assemblies -> '%(FullPath).mdb')"
        SkipUnchangedFiles="true"
        DestinationFolder="$(OutDir)"
        Condition="'%(_Assemblies.ResolvedFrom)' != '{TargetFrameworkDirectory}' And '%(_Assemblies.ResolvedFrom)' != 'ImplicitlyExpandDesignTimeFacades' And '%(_Assemblies.FrameworkFile)' != 'true' And Exists('%(_Assemblies.FullPath).mdb')" />
Chase
  • 934
  • 6
  • 18
  • Thanks for comment. i think my path (E:\Code\PhoneWorld\PhoneWorld) is OK. my problem is more than not hitting the breakpoints. i dont see app running in emulator, and no UI is showing up. – Ping Jan 26 '16 at 16:36
  • You are seeing the emulator, correct? Just no app is loading? – Chase Jan 26 '16 at 16:43
  • yes, i see the emulator running but no app loading. – Ping Jan 26 '16 at 17:16