Bugzilla – Bug 8209
PCL Building and Debugging problematic in VS2012
Last modified: 2013-07-08 04:25:28 EDT
I can build and debug PCLs with MonoDroid very well in VS2010
However, in VS2012 I am seeing a couple of problems:
- Often when I build a project then I need to do 2 builds - the first fails
with lots of errors (mostly to do with 'namespace not found' for namespaces
from the PCL library. However, the second build just works.
- When I try to debug a MonoDroid app which uses PCL then this debugging does
not hit breakpoints set within the PCL.
- When I try to debug a MonoDroid app which uses PCL then if I step into the
PCL, then the step fails to find the source code - so I just get the "no source
code available" view.
To repro this, try the MvvmCross vNext branch - e.g. TwitterSearch.
Also reported via -
Just to confirm this is still an active problem.
Is there any status on this bug?
- not reproducible?
- reproducible but won't be fixed - no timeline set?
- reproducible but not a Xamarin issue - so we need to talk to MS instead?
- more information requested?
- rejected due to some other issue
Sorry, if this feels like pestering. I'm not trying to subvert or redirect
Xamarin engineering time - I love what you guys do. I am just trying to make
sense of what to do with my own time.
I've not tried debugging with MonoDroid but can confirm that I've experienced
the same problem when doing builds. Having cleaned the solution I've just had:
Loading assembly "C:\git\MvvmCross\bin\WinRT\Debug\System.Windows.dll" failed.
System.IO.FileLoadException: Could not load file or assembly 'System.Windows,
Version=184.108.40.206, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of
its dependencies. Strong name validation failed. (Exception from HRESULT:
Lots of namespace exceptions such as:
The type or namespace name 'Interfaces' does not exist in the namespace
'Cirrious.MvvmCross' (are you missing an assembly reference?)
The type or namespace name 'IMvxViewModel' could not be found (are you missing
a using directive or an assembly reference?)
Stuart, do you have a small sample we can use to replicate? I need to look at
setting up Android PCL support on my dev machine so I can test this out.
Not really got one - as I don't do small samples :)
For PCL debugging any of the Mvx samples will fail - e.g. in
For build issues, go for the whole of Mvx vNext and then just try to build
TwitterSearch.UI.Droid ? You can then probably cut out projects once you've got
Note: Build Issue 1 reported by JonStoneman above doesn't the same bug - that's
to do with the Mvx Build tree (I think) so I think can be ignored.
Changing status (someone has to)
Since the fist version of Xamarin.Android 2.0, i have the same Problem.
But in my environment, the breakpoint didn't hit in VS2010 "and" VS2012.
I'm also experiencing the same issues Stuart outlined.
It's a bit disappointing that the breakpoints aren't firing in PCL code. The
whole attraction of Xamarin for me is to to be able to take advantage of the
power of Visual Studio and associated workflows.
Still no update on this issue? It is really annoying not being able to debug
PCLs. Is there someone else we should talk to or it is, in fact, a Xamarin
Xamarin version 4.0.3.
This is killing me. Any idea when this will be resolved guys?
Xamarin.Android 4.6.04000 VS2012.
Miguel has said that PCL support should arrive in approx 1 month.
I have no inside information about it.
Some words of caution:
- I would **guess** that there will be a couple of rounds of Alpha, then Beta
before it becomes Stable
- I would **guess** that this will arrive in Xamarin Studio first, and then
migrate to Visual Studio afterwards
Beyond that, I also have talked with one of the support guys about general VS
debugging issues - I know that they said they had fixed a number of problems
and that they were QAing those fixes. It might be worth one or more of us
pinging support by email to ask for a timeline on these fixes - it may be that
we don't need PCL support - we just need those other fixes.
I have been investigating this issue. It turns out that because the PCL
libraries do not use the Xamarin msbuild targets it does not generate the .mdb
files which are needed for debugging.
I am working on a fix for this. Once completed the .mdb files will be generated
from the existing .pdb files that the PCL library produces. This will allow the
PCL libraries to be debugged.
Depending on the release cycle this fix may go into the Alpha or Beta channel.
Fixed in master/2fc29e9173
*** Bug 9759 has been marked as a duplicate of this bug. ***
Why does this say it's fixed yet it still doesn't work? Is this not in the
release build yet?
@rlangton76: Which version have you tried? The fix for this bug was in the
4.7.5 alpha release.
You might try the current 4.7.9 beta release or the current 4.7.11 alpha
The fix for this will not be landing in the 4.6.x series.
I can confirm this is breakpoints are hit with the (now beta) 4.7.11 release.