Resolving EPERM Issues in Visual Studio 2015 Cordova Projects

When working with Cordova applications in Visual Studio 2015, developers often encounter a frustrating issue related to file permissions. This problem typically manifests when trying to build a Cordova project that’s under source control, particularly with Team Foundation Server (TFS). Understanding and resolving this issue is crucial for maintaining a smooth development workflow. Understanding the Problem The core issue stems from file permissions in the platforms directory of your Cordova project. Even though this directory is typically excluded from source control (as it should be), the files within it become marked as read-only. This creates a conflict when the build process attempts to modify these files, resulting in the “EPERM, operation not permitted” error. ...

November 25, 2015 · 3 min

Automating JavaScript Minification in TFS Build Process

JavaScript minification is a crucial step in modern web development, significantly reducing file sizes and improving page load times. For instance, jQuery 1.11’s file size decreases from 247KB to 97KB after minification. While this might seem negligible on broadband connections, it becomes crucial for users on mobile devices or slower connections. This guide will show you how to automate JavaScript minification during the Team Foundation Server (TFS) build process. Understanding Minification Options There are several tools available for JavaScript minification, but Google’s Closure Compiler stands out for its reliability and features. The compiler offers two optimization modes: simple and advanced. While advanced mode provides more aggressive optimization, it requires careful consideration of potential side effects. For this guide, we’ll focus on simple optimization, which provides a good balance of performance and safety. ...

February 24, 2014 · 3 min

Exclude NuGet Packages from TFS

NuGet has become an essential tool in modern .NET development. As a package manager for Visual Studio, it streamlines the process of managing dependencies by automatically restoring required references when loading solutions and building projects. This automation is particularly valuable in team environments, eliminating the traditional headaches of managing reference paths and ensuring everyone has the correct DLLs. The official NuGet gallery offers hundreds of packages, and organizations can even host their own custom package servers. ...

January 20, 2014 · 3 min