<ItemGroup> <T4Template Include="Model.tt"> <Generator>TextTemplatingFileGenerator</Generator> <LastGenOutput>Model.cs</LastGenOutput> </T4Template> </ItemGroup> ... <!-- Define target for code generation --> <Target Name="T4Generation"> <Message Text="Running Text Transformation..." /> <Exec Command=""TextTransform.exe" "%(T4Template.FullPath)" -out @(T4Template->'%(FileName).wxs')" /> </Target> <!-- Add target for code generation as dependency of "CoreCompile"-target --> <PropertyGroup> <CoreCompileDependsOn>@(CoreCompileDependsOn);T4Generation</CoreCompileDependsOn> </PropertyGroup>
Websites and blogs of people that attended a Homebrew Website Club Düsseldorf.
Effects for the Web!
MsBuild finding directories if not given as parameter
I’m a lazy developer. Being lazy does not mean I avoid to work. It means that I like to reflect things I am doing and optimize and atomize stuff to get more time on the valuable tasks. Code generation is a tool I tend to use quite regularly and T4 is at most my generator of choice. Generated files can cause a lot of merging conflicts. So they are not to be checked into my source control system (currently my choice is HG/Mercurial).
Could not load file or assembly exception and how to fix your builds when using nuget packages
Once in a while it happens that an exception is thrown like the following: Could not load file or assembly ‘devcoach.Core, Version=1.0.11308.1, Culture=neutral, PublicKeyToken=0313e76cb5077f22’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) What did cause this exception to be fired? Lets have a look at the following picture which illustrates the scenario. The build order is defined by the dependencies.
Chaining asynchronous javascript calls
The good thing about JavaScript is that its network/ajax calls are asynchronous. The bad thing about JavaScript is that its network/ajax calls are asynchronous. It’s bad because nested calls increase complexity. Look at the following sample methods: function f1(callback) { console.log('f1'); if (callback != null) { console.log('hasCallback'); callback(); } } function f2(callback) { console.log('f2'); if (callback != null) { console.log('hasCallback'); callback(); } } function f3(callback) { console.log('f3'); if (callback != null) { console.
ICE Lingen 2011
It’s community summer again. The same procedure as every year. In the middle there is some refreshing ICE. The ICE-Conference in Lingen is something special to me because it is an admin event. I’m a developer. Maybe It’s caused by my roots – yeh, I was an admin once. Maybe caused by the fact that I tend to build bridges between admins and devs and build my developments aware of infrastructure.
Will Microsoft reveal a new IDE at the BUILD conference?
Maybe something x64? Maybe something faster? Who knows? For now I’m just dreaming…
NRW Conf 2011 community conference: The doors are open
Since the year 2005 the non-commercial organization JustCommunity e.V. organises once a year the NRW Conf community event. Over the time it has become one of the biggest community events in Germany. This years conference will be on the 8th and 9th of September located in Wuppertal, Germany. We will host over 20 speakers and sessions from Germany and Europe, and as last year there will be a workshop day upfront:
Skype / 0
Figure out if the current running application is a web application without a reference to System.Web.dll
Especially in core libraries I tend to not reference System.Web.dll to keep the .NET Framework Client Profile as an option of compilation. I use the following code to figure out if the current running application is a web application namespace devcoach.Extensions { public static partial class AppDomainExtensions { public static bool IsWebApp(this AppDomain appDomain) { var configFile = (string)appDomain.GetData("APP_CONFIG_FILE"); if (string.IsNullOrEmpty(configFile)) return false; return Path.GetFileNameWithoutExtension(configFile).Equals( "WEB", StringComparison.OrdinalIgnoreCase); } } }
First issue on my workstation while running in UTC Timezone: Last.fm
Settings in Silverlight
A few months ago I was developing a Silverlight Line of Business Application with a customer when I stumbled across the requirement to store some information over multiple user sessions - user works with the app, closes the browser and reopens the browser and works with the app again. My first idea was to store the info in a cookie. It all worked out fine until I started to enable the localization using the culture/uiculture param.
.NET Day Franken 2011
Am 21. Mai war ich Sprecher auf dem .NET Day Franken. Ein weiteres tolles Event für die .NET Community. Vielen Dank an Thomas Müller, und Bernd Hengelein und Michael Wiedeking!
dotnet Cologne 2011
Am 6. Mai fand in Köln die dotnet Cologne statt. Neben meinem Sprecher-Engagement hat es mich sehr gefreut, dass unsere Firma, devcoach, dieses gelungene Community-Event als Platin-Sponsor unterstützen konnte. Ein großes Dankeschön an Albert Weinert, Roland Weigelt und Stefan Lange!
New Visual Studio Style
I’ve been with a dark theme for a while but always hat a few issues with my prior theme. Today I created a new one: http://studiostyl.es/schemes/lennybacon-s-new-dark
Setting up a local SSL development environment for multiple sites
The environment should also work on a notebook while working at a coffee shop. The need for a NIC that is always connected. Add a loopback adapter… [WIN] + [R] | hdwwiz.exe Open the “Network and Sharing Center” … Click “Change adapter settings” and identify the loopback adapter… Rename the loopback adapter… Open loopback adapter’s properties… Disable IP v6… Edit IP v4 settings and assign an IP Address… Click advanced an add another IP address for each SSL-Site to be hosted… Open “IIS Manager” and click “Server Certificates”… Click “Create self signed certificate” for each SSL site to be hosted and choose the host name as friendly name… Assign each site to be hosted a dedicated IP address plus certificate… Associated IP addresses with host names in the hosts file (or install DNS Services when on Server 2008)… Done!
Resharper 6 WPF binding validation
I usually do most stuff in the markup view. As loose coupled view models cannot be validated its … ugly. But today I experienced this: I hit [ALT] + [ENTER] The following code was added (the type name “LoginViewModel” and its namespace was addedmanually…): Now I got binding validation: Nice!
ASP.NET MVC 3: German Web Casts Series
Heute sind die ASP.NET MVC 3 Web Casts die ich machen durfte online gegangen: ASP.NET MVC ist Teil des ASP.NET Framework; Anfang 2011 ist die Version 3 des ASP.NET MVC erschienen. Diese Webcast-Reihe führt in das Entwurfsprinzip des Model View Controller-Schema (MVC) ein. ASP.NET MVC (Teil 1 von 3) – Fundamentals ASP.NET MVC (Teil 2 von 3) - Views & Layouts mit Razor ASP.NET MVC (Teil 3 von 3) - Forms, Binding & Validation
Nuget Package Reference Switcher Extension for Visual Studio
I really like the idea of nuget package management. I tend to use packages also for internal libraries. But in a debugging session I sometimes need to debug or even change the referenced project. What I usually do is to add the foreign project to my solution and change the reference from the “Package Reference” to a “Project Reference”. After I did my changes to the foreign project I commit it, rebuild the package, upload it and reload the package to my local projects package directory.
WCF Data Services Client does not close connections!
Have you ever worked with the WCF DataServices Client? I was contributing to the nuget project and experienced some problems. After a few operations (web request through either the WCF Data Service Context or manually through a WebRequest) operations started to time out. I used (the fabulous) reflector pro to digg into the sources. What you see here is a class utilized to return the result of a WCF Data Services request.