3

我在Xamarin快速入門之後在VS2015中創建了一個非常簡單的Xamarin.forms項目。我想在仿真器上進行部署和調試。雖然eumulator可以啓動並且應用程序部署成功,但是我沒有看到我的應用程序在模擬器中顯示,並且沒有發現任何斷點。我試圖使用adb從命令行連接模擬器。它說已經連接。Visual studio 2015無法調試xamarin項目

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 ========== 
+0

可能重複:HTTP: //stackoverflow.com/questions/32560853/app-not-run-in-visual-studio-emulator-for-android-in-visual-studio-2015 – CSharpRocks

+1

看看這裏:http://stackoverflow.com/questions/34800168/xamarin-forms-android-app-crashes-running-debug-with-vs-android-emulator/35779589#35779589 –

回答

0

this comment上Xamarin的論壇,這個問題可以通過在你的項目的物理文件夾路徑的空間造成的 - 空格項目名稱都還行,雖然。顯然,物理文件夾路徑中的空間導致MDB文件無法正確複製,這是調試所必需的。

如果這不是你的問題,一個earlier comment提供了一個修復程序通過修改自己的MSBuild更好地指導Visual Studio中的所有MDB文件複製到輸出目錄進行調試:

<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')" /> 
+0

感謝您的評論。我認爲我的路徑(E:\ Code \ PhoneWorld \ PhoneWorld)是可以的。我的問題不僅僅是沒有達到斷點。我沒有看到應用程序在模擬器中運行,沒有UI顯示。 – Ping

+0

您正在看到模擬器,對嗎?沒有應用程序正在加載? – Chase

+0

是的,我看到模擬器正在運行,但沒有應用程序加載。 – Ping

相關問題