Corrado's Blog 2.0

Online thoughts of a technology funatic

Blend can’t locate types in external assemblies

While developing a Windows Store app I run into a Blend issue that caused me some headache.

I tend to define common converters in external assemblies in order to reuse them in other projects, so i added a reference to a Windows Store library project containing the converters I needed then swiched to Blend to use them from Create DataBinding dialog, and here’s what i got:

image

Problem: My library was not listed.

Really weird since here’s what I got doing the same from Visual Studio 2012

image

My MvvmHelper library is listed. Confused smile

Using Visual Studio to add the assembly resulted in following Blend error:

image

Ok, i presume you probably want to know the reason (and how to fix it): The problem was caused by projects having different build configurations: that main project has a X86 configuration (required by Bing Maps component) while all referenced libraries where AnyCPU and looks like that Blend 2012 doesn’t like it.

Moving the entire solution to X86 solved the issue.

Blend team is working on having it fixed before Blend 2013 release.

Happy Blending!

Note: Many thanks to @unni for helping me on this.

Typescript Succinctly book review

Javascript has a sort of love-hate relationship with developers, everyone use it but no one, or I’d better say, “a few”, really love it.

Reason of this, comes from the fact that is a ‘scripting’ language, thus incomplete when compared with other languages like C# (no complete support for OOP concepts, partial type system) and from a characteritic tha represents one of its strength: being a dynamic language thus not allowing development tools like Visual Studio to provide compile time checking and full intellisense support (while getting better with each release)

You can imagine how happy I was when i first knew that Microsoft was working on fixing these language “weakness” with a new superset language called TypeScript that, not only add constructs like Class, Modules, Types with compile time checking but it also made it 100% compatible with existing Javascript using a process known as “Transpiling” a sort of code transformation, this means that what you get at the end is pure Javascript.

TypeScript-Succinctly

While C# is still my primary language I was really curious since it could alleviate my pain when moving from C# to Javascript programming, that’s why during the weekend I enjoyed reading “Typescript Succinctly” by Steve Fenton, a 82 page long Ebook part of a larger family of free ebooks that Syncfusion published online.

The book doesn’t pretend to make you a TypeScript guru but its a great introduction if you want seriously mastering it, it starts from what happens under the hood: how code is transformed into pure ECMASCRIPT compatible javascript and vice versa to how to start writing some code in Visual Studio after installing the required extension.

Chapter 3 is dedicate to language core concept like Types, Modules, Interfaces, Classes and so on while next introduces more advanced concepts like Module organization, scope, inheritance etc.

Following chapter goes more practical describing how to interact with existing Javascript code and how to apply Uniit tests to TypeScript projects.

Recent Generics addition is not covered, probably because book went out before TypeScript team released them.

I really enjoyed this ebook, reading goes fast and smooth and it uses a pratical approach, something not always true in language related books,  i got what expected: a broader view of what TypeScript is and how to begin using it.

Get the book for free here: TypeScript Succinctly or get browse the entire library here.