Development

Interesting post on ADO.NET Entity Framework VS Microsoft Data Access Application block

I came across an interesting post today on Entity Framework 4.0 vs Data Access Application Block that I thought I would share…

http://forums.asp.net/post/4170460.aspx

Personally, I prefer to use Entity Framework. It’s cleaner and more flexible in my opinion.

Also, Enterprise Library is still at Version 5.0, while Entity Framework is constantly being updated. EF 5.0 is out now and it’s a lot better compared to EF 4.x, especially with regard to performance. Work is already underway for version 6 and beyond, plus Entity Framework has been open sourced.

To me, the Data Access Application Block that is part of Enterprise Library is dead. It’s not really maintained and it’s no longer the preferred data access technology recommended by Microsoft.

Enjoy!

Development

Calculating Bitmasks in PowerShell

Excellent post on calculating bitmasks in PowerShell…

http://www.jasonstrate.com/2013/02/calculate-bitmasks-in-powershell/

Development

How To: Delete a Team Project from your Team Foundation Service Collection

I came across a post in the MSDN Forums on how to delete a project from your TF Service.

“For some time now Buck Hodges has had a nice BLOG post about deleting team projects from Team Foundation Service collections. Not trying to reinvent the wheel but I thought it valuable to have it here in our support forum, too.

Basically, to delete a team project from your Team Foundation Service collection you will need Visual Studio 2012 (or just Team Explorer 2012, which is free here). These provide you with the "tfsdeleteproject.exe" command line tool, which you run thusly:

tfsdeleteproject /collection:https://<Your Collection>.VisualStudio.com/DefaultCollection <"Project Name">

Don’t forget the "/DefaultCollection" bit.”

Thanks Trevor for providing this.

Reference

http://social.msdn.microsoft.com/Forums/en-US/TFService/thread/81997146-a64f-43fb-9952-57d71542cd11

Development

Microsoft Announces Visual Studio 2012 Update 2 (VS2012.2) CTP

On January 30 2013, Microsoft announced the availability of the Community Technology Preview (CTP) for Visual Studio 2012 Update 2 (VS2012.2).

As mentioned in the announcement, there is going to be a ton of cool new capabilities coming in Update 2. With that said, not all of them are available in the CTP, but many are.

The significant improvements in this CTP can be categorized into the following groups:

  1. Agile Planning
  2. Quality Enablement
  3. Line of Business Development
  4. Developer Experience

Developer Experience

Here are a couple screenshots for what’s been changed/added for a developer experience.

Visual Studio Blue Theme. Time and time again, you hear people asking that they bring back the VS2010 theme. Well it looks like the included the “Blue” theme that was previously available on the Visual Studio Gallery:

vs2012_update2_ctp_blue_theme

CodeMap and Debugger Integration. You can now easily add a call stack to a CodeMap to explore the code dependencies from your debugging session:

vs2012_update2_ctp_codemap

Blend for Visual Studio 2012. Finally, Blend has been added back into VS2012, which includes support for WPF, Silverlight and Sketchflow:

vs2012_update2_ctp_blend

NOTE: This CTP is not a “go-live” CTP and is for evaluation purposes only.

Head over to the post for complete details on what’s coming.

I’m looking forward to this update and can’t wait to hear about other cool new capabilities.

Development

Microsoft Introduces modern.IE Tools & Resources to Help Developers Make Modern Web Sites

On Friday February 1, Microsoft launched modern.IE, which is a set of new tools and resources to help developers test their websites for the over 50% of internet users who run various versions of Internet Explorer. These tools also work with other modern browsers.

modern.IE includes a wizard that scans a Web page URL for common interoperability problems and suggests some ideas for how to address those issues to improve the user experience across modern and older browsers.”

sshot-413

“In a post to the Exploring IE blog, Microsoft general manager Ryan Gavin explained that modern.IE comes in the wake of many changes that have thoroughly modernized the company’s web browser. These changes include adopting automatic updates, the introduction of IE platform preview releases to get early developer feedback, and embracing modern web standards, “coupled with cutting edge performance and advanced touch capabilities.”

But modern.IE is designed to help developers overcome what is arguably the web’s biggest issue as a platform today: the proliferation of older versions of IE and other browsers makes it hard to develop modern web sites that work well across browsers. To that end, modern.IE provides three tools today, and Microsoft promises more are on the way. These include:

Code detection wizard. modern.IE has a wizard that scans for common coding practices that might prevent users from having their best experience on a site. Developers start by entering a webpage URL that they want to test and then the wizard reports on problems and provides recommendations.

Free Virtual Testing Service with BrowserStack. modern.IE includes special access to BrowserStack, a leading virtual browser testing site that lets developers test their site on any browser available on Windows, regardless of what OS their test machine is running. Best of all, developers who visit the site via modern.IE will receive three months of free service over the next year.

Best practices and sample code for cross-browser coding. modern.IE compiles the top 20 tech tips that address most of the compatibility issues developers have coding for the web and IE today.”

This looks really cool. Although it’s still in BETA, it’s given me plenty of information for my websites and what I can do to make them better experiences to my users.

modern.IE is available now. Go ahead and try it out for your self.

References

Development

Introduction to NuGet

NuGet is a package management system for Microsoft .NET and Visual Studio. It allows you to create simple and/or complex packages that install files into your projects, adds references and make any necessary configuration changes if needed. It also allows you to easily update to a newer version of the package if it’s available, or completely remove the package.

What is NuGet

“NuGet is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework.

When you install the package, NuGet copies files to your solution and automatically makes whatever changes are needed, such as adding references and changing your app.config or web.config file. If you decide to remove the library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left.”

What is a NuGet Package

“Everything necessary to install a library or tool is bundled into a package (a .nupkg file). A package includes files to copy to your project and a manifest file that describes the contents of the package and what needs to be done to add or remove the library. Packages are bundled into feeds that Visual Studio accesses in order to present lists of available packages. There is an official feed that is the default source for NuGet, and you can contribute to that feed or create your own feeds.”

NuGet User Interface in Visual Studio

“NuGet runs in all versions of Visual Studio 2012, as well as Visual Studio 2010, Visual Web Developer 2010, and Windows Phone Developer Tools 7.1. You can find, install, remove, and update packages by using the Manage NuGet Packages dialog box or by using PowerShell command-line commands in the Package Manager Console dedicated Visual Studio window. Both options are accessible from the Visual Studio main menu; you can also open the dialog box from a Solution Explorer context menu.”

The Manage NuGet Packages Dialog Box

The following illustration shows the Manage NuGet Packages dialog box. You can access this by right clicking on your project in the Solution Explorer and then click on the Manage NuGet Packages… menu item.

sshot-409

The Manage NuGet Packages Console Window

The following illustration shows the Package Manager Console in Visual Studio. This console window lets you run NuGet PowerShell commands.

sshot-410

Supported Operating Systems

  • Windows 8
  • Windows 7
  • Windows Vista SP1
  • Windows Server 2008
  • Windows Server 2008 R2
  • Windows Server 2003 SP2
  • Windows XP SP3

Now that we have an idea of what NuGet is, let’s try it out.

Getting Started

To get started, you will need to download and install NuGet. Launch Visual Studio and then go to the Tools menu, then select the Extensions and Updates… menu item.

sshot-411

Then in the Online section, search for NuGet Package Manager or usually this is listed as one of the top items in the Visual Studio Gallery section.

Once NuGet Package Manager is selected, press the Download button. After a package has been downloaded and installed, you will see a green checkmark as illustrated below:

sshot-412

When the installation is complete, you will need to restart Visual Studio.

After Visual Studio is restarted, NuGet will then be ready for use.

NuGet is truly a pain-free way of installing and managing packages for your projects. NuGet takes care of everything and it just works!

Further Reading

  1. Managing NuGet Packages using the dialog. This describes in great detail how to find, install, update and remove packages from your project and/or solution.

    The solution option is neat as you simply select which projects you want to add the package to and then they’re all installed/updated at once.

  2. Creating and Publishing a Package.

References

DatabaseDevelopment

SQL Server Data Tools–December 2012 Update is now available

New updates are now available for SQL Server Data Tools (SSDT). The latest update is called SQL Server Data Tools – December 2012. You can get the update from here:

SSDT for Visual Studio 2012: http://msdn.microsoft.com/en-us/jj650015

SSDT for Visual Studio 2010: http://msdn.microsoft.com/en-us/jj650014

As posted on the following blog post, here is a recap of what’s new:

“What’s New?
Database Unit Testing

We have received an overwhelming amount of feedback that database unit testing is a critical feature for customers, so SSDT- December 2012 adds support for this feature. Database Unit Testing in SSDT will look familiar to many of you as it is based on the equivalent capability in the Visual Studio 2010 DB Pro tools. Some highlights:

  • Installs in Visual Studio 2010 or Visual Studio 2012:
    • Requires Visual Studio Professional or higher edition to support database unit testing functionality.
    • Installs side-by-side with existing Visual Studio 2010 DB Pro tools in Visual Studio Premium and Ultimate editions.
  • Supports client-side testing based on MSTest with the same built-in test conditions as DB Pro.
  • Allows desktop development and execution of tests as well as execution from the command line or as part of a build on a build server.
  • Upgrades existing VS 2010 test projects without change to the database unit test scripts or code.
  • Integrates with SSDT SQL Server database projects:
    • Automates deployment of the database project on test initialization.
    • Generates skeleton test scripts for stored procedures, functions and triggers via SQL Server Object Explorer.
    • Applies changes to test scripts when refactoring objects in database projects.
  • Supports custom test conditions (existing custom test conditions need to be modified before they can be used).

Stay tuned for a follow-up post on getting started with SQL Server database unit testing.

Integration of SSDT Power Tools

The SSDT team started releasing SSDT Power Tools last April as a mechanism to deliver new and experimental features with each release. Since then, the Power Tools have been downloaded over 24,500 times.

We received a great deal of positive feedback on the Power Tools and as a response, this release integrates the functionality previously delivered via Power Tools into the core SSDT product. The advantage of product inclusion is that a separate install will no longer be needed and that features are now fully supported and available to users in all languages. The following features are now included in SSDT’s SQL Server Object Explorer:

Projects node adds the equivalent of Schema View to SSDT. You can use this node to browse the logical schema of your project and to edit, refactor, and add new objects.

Script As support in SSOX enables you to generate Create, Alter, Drop, and Drop and Create-To scripts for objects in your connected database.

DAC actions allow you to perform similar DAC-based tasks in SSDT to those available in SSMS. You can extract a dacpac from a live database, publish a dacpac to a database, register a database as a DAC, or remove the registration metadata for a database registered as a DAC. These actions are supported for both on-premises SQL Server databases as well as Windows Azure SQL Databases.

clip_image003

We recommend that you uninstall the SSDT Power Tools extension if you had it previously installed.

Updated Data-Tier Application Framework

This release includes the November 2012 release of SQL Server Data-Tier Application Framework (DACFx), which contains several feature enhancements and bug fixes. You can learn more about the latest release of DACFx here.

Bug fixes

SSDT – December 2012 contains over 50 bug fixes, including fixes for customer-reported issues from SSDT – November 2012 and SSDT Power Tools releases.”