It works in my computer (Starting problems – Jounce)

I was out on a vaccation and happy to be back. I will post couple of pictures later.

Now to the fun part, Couple of my friends have a problem developing ‘Hello World’ program using Jounce. Now that Jounce 1.0 is out, it is no longer required to download the source code to build and generate the dll to use. You can now download the single Jounce.dll directly from download page or using NuGet get the Jounce Package. So my friends tried the first approach by using the single Jounce.dll. The program compiles just fine but when you run the program, it fails at runtime. But I could create ‘Hello World’ program all day and it does not fail at run time. By the way, I followed the same steps by friends did. As all the programmers say, ‘It works on my PC’ 🙂

I always like good debugging. So I sat with one of my friend and see what is happening. For starters, when you create Jounce application, you end up deleting all the code from App.XAML.cs since application startup will be taken over by Jounce Framework. Since there are no code in App.XAML.cs, the trapping error was little difficult. So I went in and put the code the catch the unhandled exception in App.XAML.cs. With that armed, put a break point inside the unhandled exception code, when I looked at the error log, I could see, it is looking for ‘System.Windows.Interactivity.dll’ and that was not in the reference folder. We added the missing dll and there it is, ‘Hello World’.

Now the question, how come it worked in my box not on my friends, we both did the same things. The only difference was, I have Expression Blend installed and this dll is available in GAC to find it. So the bottom line, is if you are using Jounce and do not have Expression Blend installed, make sure you have this dll in your reference other wise you will run into the same problem. You will need this dll if you are going to use MVVMLite or Caliburn.Micro as well.

There is still an outstanding issue with NuGet, with out Expression Blend install, Nuget install for Jounce is failing. I haven’t got ten around to see why is it failing. I will update this post once I get an answer.

** Update – “I looks like maybe one of the Expression SDK because of the Navigation Trigger. Will see if I can add the dep to pkg” from our good friend Jeremy. **

Hope this helps someone.

Advertisements

Do you have NuGet? if not GoGet

I use Jounce as MVVM framework for my development. Earlier I used to download the latest version put it in some reference folder and let my application reference that folder. All was working good till I found NuGet. NuGet is a open source package management system. Never used a package manager before in my VS development so never bothered about it till now. It is easy to get started with NuGet, go to the link and install the NuGet.

For testing, lets create a new Silverlight application project. Next I want to add a jounce reference. There is a better way to create Jounce project that I will explain later. When you right click on the project, you will see a drop down with following options

image

Lets select the last option and then choose Online in the left most options as shown below.

image

What I want to install is Jounce, since I know the name I search directly using the search option on the top right hand corner and it will take us to the package directly.

image

Now if you install it, it will create the package folder in the solution and adds the references to the solution with local reference. That is it. I really like NuGet on this perspective it is very easy to find and add correct references in the solution.

Now going back to the first point, what is the better way to add Jounce solution, of course using Jounce template. Go to Jounce Codeplex page

image

and install the template. Now create a new project and again, search for Jounce at the top right hand corner which will take you directly to Jounce template and create you project and you are set.

image

Thats all about it.