WPF app crashes after migration to TFS 2017

Recently we’ve migrated our projects repository from TFS 2010 to TFS 2017. Unfortunately it soon turned out that WPF projects doesn’t cooperate with new TFS. Well, actually they did cooperate well with TFS but didn’t cooperate with the User. The build process went well with no warnings and the application was properly deployed. However after the app was deployed and we wanted t…

By Mirek on (tags: AssemblyVersion, msbuild, resource dictionary, TFS 2017, WPF, XAML, categories: architecture, tools)

Does it make sense to NGen – compile your ASP.NET MVC application ?

In .Net world every line of code has to be compiled before it can be executed obviously. However the compilation process occurs twice. First the Common Intermediate Language (CIL) is produced out of human readable code and it occurs just after the development process. Then the CIL is compiled into the native code specifically to be interpreted  by the target machine. The l…

By Mirek on (tags: NGen CIL JIT-compilation, categories: architecture, tools)

Web API : One side object materialization

Recently I’ve been working on a api project where the requirement was that any data on the api service side is plain xml, stored in database as xml type column. No binding and object materialization is done on the server. However the client has to operate on clr objects. I am going to show you the solution I came to. I have chosen the Web API 2 as the service architecture, sinc…

By Mirek on (tags: Web API, web service, XML, categories: architecture)

Sql Server application roles with Entity Framework Code First Migrations

A time ago I have been writing about the Sql Server application roles, what are the benefits of using them and what are the limitations when we want to incorporate the Entity Framework to use application role. Today I will show you how to workaround those limitations with new Entity Framework facility introduced in version 6 of the framework. I am specifically talking about dat…

By Mirek on (tags: Application Role, Entity Framework, SQL Server, categories: architecture, code)

Autofac and MEF integration

A time ago I have presented a way of implementing wpf plugins with use of Managed Extensibility Framework. Today I will show you how to integrate your MEF exports with Autofac dependency container. For that we will need of course MEF which is stored in System.ComponentModel.Composition assembly, Autofac and Autofac.MEF packages. Having that in place we can manage our MEF export…

By Mirek on (tags: Autofac, MEF, Plugins, categories: architecture)

Version tolerant XML Serialization

One of the beauties of xml, is that it can be extended without breaking applications. You can add element to the xml document tree and the application should not crash or fail while consuming this xml. This is what we can read on the w3schools.com xml tutorial. But how is this with serialization of the xml? Recently I found a guide on MSDN which is called Version Tolerant Seria…

By Mirek on (tags: Version Tolerant Serialization, XML, categories: architecture, code)

Mapping XML column with XSD schema validation in EF Code First

The XML data type allows storing a xml content in our SQL Server database. The great feature is that we can also attach an XSD schema to it and have the xml content automatically validated. Here I am going to show you how to set it up together with Entity Framework Code First. Storing XSD Schema in database and mapping entity One could ask: what is the point of validating the x…

By Mirek on (tags: Entity Framework, SQL Server, XML, XSD, categories: architecture, code)

InitialCreate migration and why is it important

Entity Framework migrations is indeed a great feature. It makes you don’t need to worry about the database schema updates almost at all. There are however few things you must know to properly understand and use EF migrations. This post describes few of those things. Usually when you start a new project which makes use of Entity Framework and you starts developing it with a defa…

By Mirek on (tags: Entity Framework, migrations, categories: architecture, tools, code)

TypeScript - a way to embrace the fuzzy world of java script.

What I always dislike in java script was the fuzziness of this language. Very often you didn’t know what type the variable is or if it was an object or a function. I always lack of some strong typing, design time rich intellisense or compile time type checking, which would minimize the possibility of making a bug in the java script code. TypeScript is a cure for all inconvenien…

By Mirek on (tags: javascript, TypeScript, categories: architecture)

Why should we be concerned about floating point arithmetic.

This is often quite obvious that when we are developing application which operates on a real numbers we use a double data type in .net. Here you will see why you should take a special care about the floating point calculations in your software. Generally all floating point calculation problems comes from the fact that many real number does not have an exact representation in fl…

By Mirek on (tags: decimal, double, flaoating-point, categories: architecture)