This Blog Has A New Home!

This blog has been moved to www.SoftwareRockstar.com. Articles already here will remain intact, while new content will only be added to the new location at www.SoftwareRockstar.com.

Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Wednesday, March 11, 2009

Free Visual Studio 2008 Productivity Add-in

Developer Express and Microsoft provide a new version of CodeRush licensed exclusively for C# developers working in Visual Studio. The new product is called CodeRush Xpress, and it includes a slew of useful features to boost your productivity under Visual Studio.

You can download CodeRush Xpress here.

Wednesday, October 31, 2007

Improved .NET Code Analysis: FxCop 1.36

The latest beta version of FxCop 1.36 was recently made available for download. This new version includes various features and fixes that include:
  • 200+ bug fixes that reduce noise, missing analysis and rule crashes
  • Support for analyzing anonymous methods and lambda expressions
  • New option for skipping analysis over tool generated code
  • Better support for C++/CLI and the Compact Framework
  • Language 'friendly' API names in the UI and resolutions
  • New globalization, design and usage rules
  • Performance improvements that cut analysis by 2x and use half as much memory
  • Documentation that is now available on MSDN
FxCop is an excellent free static code analysis tool from Microsoft that checks .NET managed code assemblies for conformance to Microsoft's .NET Framework Design Guidelines.

Thursday, October 18, 2007

Astoria and Jasper: Old Ideas New Technology

SubSonic is an excellent open source DAL generation tool developed by Rob Conery that has been around for almost a year. In most cases SubSonic can just be added to your project, pointed to a databse, and you magically and immediately gain access to a rich and strongly typed object model that can be used to query and persist data to and from your relational data source. SubSonic also has a cool feature called the REST handler that essentially allows one to use HTTP protocol as an interface to data stored in a back-end relational database. It is URI based and returns data back in XML format. This data can then be used by decoupled client applications as they see fit. If you have never looked at SubSonic, you owe it to yourself to checkout this very cool tool. Recently Microsoft unveiled their plans to release similar features codenamed Astoria and Jasper with .NET framework 3.5 and Visual Studio 2008. The CTP of Astoria and Jasper are available for download from Microsoft. Jasper is described by Microsoft as:
Project Jasper is geared towards iterative and agile development. You can start interacting with the data in your database without having to create mapping files or define classes. You can build user interfaces by naming controls according to your model without worrying about binding code. Project Jasper is also extensible, allowing you to provide your own business logic and class model. Since Project Jasper is built on top of the ADO.NET Entity Framework, it supports rich queries and complex mapping.
Pablo Castro, the mastermind behind Astoria describes it as:
The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs such as GET, POST, PUT and DELETE, and the data exchanged in those interactions is represented in simple formats such as XML and JSON.

The Astoria web site also includes sample online services that showcases how this new technology can be used. It also allows anyone with a Passport account to design and host their own experimental data services .

Tuesday, May 22, 2007

Temporary ASP.NET Files

ASP.NET generates temporary files from the code-behind and aspx files that it compiles into assemblies behind the scenes. These temporary files are stored in %WINDIR%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files folder. Sometimes these files get out-of-sync with the user code and modifications to the code have no effect while debugging. In such situations it is safe to delete the contents of this folder and force ASP.NET to regenerate these files.

Thursday, December 07, 2006

Anthem.NET - An AJAX Library for ASP.NET

I coworker introduced me to Anthem.NET, which is an AJAX library for the ASP.NET platform. Within the last year or so, quite a few AJAX libraries have surfaced, including Microsoft's ASP.NET AJAX (formerly known as ATLAS), and other free and commercial products. Some of these are pretty decent, while others are not even worth investigating. Anthem.NET, with it's impressive functionality, belongs to the former group. Some of the features of Anthem.NET include:
  • Free and open source
  • Support for .NET 1.x and 2.0
  • Seamless integration with Visual Studio 2005
  • Broad browser support (IE, Firefox, and Safari)
  • Support for Mono
  • Familiar ASP.NET postback style functionality
  • Support for ASP.NET ViewState
  • Support for web user controls

You can download Anthem.NET from SourceForge.

Saturday, October 21, 2006

Microsoft Build Engine (MSBuild)

Up until Visual Studio 2005 and .NET Framework 2.0, the actual build process of solution or project files was pretty much a black-box phenomenon for developers. With .NET Framework 2.0 and Visual Studio 2005, Microsoft unveiled its new build platform called MSBuild. MSBuild essentially provides a transparent build process through Visual Studio IDE, as well as allows developers to build projects and solutions from the command line. This allows us to fully customize our builds and create builds on machines where Visual Studio is not even installed. On a recent team project I was using continuous integration or CI (an Agile practice) via CruiseControl.NET. It was a breeze to automatically build projects and solutions using MSBuild on our build server (a run-of-the-mill Dell workstation running Windows XP without Visual Studio 2005 installed) whenever someone checked-in any files to source control. This allowed us to be confident at all times that various pieces our distributed project integrate well. Moreover, since MSBuild can build projects and solutions from command line, I had some batch files setup that would build release versions of our projects, create setup files (using NSIS), archive older versions of setup files, and move new setup files to a network share where MIS / Operations folks could install the new version on the production server from. In Visual Studio 2005, project and solution files are nothing more than MSBuild XML build scripts. This allows us full control over the build process. For example, in a web project, Visual Studio 2005 does not provide any user interface to modify pre and post build actions. However, since solution file is simply an MSBuild script, we can modify such actions manually by opening up the solution file in any text/XML editor. MSBuild can perform several key tasks out of the box. Each task is essentially a unit of work (UOW) that contributes to the entire build process, e.g. copy files and folders, compile files, etc. If we ever require tasks that do not ship with MSBuild, we can always create custom tasks in any .NET language by simply implementing the ITask interface or deriving from the Task class. In conclusion, MSBuild allows developers full control of the build process so that builds can be fully customized. This may not be so crucial in smaller projects, but for enterprise solutions that typically comprise of several projects and many dependencies, MSBuild is definitely a God-send!

Wednesday, September 13, 2006

ASP.NET 2.0 Web Application Projects

I recently posted about how the lack of project files in Visual Studio 2005 Web Site Projects make it difficult to deploy web applications. I just came across this add-in for Visual Studio 2005 that actually addresses this very issue. It's called the Visual Studio 2005 Web Application Projects (WAP) and is available as a free download from Microsoft. WAP provides following features to ASP.NET 2.0 Web Site Projects in Visual Studio 2005:
  1. A project file that contains references to all web content as well as any assembly references.
  2. Compilation into single assembly that is built into the bin folder.
  3. Pre and Post Build actions.

While WAP is aimed at developers converting web applications from Visual Studio 2003, I think that it's an invaluable tool for anyone creating web applications using Visual Studio 2005.

Thursday, August 31, 2006

ASP.NET 2.0 Deployment

Microsoft screwed up royally in Visual Studio 2005 when it comes to deployment of web projects. It seems like they initially assumed that everyone would use web site publishing feature for deployments, but that certainly is not the case. Later they came up with the Visual Studio 2005 Web Deployment Projects (WDP) add-in hoping to rectify their oversight, but WDP is nothing more than a lame bandage over a broken bone. The departure of project files from ASP.NET projects serves as an icing on the cake! And what exactly were they thinking when they decided that web projects can't have any more than two build configurations (Debug and Release)? While I really like .NET 2.0 and Visual Studio 2005, I just can't come to peace with the fact they did not think through deployment features of ASP.NET projects.

Saturday, August 19, 2006

FxCop Analyzes Internals

While FxCop is an invaluable tool for analyzing the external (public / protected) API of our assemblies, I was really hoping to have a way to also fire it against internal members of our code in order to enforce coding standards across our organization. David Kean's tip shows us exactly how to do that! It turns out to be a simple matter of turning on the Run all overridable rules against all targets option under Project | Options | Spelling & Analysis menu.

Thursday, August 17, 2006

Client Side Reports in Visual Studio 2005

Perhaps the best kept secret (or at least the least discussed feature) of Visual Studio 2005 is the client-side reports. Client-side reports consists of the Report Viewer Control and it's accompanying Report Designer that comes standard with Visual Studio 2005 Professional and up. This feature can be used to develop ASP.NET or WinForms solutions that sport SQL Server Reporting Services style reports, without having to deploy those reports to a Reporting Server. Reports are deployed as RDLC files with your solutions. In fact one doesn't even need SQL Server, since these reports can be programatically bound to objects such as DataSets, a huge plus for ditributed n-tier designs where the UI layer does not have direct access to the data store. This also means that one can use any imaginable back-end data store including XML and CSV files as long as data can be loaded into binable objects. The report viewer control is similar to Reporting Services report viewer, with nifty features such as paging, searching, and export (PDF, Excel, CSV) features. My only complain with the ASP.NET version of the report viewer is that it does not directly support printing. Reports have to be exported to PDF in order for one to print. This was a gotcha with the first versions of Reporting Services report viewer as well, but later they added printing support to the control (perhaps through ActiveX) in Reporting Services SP1. You can find more information about this feature at GotReportViewer.

Wednesday, July 19, 2006

Write Black and Blue Get Green Free

GhostDoc is a free Visual Studio add-in that automatically generates XML comments by intelligently deducing comments from member name and type or by using existing documentation written by someone else in a base class or an interface. This tool is purely intelligent and simply amazing. With tools such as this there simply is no excuse for developers whose code looks all black and blue to not add some green for free! Checkout this GhostDoc PDC demo video on Channel9.

New Articles On Software Rockstar