Tag Archives: .NET

Simple cache interface and implementations

During a couple of my last .Net projects I used the same cache interface and implementations of it with MemoryCache, System.Web.Caching.Cache and CacheManager.

Visual Studio solution is available here https://github.com/mchudinov/CacheNet. Solution includes source code in both C# and Visual Basic.
Continue reading

How to build and deploy a web deployment package using MSBuild

Web application packaging and deployment automation using MSBuild needs the following steps:

deployicon

Step 0. Server preparation is covered here How to prepare a Windows Server 2012 for web deployment

  1. Configure solution build profiles
  2. Configure transformation of web.config file
  3. Configure publishing profiles
  4. Create a web deployment package with MSBuild script
  5. Run deployment from command line

Sample solution that includes build script and configured publishing profiles can be downloaded here https://github.com/mchudinov/BuildWebDeployPackage
Continue reading

Setup a multilingual site using ASP.NET MVC5

A multilingual site should translate the following:

  • Date and time formatting
  • Currency
  • Text resources: lables, buttons, validation messages, tooltips

It must be easy to switch languages.
It should be relatively easy to add more languages.

An example ASP.NET MVC 5 project can be downloaded here https://github.com/mchudinov/AspMvc5Multilingual

languages_feature_v3_tcm4-833994

Continue reading

Using localdb in development

LocalDB is an instance of SQL Express. It is easy to use it in development from Visual Studio. I want to have localdb database files included into Visual Studio solution for easy connect to database wherever I work.

Sample solution can be downloaded here https://github.com/mchudinov/LocalDbExample
db
Continue reading

Packaging of a .NET application on Windows

This post is about how to package .NET application for Windows into an MSI (MicroSoft Installer) package using Wix# tool in command line. Packaging process can be easily automated on continues integration server.

msi_package

Generally application building workflow is simple:

  • Assign a version number to an assembly
  • Build binaries
  • Copy binaries to package folder and build msi-package with the same version as  assembly

Build process will be controlled by MSBuild project file and can be started from a continues integrations server.

Sample solution is available for download here https://github.com/mchudinov/PackagingMSI. Solution is compatible with Visual Studio 2013.

Automated building and versioning processes were described in my previous posts:

Continue reading

Logging in .NET Mono on Linux and Windows using NLog

Here is a simple application that will log to console and syslog demon. On Windows platform we can use free edition of Kiwi Syslog Server. On Linux application will use both local and remote syslog. As a logger library I use NLog.

Sample solution can be downloaded from here https://github.com/mchudinov/LoggingNLog. It is compatible with Visual Studio 2012, Mono Develop 5, and Xamarin Studio 5.
Continue reading

Packaging of a Mono application on Linux

How to package a Mono (.NET) applications for Debian-based Linux in command line. Packaging process can be easily automated on Continues Integration Server.

debian_package

Package building workflow is quite simple:

  • Assign a version number to a .NET assembly code
  • Build binaries
  • Copy binaries to package folder and build deb-package with the same version as an assembly

Build process will be controlled by MSBuild project file and run from a continues integrations server. MSBuild on Mono platform is substituted by xbuild utility.

Sample solution is available for download here https://github.com/mchudinov/PackagingMono. Solution is compatible with Visual Studio 2012, MonoDevelop/Xamarin Studio 5.

This is my third blogpost about automation of development workflow with Mono. Automated building and versioning were covered in my previous posts:

Continue reading