Using Visual Studio AutoRecover to Avoid Losing Your Work (and your Mind)

Mondays

If you have ever worked in an environment that may not have been the most reliable or you are simply a worry-wart when it comes to possible data loss, then this might be for you.

When discussing a recurring issue with another developer, he complained that his older computer frequently crashed which resulted in him losing data quite often. He didn’t seem to be aware of a feature within Visual Studio called AutoRecover that would help him ensure that his data wasn’t always “gone forever”. While it typically works on it’s own, this post will discuss AutoRecover, configuring it and locating all of the temporary files it creates if you need to find them.

What is AutoRecover?

AutoRecover is an option within Visual Studio that will allow you to define a particular interval in which to save information about all of the files that may be changing or have changed within your application. It’s perfect for scenarios where you might have a machine that is on the verge of death, intermittent power issues, data-loss anxiety and just about anything else that might have you spouting off expletives when your screen goes black (or blue).

How do I use it?

You can access the AutoRecover option in Visual Studio through the following steps :

  1. Select Tools from the Toolbar in Visual Studio.
  2. Choose Options
  3. Select AutoRecover beneath the Environment tab on the right.

You’ll then be presented with the AutoRecover dialog box :

Autorecover

You’ll just need to adjust these values depending on your needs and how erratic your machine can be.

Accessing AutoRecover Files

Accessing the files themselves is quite easy as well. By default, Visual Studio will store all of these files within a “Backup Files” directory which is typically located at the following location :

~/Documents/{Your Version of Visual Studio}/Backup Files/{Your Project Name}

Within this folder, you will see a collection of files that are both original and those that have been previously recovered as seen below :

files

Visual Studio will typically prompt you to open these files if your system experienced an unexpected shut down when opening an affected solution or project, but this should provide an easy way to access these files if things do go horribly wrong.

Using the NEW NuGet Package Explorer to Create, Explore and Publish Packages!

nuget

In the past few years, NuGet has become one of the easily and most commonly used tools within a .NET Developers bag of tricks and rightfully so. Long gone are the days of searching for a DLL file in some shady site and hoping that it doesn’t brick your application. Now you can find just about every possible reference you would want to include within your application in just a few clicks (and letting it sort out all of the dependencies).

Most developers have likely interacted through NuGet within Visual Studio, however this post is going to introduce another way to interact, explore and even publish your own NuGet packages called the NuGet Package Explorer.

What is the NuGet Package Explorer?

The NuGet Package Explorer is a open-source product of NuGet developer Luan Nguyen and was developed as an extremely user-friendly GUI application for easily creating and exploring NuGet packages. After installing the ClickOnce application, you can simply double-click on a NuGet Package file (.nupkg) to access all of its content or you can load packages directly from the official NuGet feed.

“This is a side project of mine and it is NOT an official product from Microsoft.” –  NuGet developer Luan Nguyen

How to use it?

First, you’ll need to visit the NuGet Package Explorer page on CodePlex, where the tool is currently available and download it. After a short download, you can launch the ClickOnce application and be presented with the following screen :

JustLaunched

These are your primary options when it comes to creating or exploring the contents of any available NuGet packages (in addition to simply clicking on any NuGet Package files as mentioned earlier). The easiest approach to get started would probably be to open up a package from the feed, which will present you with a searchable dialog with all of the most popular NuGet packages :

PopularPackages

After clicking on a package, you can choose the particular version you wanted to explore :

allversions

You also have the option of manually opening up any packages that you might have locally installed, but simply grabbing them from the feed is usually going to be the way to go.

Exploring a Package

Once you select a package that you want to explore a bit more, you can just double-click on it to present the details about that package :

An example of exploring the EntityFramework NuGet Package.

While exploring a package, you’ll see many of the summaries, details and descriptions that you might be accustomed to seeing when managing your NuGet packages through Visual Studio along with a bit more.

You’ll see an area called Package Contents, which display all of the files that are contained within the package and it can help give you an idea of the different versions of the framework that it targets, any transformations that will be applied to configuration files and any additional utilities or executables that might be run when the package is installed :

PackageContents

This is where you can really actually explore the packages by digging into the contents a bit more. By simply double-clicking on a file within the contents, you will be shown a preview (if available) of the contents :

ContentsDetails

This can be done for just about any kind of file that would normally support previews and it can be extremely useful if you wanted to see exactly what is going down inside some of these packages.

Creating a NuGet Package

The Package Explorer isn’t limited to just exploring existing packages. It provides a very easy-to-use interface to allow you to create your own packages and upload them to NuGet to share with others.

With a simple click of the File > New option menu or by using the CTRL+N shortcut :

started

You’ll be transported to a new package screen to begin building your own NuGet Package. You can click the Edit Metadata icon ( EditMetadata) to began actually editing information about your package :

MetaData

You can find a complete reference of all of the available fields listed above and exactly what they are used for by visiting the Nuspec Reference page here.

After defining all of your metadata, supported assemblies and dependencies, you will then be ready to add your files and content to your packages. You can do this by just clicking a file within the File Explorer and dragging it into the Package Contents area on the left :

SampleFile

All of the DLL files that are entered will be placed into the lib directory and all other basic content will be placed into an aptly named content directory as seen below :

PackageContent

Additionally, if you need to add other folders (or any other “special” types of folders), you can do so by using the Content menu :

OtherContent

You can continue to add all of the additional files and folders for your package in this same manner until your package is complete.

Publishing to NuGet

Publishing to NuGet is fairly simple after you have build your package.

The first thing that you’ll need to do is Register and Sign In to the NuGet Gallery, which takes a matter of seconds. This will provide you with an API key that you will need to use in order to publish packages to NuGet :

Api

After you have your API Key, you’ll just need to use the Publish option (File > Publish) within the NuGet Package Explorer :

Publish

Just enter in your API Key in the Publish dialog and hit Publish and you are done!

A Chrome Shortcut That Makes Searching Your Favorite Sites Way Faster!

It works on Vimeo, and scores of other sites with their own search engines.

Google is the default search engine in Chrome’s “Omnibox,” the text field at the top of your browser where the URL appears and where you type search terms. But you can add a limitless number of other, site-specific search engines to it as well. This comes in handy if you’re looking for particular piece of content, like a news story or video, or you want to find something on a particular site, like Craigslist or eBay, as quickly as possible.

First, go to a website you frequent. Find its search bar, and right-click inside the text field. In most cases, you should see an option to “Add As Search Engine”. A pop-up will appear with the option to give it a name, and most importantly, a keyword. I recommend something as minimal as possible for maximum typing efficiency: A for Amazon, K for Kickstarter, N for Netflix.

Now, in Chrome’s search bar, type in that “keyword” and hit TAB. A block with the site’s name will appear, letting you know Chrome has changed from searching Google to searching, say, Wikipedia. Once you hit ENTER, you’ll be rerouted straight to a list of results from the site’s search engine.

Here are 20 sites where this works, and recommended shortcut keys:

(A) Amazon
(B) Bing
(BBC) BBC
(C) Craigslist
(D) DuckDuckGo
(E) eBay
(ESPN) ESPN
(Git) GitHub
(H) Hulu
(HP) Huffington Post
(K) Kickstarter
(LINK) LinkedIn
(M) GMail
(N) Netflix
(P) Pinterest
(PB) Pirate Bay
(RED) Reddit
(T) Twitter
(V) Vimeo
(W) Wikipedia
(WRD) WIRED
(Y) Yelp
(YT) YouTube

Source 🙂

London has benches that look like opened books! and.. Kansas City, M.O. has a Library that looks like books!

Jane Headford designed this Dr. Seuss bench, which is spending the summer alongside the River Thames
Jane Headford designed this Dr. Seuss bench, which is spending the summer alongside the River Thames

Chicago had cows, St. Louis has cakes and now London has benches that look like opened books.

The National Literacy Trust, along with public art promoter Wild in Art, has commissioned and placed 50 benches around town that are painted to look like pages and scenes from famous books.

Among the artists participating are Ralph Steadman, who recreated illustrations from his 1973 edition of Through the Looking-Glass; Rae Smith, the set designer for the stage version of War Horse; and How to Train Your Dragon creator Cressida Cowell.

In addition to the benches, which will be auctioned off in October, the project will include several literary-themed events, “such as an attempt to break the world record for the most number of people dressed as Sherlock Holmes, next to the Arthur Conan Doyle-inspired bench outside the University of London,” according to Time Out.

Here are some of other favorites:

This Sherlock Holmes bench is expected to attract the detective's lookalikes
This Sherlock Holmes bench is expected to attract the detective’s lookalikes
Fiona and Neil Osborne designed this salute to the 1905 class, The Railway Children
Fiona and Neil Osborne designed this salute to the 1905 class, The Railway Children
How To Train Your Dragon author Cressida Cowell invites people to sit and "imagine dragons wheeling above you in the skies."
How To Train Your Dragon author Cressida Cowell invites people to sit and “imagine dragons wheeling above you in the skies.”

 

Also, Kansas City, M.O. has a Library that looks like books!!

Library in Kansas City, Missouri, USA
Library in Kansas City, Missouri, USA

Don’t Use jquery-latest.js

Following is transcript from blog in jQuery.com:

Earlier this week the jQuery CDN had an issue that made the jquery-latest.js and jquery-latest.min.js files unavailable for a few hours in some geographical areas. (This wasn’t a problem with the CDN itself, but with the repository that provides files for the CDN.) While we always hope to have 100% uptime, this particular outage emphasized the number of production sites following the antipattern of using this file. So let’s be clear: Don’t use jquery-latest.js on a production site.

We know that jquery-latest.js is abused because of the CDN statistics showing it’s the most popular file. That wouldn’t be the case if it was only being used by developers to make a local copy. The jquery-latest.js and jquery-latest.min.js files were meant to provide a simple way to download the latest released version of jQuery core. Instead, some developers include this version directly in their production sites, exposing users to the risk of a broken site each time a new version of jQuery is released. The team tries to minimize those risks, of course, but the jQuery ecosystem is so large that we can’t possibly check it all before making a new release.

To mitigate the risk of “breaking the web”, the jQuery team decided back in 2013 that jquery-latest.js could not be upgraded to the 2.0 branch even though that is technically the latest version. There would just be too many sites that would mysteriously stop working with older versions of Internet Explorer, and many of those sites may not be maintained today.

As jQuery adoption has continued to grow, even that safeguard seems insufficient to protect against careless use of http://code.jquery.com/jquery-latest.js. So we have decided to stop updating this file, as well as the minified copy, keeping both files at version 1.11.1 forever. The latest released version is always available through either the jQuery core download page or the CDN home page. Developers can download the latest version from one of those pages or reference it in a script tag directly from the jQuery CDN by version number.

The Google CDN team has joined us in this effort to prevent inadvertent web breakage and no longer updates the file at http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js. That file will stay locked at version 1.11.1 as well. However, note that this file currently has a very short cache time, which means you’re losing the performance benefit of of a long cache time that the CDN provides when you request a full version like 1.11.1 instead.

So please spread the word! If you see a site directly using the jQuery CDN’s jquery-latest.js or the Google CDN equivalent in their script tags, let them know they should change to a specific version. If you need the latest version, get it from the download page or our CDN page. For both the jQuery and Google CDNs, always provide a full version number when referencing files in a <script>tag. Thanks!