0

After adding Catel implementation to one of my views(mainPage) in my project I have a bug that crashes my Silverlight project. The only indication I have is :" A first chance exception of type 'System.NullReferenceException' occurred in Catel.MVVM " (just about after setting the RootVisual~) - I can't find what I'm doing wrong, and since I am planing on a long-term relationship with Catel I thought that stepping through Catel code might come in handy, so I tried and failed in all the following steps (any help will be appreciated.. because currently I'm stuck and can't find anything):

  1. downloaded catel 3.9 source files (same as my nuget package) and tried building it.. failed with this error : E:\Dev\Catel-3.9.0\src\Catel.Core\Catel.Core.SL5\Fody.targets(51,5): error MSB4036: The "Fody.WeavingTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "E:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" directory. - trying to search and figure the reasons and overcome this, lead me to nowhere. :(

  2. i have followed this "Stepping through the code" instruction in Catel documentation but noting really happened (I'm using VS2010..is this an issue ?? )

  3. I read this article & readme.md at : https://github.com/GeertvanHorrik/GitHubLink about using GitHubLink to help you stepping through Catel code while debugging. I downloaded the release GitHubLink 1.3.0 from https://github.com/GeertvanHorrik/GitHubLink/releases/tag/1.3.0 ... but running this even with just the githublink.exe -help flag had thrown a exception..

  4. I downloaded the Githublink-master source files but 0 projects were loaded (the GithubLink project file is incompatible with the current version of VS - I'm using VS2010)

can anyone help me either shade some light or:

  • overcome the build error I receive for catel (no.1)
  • instruct me how to set & step into catel ?
  • share the pdb files for Catel libs

2 Answers2

1

It completely depends on the version you are using. If you are using the latest official one (3.9), stepping through the code is only possible by cloning the master branch and building the PDB files yourself.

In the latest prerelease versions via NuGet (the upcoming 4.0 version) you only have to enable the source server checkbox.

Note that you should never have to use GitHubLink yourself, that is for developers only (we run it during the build of Catel).

About the Fody task: it looks like the NuGet packages have not yet been restored on your side. In the lib folder there is a RestorePackages.bat which you can run to restore the packages.

Geert van Horrik
  • 5,689
  • 1
  • 18
  • 32
  • 1. are there any special drawbacks moving to catel 4 (support SL4? for example) ? – user3720506 Jun 09 '14 at 10:44
  • 1. when you say cloning you mean adding catel to my solution ? ( or doing a github clone..which i know nothing about it) 2. are there any special drawbacks moving forward to catel 4 (support SL4? for example) ? 3. does the catel 4 stepping feature works on vs2010 ? 4. about Fody task: I can't find any restorePackage.bat on the un zipped catel 3.9 folder.. 5. I had follow the documented guidance but I can't seems to make to logging manager work.. any lead or a way to check this(or lets make debugging work for start?) – user3720506 Jun 09 '14 at 10:58
  • 1) No, cloning + building is simply cloning and running the build. Then you can copy the required libraries to your repository. 2) Catel dropped support for SL4 on November 8, 2013: http://catelproject.com/2013/11/08/platform-support-update-dropping-sl4-wp7-x/. SL5 will be supported as long as MS does (at least, the tooling). We don't want to use different versions of visual studio to support different (obsolete) versions. 3) Don't know. We only support the latest 2 versions of Visual Studio (2012 / 2013). 4) We added that in 4.0. It should be simple to do though. 5) Please ask new question – Geert van Horrik Jun 10 '14 at 09:03
  • Ok , Thanks!! lets see what I can make out of that.. (: see you in another thread ;) – user3720506 Jun 10 '14 at 13:30
0

I tried debugging on VS2012 and using Catel 4 pre-release (from Nuget).. although I believe I did all the right things & settings in VS, I didnt get much further.. So I Opened (using a bin editor) the pdb file that was pulled by Nuget with the DLL, and took a look at the bin file. the file have strings pointing to the source files at this directory : C:\ci_ws\WS\1629\source\catel\src\catel/mvvm\catel.mvvm.shared.. So I have created a tree that starts with c:\ci_ws\ws\1629\source
and downloaded the catel folder to that dir, renamed it from "Catel-Develop" to just "Catel" in order to feet the location the pdb pointed. To get things going I also had to add a "Symbol File(.pdb) location" in VS option-> settings->Debugging->Symbols..(location/server list) to where the nuget download the packages. in my case.. SolutionFolder\Packages\Catel.MVVM.3.9.0.1406062245-beta\lib\sl50..(I'm using Silverlight) and then I was able to load the symbols and step/break into the code successfully .. Maybe I missing something and there is a better way, but this the only way that worked for me..

The only question that still remains for me now is : What is the name of the Catel Github source branch that is matching the pre-release dll and pdb that Nuget is publishing at the moment (3.9.0.1406062245) ? (I unchecked the general debug settings of : require source files to exactly match the original version)