Wednesday, July 09, 2014

Visual Studio "14" CTP 2 (version 14.0.21901.1.DP) details

This Visual Studio "14" version 14.0.21901.1.DP CTP release includes the following products: 

  • Microsoft Visual Studio Professional "14" CTP (web | iso)
  • Remote Tools for Visual Studio "14" CTP (x86 | x64 | arm)
  • Microsoft Visual Studio "14" SDK CTP (exe)

The following technology improvements have been made in this release.

 

Thursday, July 03, 2014

Visual Studio 2013 Update 3 Release Candidate is available

Microsoft released Visual Studio 2013 Update 3 Release Candidate (RC) on July 2, 2014.

Download links

Visual Studio 2013 updates are cumulative releases. The following download links always point you to the latest update:

If you do not have Visual Studio 2013 (original release version) and run one of these downloads, both Visual Studio 2013 and Update 3 RC are installed.

KB Article

KB2933779

Wednesday, June 18, 2014

Image Processing in .NET

.Net provides the core for Faster Image Processing using System.Drawing assembly and System.Drawing namespace.

 

Basic About Image

Raster Images are consists of Rows and Columns of Pixels.

A Pixel consists of bytes of values for Pixel

A pixel with 4 bytes usually consists of Alpha, Red, Green and Blue values

A pixel with 3 bytes usually consists of Red, Green and Blue values

A pixel with less than 3 bytes needs further processing like expansion or look up to built 3/4 byte Pixel

 

Steps for Image Processing

Thursday, June 05, 2014

Write DataTable as CSV Text File Using C#

Find below the code that write data from DataTable as a CSV text file

 

Using Section

using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;

 

Methods for Writing data to CSV

public static DataTable WriteCSV(String filename, DataTable table) {
    var csvData = new DataTable();
    StreamWriter csvFile = null;
    try {
        csvFile = new StreamWriter(filename);

        // Write header
        csvFile.WriteLine(
                String.Join(",",
                    from DataColumn dc in table.Columns
                    select dc.ColumnName)
            );

        foreach (DataRow dr in table.Rows) {
            csvFile.WriteLine(
                    String.Join(",",
                        from DataColumn dc in table.Columns
                        select dr[dc])
                );
        }
    }
    finally {
        if (csvFile != null)
            csvFile.Close();
    }

    return csvData;
}
private static String CsvValue(Object obj) {
    if (obj == null)
        return "";
    else if (obj.GetType() == typeof(String) || obj.GetType() == typeof(DateTime))
        return "\"" + obj.ToString() + "\"";
    else
        return obj.ToString();
}

Parse CSV Text File to Data Table Using C#

Find below a code that parses the CSV text file and give you the records as a Data Table

 

Using Section

using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;

 

Methods for Parsing CSV

public static DataTable ReadCSV(String filename) {
    var csvData = new DataTable();
    StreamReader csvFile = null;
    try {
        csvFile = new StreamReader(filename);

        // Parse header
        var headerLine = csvFile.ReadLine();
        var columns = ParseCSVLine(headerLine);
        columns.ForEach(c => csvData.Columns.Add(c, typeof(String)));

        var line = "";
        while ((line = csvFile.ReadLine()) != null) {
            if (line == "") // Skip empty line
                continue;
            csvData.Rows.Add(
                ParseCSVLine(line) // Parse CSV Line
                    .OfType<Object>() // Convert it to Object List
                    .ToArray()   // Convert it to Object Array, so that it can be added to DataTable
            ); // Add Csv Record to Data Table
        }
    }
    finally {
        if (csvFile != null)
            csvFile.Close();
    }

    return csvData;
}

private static List<String> ParseCSVLine(String line) {
    var quoteStarted = false;
    var values = new List<String>();
    var marker = 0;
    var currPos = 0;
    var prevChar = '\0';

    foreach (Char currChar in line) {
        if (currChar == ',' && !quoteStarted) {
            AddValue(line, marker, currPos - marker, values);
            marker = currPos + 1;
            quoteStarted = false;
        }
        else if (currChar == '\"')
            quoteStarted = (prevChar == '\"' && !quoteStarted)
                ? true
                : !quoteStarted;
        currPos++;
        prevChar = currChar;
    }
    AddValue(line, marker, currPos - marker, values);
    return values;
}

private static void AddValue(String line, Int32 start, Int32 count, List<String> values) {
    var val = line.Substring(start, count);
    if (val == "")
        values.Add("");
    else if (val[0] == '\"' && val[val.Length - 1] == '\"')
        values.Add(val.Trim('\"'));
    else
        values.Add(val.Trim());
}

Wednesday, June 04, 2014

Visual Studio 14 CTP available for Download

Details: Visual Studio “14” CTP now available
Download links: Visual Studio "14" CTPs

Technology improvements (KB-2967191- Visual Studio "14" CTP release notes)

ASP.NET and web development

  • ASP.NET vNext: This release of Visual Studio supports creating and developing ASP.NET vNext applications. ASP.NET vNext is a lean and composable .NET stack for building modern web applications for both cloud and on-premises servers. It includes the following features:
  • ASP.NET MVC and Web API have been unified into a single programming model. 
  • A no-compile developer experience.
  • Dependency injection out-of-the-box.
  • Side-by-side: Deploy the runtime and framework by using your application.
  • NuGet everything, even the runtime itself.
  • All open source is on the .NET Foundation and takes contributions.
  • For more information about ASP.NET vNext in Visual Studio, go to the ASP.NET vNext website.
  • This release of Visual Studio also includes all the current ASP.NET and web development features that are released as parts of Visual Studio 2013 Update 2. Learn more here.

Managed languages

  • The core IDE and editing experiences for C# and Visual Basic have been replaced with new experiences that are built on the .NET Compiler Platform "Roslyn." Generally, the experience should be unchanged. However, there are numerous small improvements.
  • C# refactoring support has been completely revamped. There are two new core refactorings: Inline Temporary Variable and Introduce Explaining Variable. Additionally, refactoring support for Visual Basic has been added for the first time.
  • You can use specific code-aware guidance for the Microsoft platforms and NuGet packages that you're targeting to obtain live code analysis and automatic fixes as you type.

Visual C++

  • Generalized lambda capture: You can assign the result of evaluating an expression to a variable in the capture clause of a lambda. This allows an instance of a move-only type to be captured by value.
  • User-defined literals in the language and standard library: You can append numeric and string literals with meaningful suffixes to give them suitable semantics. The compiler transforms these suffixes into calls to appropriate UDL-operator functions. The <chrono>, <string>, and <complex> headers now provide literal operators for convenience. For example, "1729ms" means std::chrono::milliseconds(1729), "meow"s meansstd::string("meow"), and 3.14i means std::complex<double>(0.0, 3.14).
  • Completed noexcept: You can check whether an expression will throw an exception by using the noexceptoperator. For example, noexcept(func()) will return "true" if func was specified as noexcept.
  • Inline namespaces: You can specify a nested namespace as "inline" to make its contents accessed from its parent namespace.
  • Thread-safe "magic" statics: Static local variables are initialized in a thread-safe way, removing the need for manual synchronization. Be aware that usage of these variables other than initialization is still not protected. Thread safety can be disabled by using /Zc:threadSafeInit- to avoid a dependency on the CRT.
  • Unrestricted unions: You can define unions that contain types with non-trivial constructors. Constructors for such unions have to be manually defined.
  • Finally, all new C++ 11 and C++ 14 language features that are released in the November 2013 compiler CTP for Visual Studio 2013 are also included in this preview. For more information about these features, read thisannouncement. Briefly, these include the following:
  • __func__extended sizeof, implicit move generation, ref-qualifiers ("&" and "&&" for member functions),alignof and alignas, and inheriting constructors.
  • auto function return type deductiondecltype(auto), and generic lambdas with a limitation of not using [=]/[&] default capture together with generic lambdas. This will be enabled also for generic lambdas in a future release.
  • Resumable functions and awaitproposed for the C++ Concurrency Technical Specification.
  • Null forward iterators: The Standard Library's forward iterators (and stronger) now guarantee that value-initialized iterators compare as equal. This makes it possible to pass an empty range without a parent container. Be aware that generally, value-initialized iterators still cannot be compared to iterators from a parent container.
  • quoted(): These manipulators let iostreams preserve strings that contain spaces.
  • Heterogeneous associative lookup: When it is Enabled by special comparators (such as the less<> and greater<>transparent operator functors), the ordered associative containers gain templated lookup functions. This lets them work with objects that are comparable to keys, without actually constructing keys.
  • integer_sequence: Compile-time integer sequences are now supported to make template metaprogrammingeasier.
  • exchange(): This small utility function makes it convenient to assign a new value to an object and retrieve the old value.
  • get<T>(): This lets a tuple element be accessed by its type (when unique) instead of by its index.
  • Dual-range equal(), is_permutation(), mismatch(): C++98's "range-and-a-half" algorithms that are taking (first1, last1, first2) are difficult to use correctly. While they are still provided, C++14 has added overloads taking (first1, last1, first2, last2) which are significantly easier and safer to use.
  • tuple_element_t: This alias template is added for convenience and consistency with the type traits alias templates.
  • Filesystem "V3" Technical Specification (TS): The interface and implementation of <filesystem> are overhauled to follow this TS, which is likely to be incorporated into C++17.
  • Library Issues: 24 resolutions have been implemented (for example, is_finalmake_reverse_iterator()), not including the resolutions that were already implemented in Visual C++ 2013. Notice that a library issue is a bug report for the Standard. It can be resolved by fixing a specification problem or even adding a small feature.
  • <chrono> fixes: The clocks are rewritten to be conformant and precise.
  • Minimal allocator fixes: Several library components (including basic_string and std::function) did not work with user-defined allocators implementing C++11's minimal allocator interface, instead requiring C++03's verbose allocator interface. All occurrences of this problem are fixed.
  • C99 library features: Most of the remaining C99 library features are implemented.
  • snprintf is implemented.
  • The printf and scanf families of functions now support the new C99 format string improvements.
  • The strtod and scanf families of functions now support hexadecimal floating-point.
  • Library conformance is better improved by software updates and adjustments.
  • __restrict: The __restrict keyword is now supported on reference types in addition to pointer types.
  • Improved diagnostics: The compiler will now emit warnings about suspicious code that previously would not have resulted in warnings. For example, shadowed variables will now cause warnings. Warnings have also been made clearer.
  • The /Wv flag: You can use /Wv:XX.YY.ZZZZ to disable warnings that are introduced after compiler version XX.YY.ZZZZ. Notice that the emitted warnings may still differ from those emitted by the specified version.
  • Compiler software updates: We have fixed more than 400 bugs in the compiler. 179 of these were submitted by users through Microsoft Connect.
  • Refactored C Runtime (CRT): This CTP contains the first preview of the substantially refactored CRT.
  • msvcr140.dll no longer exists. It is replaced by a trio of DLLs: vcruntime140.dll, appcrt140.dll, and desktopcrt140.dll.
  • stdio performance: Many performance improvements are made in the stdio library, notably in the sprintf andsscanf families of functions.
  • Object file size reductions: Working together with compiler fixes, the STL's headers are changed to significantly reduce the sizes of object files and static libraries (that is after compilation but before linking. The sizes of linked EXEs/DLLs are unaffected). For example, when you compile a source file that includes all C and C++ Standard Library headers and does nothing else with them, for x86 with /MD /O2, Visual C++ 2013 generated a 731 KB object file. This is improved to be less than 1 KB.
  • Debug checking fixes: The STL's debug checks rejected null pointers that are passed as iterators, even when the Standard guaranteed that they should work (for example, merging two [null, null) ranges to a null output). Every algorithm is inspected and fixed.
  • Create declaration or definition: You can quickly create a function’s declaration or definition in relation to its neighbors. To do this, right-click the declaration or definition, or use SmartTags.
  • Debugger visualizers: Natvis debugger visualization files can be added to a Visual C++ project for easy management and source control integration. Natvis files that are added to a project will take evaluation precedence over visualizers outside the project.
  • Native memory diagnostics:
  • You can start a memory diagnostic session (Alt+F2) that monitors the live memory usage of your native application. This supports Windows Desktop.
  • You can capture heap snapshots of the running process in memory to see the types and instances for native allocations.
  • You can view the difference in memory allocations between two memory snapshots.
  • You can dive into the memory contents of a process snapshot by using the debugger for deeper analysis of the heap.


Wednesday, May 14, 2014

Microsoft Visual Studio 2013 Update 2 Available for download

Download links available
http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_5

New technology improvements and fixed issues in Visual Studio 2013 Update 2

Technology improvements

The following technology improvements have been made in this release.

ASP.NET and Web Tools 2013.2
    ASP.NET Project Templates
    • Updates to ASP.NET Project templates to support Account confirmation and Password Reset.
    • Support for On-Premises Organization Accounts in ASP.NET Web API

    Visual Studio Web Editor Enhancements
    • New JSON editor
    • New Sass editor (.scss)
    • Implement URL picker for HTML/CSS
    • Updates to LESS editor by adding more features
    • Update KO Intellisense in the HTML editor

    Browser Link
    • Browser Link now supports HTTPS connections and will list that in Dashboard with other connections as long as the certificate is trusted by browser.
    • Better source mapping

    Windows Azure Web Sites Support in Visual Studio
    • Support Azure sign in
    • Remote debugging for Windows Azure Web Sites (WAWS)
    • Remote view
    • Support Azure Web Sites creation

    Web Publish Enhancements
    • Improve User experience for publishing

    ASP.NET Scaffolding
    • If your model is using Enums, then the MVC Scaffolder will generate dropdown for Enum. This uses the Enum helpers in MVC.
    • Updated the EditorFor templates in MVC Scaffolding so they use the Bootstrap classes.
    • MVC and Web API Scaffolders will add 5.1 packages for MVC and Web API.
    • Added Scaffolding Extensibility layer to support third-party custom Scaffolders.

    ASP.NET Web Forms
    ASP.NET MVC 5.1
    ASP.NET Web API 2.1
    ASP.NET Web Pages 3.1
    ASP.NET Identity 2.0.0
    • Two-Factor Authentication

      ASP.NET Identity now support two-factor authentication. Two-factor authentication provides an extra layer of security to your user accounts in the case where your password gets compromised. There is also protection for brute force attacks against the two factor codes.
    • Account Lockout

      Provides a way to lock out the user if the user enters their password or two-factor codes incorrectly. The number of invalid attempts and the timespan for the users are locked out can be configured. A developer can optionally turn off Account Lockout for certain user accounts.
    • Account Confirmation

      The ASP.NET Identity system now supports Account Confirmation. This is a fairly common scenario in most websites today where when you register for a new account on the website, you are required to confirm your email before you could do anything in the website. Email Confirmation is useful because it prevents bogus accounts from being created. This is extremely useful if you are using email as a method of communicating with the users of your website such as Forum sites, banking, ecommerce, and social web sites.
    • Password Reset

      Password Reset is a feature where the user can reset their passwords if they have forgotten their password.
    • Security Stamp (Sign out everywhere)

      Supports a way to regenerate the Security Token for the user in cases when the User changes their password or any other security related information such as removing an associated login (such as Facebook, Google, Microsoft Account and so on). This is needed to ensure that any tokens generated with the old password are invalidated. In the sample project, if you change the user's password then a new token is generated for the user and any previous tokens are invalidated. This feature provides an extra layer of security to your application since when you change your password, you will be logged out from everywhere (all other browsers) where you have logged into this application.
    • Make the type of Primary Key be extensible for Users and Roles

      In ASP.NET Identity 1.0, the type of primary key for table Users and Roles was strings. This means when the ASP.NET Identity system was persisted in SQL Server by using Entity Framework, we were using nvarchar. There were many discussions around this default implementation on Stack Overflow and based on the incoming feedback. We have provided an extensibility hook where you can specify what should be the primary key of your Users and Roles table. This extensibility hook is particularly useful if you are migrating your application and the application was storing UserIds are GUIDs or ints.
    • Support IQueryable on Users and Roles

      Added support for IQueryable on UsersStore and RolesStore, you can easily get the list of Users and Roles.
    • Support Delete operation through the UserManager
    • Indexing on UserName

      In ASP.NET Identity Entity Framework implementation, we have added a unique index on the Username by using the new IndexAttribute in EF 6.1.0-Beta1. This makes sure that Usernames are always unique and there was no race condition in which you could end up with duplicate usernames.
    • Enhanced Password Validator

      The password validator that was shipped in ASP.NET Identity 1.0 was a fairly basic password validator that was only validating the minimum length. There is a new password validator that gives you more control over the complexity of the password. Please note that even if you turn on all the settings in this password, we do encourage you to enable two-factor authentication for the user accounts.
    • IdentityFactory Middleware/ CreatePerOwinContex
    • UserManager

      You can use Factory implementation to obtain an instance of UserManager from the OWIN context. This pattern is similar to what we use for getting AuthenticationManager from OWIN context for SignIn andSignOut. This is a recommended way of obtaining an instance of UserManager per request for the application.
    • DbContextFactory Middleware

      ASP.NET Identity uses Entity Framework for persisting the Identity system in SQL Server. To do this the Identity System has a reference to the ApplicationDbContext. The DbContextFactory Middleware returns an instance of the ApplicationDbContext per request that you can use in your application.
    • ASP.NET Identity Samples NuGet package

      Samples NuGet package can make it easier to install and run samples for ASP.NET Identity and follow the best practices. This is a sample ASP.NET MVC application. Please modify the code to suit your application before you deploy this in production. The sample should be installed in an empty ASP.NET application.

      For more information about the package, go to the following blog post:

  • Microsoft OWIN Components

    Many bugs are fixed in this release, see the release notes for the latest stable version (2.1.0).
  • ASP.NET SignalR

    Many bugs are fixed in this release, see the release notes.
Code Generation
  • This update lets a developer specify his program be compiled to target latest-generation processors that support the AVX2 instruction set.
Debugger
  • Added a Visualizer for JSON data contained in String objects.
  • You can compare two .diagsession files that contain managed memory data with each other.
  • You can manually trigger Content prefetch in Windows Store applications.
  • Enabled Script debugging including the DOM Explorer and JavaScript console when debugging inside a WebView control.
  • Added extensibility point for Visual Studio plugins to modify the debugger’s symbol settings.
  • The values of individual objects can be inspected when you debug managed memory from a dump with heap.
  • Windows Phone 8.1 developer can use Visual Studio to debug issues with websites that are running on the phone's Internet Explorer.
Entity Framework 6.1
  • Update Entity Framework to 6.1 version for both runtime and tooling. Entity Framework (EF) 6.1 is a minor update to Entity Framework 6 and includes a number of bug fixes and new features. For detailed information on EF 6.1, including links to documentation for the new features, see Entity Framework Version History. The new features in this release include:
    • Tooling consolidation provides a consistent way to create a new EF model. This feature extends the ADO.NET Entity Data Model wizard to support creating Code First models, including reverse engineering from an existing database. These features were previously available in Beta quality in the EF Power Tools..
    • Handling of transaction commit failures provides the newSystem.Data.Entity.Infrastructure.CommitFailureHandler that makes use of the newly introduced ability to intercept transaction operations. The CommitFailureHandler allows automatic recovery from connection failures whilst committing a transaction.
    • IndexAttribute allows indexes to be specified by placing an attribute on a property (or properties) in your Code First model. Code First will then create a corresponding index in the database.
    • The public mapping API provides access to the information EF has on how properties and types are mapped to columns and tables in the database. In past releases this API was internal.
    • Ability to configure interceptors by using the App.config or Web.config file allows interceptors to be added without recompiling the application.
    • DatabaseLogger is a new interceptor that makes it easy to log all database operations to a file. In combination with the previous feature, this allows you to easily switch on logging of database operations for a deployed application, without the need to recompile.
    • Migrations model change detection has been improved so that scaffolded migrations are more accurate; performance of the change detection process has also been greatly enhanced.
    • Performance improvements including reduced database operations during initialization, optimizations for null equality comparison in LINQ queries, faster view generation (model creation) in more scenarios, and more efficient materialization of tracked entities with multiple associations.
Graphics Diagnostics
  • DirectX Graphics diagnostics features are now available for Windows Phone 8.1 devices and emulators.
  • New and improved DirectX templates provide a starting point for writing games for the Windows Store and Windows Phone (Silverlight and non-Silverlight). The XAML-based template provides a starting point for easily incorporating text, images, and menus into games for use as Heads-Up-Displays, status messages, settings, and so on.
  • Graphics Frame Analysis is supported for helping to diagnose performance issues in DirectX-based games and applications.
  • Some functional improvements are made for Graphics Diagnostics:
    • Draw State Tracking in the Graphics Event List supports streamlined analysis for discovering how GPU state was set.
    • Up to 30 consecutive frames can be captured at one time.
    • Names of objects and resources defined by the developer are now exposed throughout the user interface (UI).
    • HTTP and custom protocol handlers can be used for performance event annotations.
    • Depth-Stencil Buffer viewing is now supported.
IntelliTrace
  • Performance events that are SQL related now provide an option to load the SQL in a new query window and use the existing SQL tools inside of Visual Studio to investigate an issue.
  • Performance events that are MVC related now provide an option to go to either the action or controller method in code to investigate an issue.
  • Performance events can now be grouped by entry point and by the slowest node. This will reduce the overall number of rows and make it easier to identify a specific event to investigate.
  • When you check the details of an IntelliTrace performance event, there is now an indicator to highlight the path to each of the slowest nodes.
  • When you debug an exception event from an IntelliTrace log file, Code Map is now shown with IntelliTrace specific annotations so that interesting parameters can be easily displayed. This also shows where the exception was thrown by using a new comment on the graph.
  • Assume that you use Git hosted on TFS as source control system, you can access the deployed version of the solution by opening the iTrace file that is generated by the Microsoft Monitoring Agent, in Visual Studio Ultimate 2013.
NuGet 2.8.1
  • NuGet 2.8.1 will be released in April 2014. Here are the most important points from the release notes. Check the full release notes for more information about these changes.
    • Target Windows Phone 8.1 Applications
      NuGet 2.8.1 now supports targeting Windows Phone 8.1 Applications by using the target framework monikersWindowsPhoneAppWPAWindowsPhoneApp81, and WPA81.
    • Patch Resolution for Dependencies
      When NuGet resolves package dependencies; NuGet has historically implemented a strategy of selecting the lowest major and minor package version that satisfies the dependencies on the package. However, unlike the major and minor version, the patch version was always resolved to the highest version. Although the behavior was well-intentioned, it created a lack of determinism for installing packages that have dependencies.
    • -DependencyVersion Option
      Although NuGet 2.8 changes the default behavior for resolving dependencies, it also adds more precise control over dependency resolution process through the -DependencyVersion option in the package manager console. The option enables resolving dependencies to the lowest possible version that is the default behavior, the highest possible version, or the highest minor or patch version. This option only works for install-package in the PowerShell cmdlet.
    • DependencyVersion Attribute
      In addition to the -DependencyVersion option detailed, NuGet has also allowed for the ability to set a new attribute in the nuget.config file that defines what the default value is, if the -DependencyVersion option is not specified in an invocation of install-package. This value will also be respected by the NuGet Package Manager Dialog for any install package operations. To set this value, add the following attribute to your nuget.config file:
      config> <add key="dependencyversion" value="Highest" /> </config>
    • Preview NuGet Operations With -whatif
      Some NuGet packages can have deep dependency graphs. Therefore, it is helpful during an install, uninstall, or update operation to first see what will occur. NuGet 2.8 adds the standard PowerShell -what if option to the install-packageuninstall-package, and update-package commands to enable visualizing the whole closure of packages to which the command will be applied.
    • Downgrade Package
      It is common to install a prerelease version of a package in order to investigate new features, and then decide to roll back to the last stable version. Before NuGet 2.8, this was a multi-step process of uninstalling the prerelease package and its dependencies, and then installing the earlier version. By using NuGet 2.8, theupdate-package command will now roll back the whole package closure (such as the package's dependency tree) to the earlier version.
    • Development Dependencies
      Many different kinds of capabilities can be delivered as NuGet packages, including tools that are used for optimizing the development process. Although these components can be instrumental in developing a new package, they should not be considered a dependency of the new package when it is later published. NuGet 2.8 enables a package to identify itself in the .nuspec file as a developmentDependency. When it is installed, this metadata will also be added to the packages.config file of the project into which the package was installed. When that packages.config file is later analyzed for NuGet dependencies by using nuget.exe pack, it will exclude those dependences marked as development dependencies.
    • Individual packages.config Files for Different Platforms
      When you develop applications for multiple target platforms, it is common to have different project files for each respective build environment. It is also common to consume different NuGet packages in different project files, as packages have varying levels of support for different platforms. NuGet 2.8 provides improved support for this scenario by creating different packages.config files for different platform-specific project files.
    • Fallback to Local Cache
      Although NuGet packages are typically consumed from a remote gallery (such as the NuGet gallery) by using a network connection, there are many scenarios in which the client is not connected. Without a network connection, the NuGet client cannot install packages, even when those packages were already on the client's computer in the local NuGet cache. NuGet 2.8 adds automatic cache fallback to the package manager console.

      The cache fallback feature requires no specific command arguments. Additionally, cache fallback currently works only in the package manager console. Currently, the behavior does not work in the package manager dialog box.
    • Bug Fixes
      One of the major bug fixes is performance improvement in the update-package -reinstall command.

      Additionally, this release of NuGet also includes many other bug fixes. There are 181 issues that are resolved in the release. For a full list of the work items fixed in NuGet 2.8, see the NuGet Issue Tracker for this release.
Profiler
  • There is a new CPU Usage tool for examining which managed, native, and JavaScript functions are using the CPU. The CPU Usage tool replaces the previous CPU Sampling tool for Windows Store Apps and has fast time filtering, fast thread filtering, and an improved Just My Code experience.
  • The Performance and Diagnostics hub now allows more than one tool to be run at the same time. Data from each tool is correlated on a common timeline for faster and easier performance analysis. Tools that can be combined are:
    • CPU Usage
    • Energy Consumption
    • HTML UI Responsiveness
    • XAML UI Responsiveness
  • Windows Phone 8.1 developers can use Visual Studio to diagnose performance issues together with websites that are running on the phone's Internet Explorer.
  • The Performance and Diagnostics hub is now available for Windows Store apps on Windows Phone 8.1 devices and emulators.
Release Management
  • The tags are designed to perform the same operation across the servers. If there are server specific actions, the user can always add the specific server and the corresponding actions at that level in the deployment sequence.
  • To configure a group of server by using same tag implies that you can set values for the whole group and all the servers in the group therefore share common values for all variables.
  • You can easily deploy to identical or clustered servers without having to repeat the deployment sequence on each server.
  • You can Copy Tags across stages and across Templates. You can retain the same deployment sequence with all the tags and servers when copied to other stages or Release templates under the same environment.
Team Foundation Server
  • The portfolio backlogs have performance improvements during web access navigation.
  • You can query on tags in Visual Studio and through web access.
  • You can apply tags to work items in Visual Studio.
  • You can apply permissions for who can add new tags.
  • REST API is available for work item tracking tagging.
  • You can edit tags in the Excel add-in for Team Foundation Server.
  • You can configure non-working days, and these are excluded from burndown charts.
  • Cumulative Flow Diagram start dates are configurable.
  • Lightweight charts can be pinned to project or team homepages.
  • You can customize the colors in lightweight charts.
  • The look and feel of the project and team homepage is updated.
  • Git tools have been updated to include an annotate (blame) view, reverting a commit, amending a commit, pushing to multiple remotes, and improved progress and cancellation ability for long running operations.
Testing Tools
  • This update provides to testers and test leads the ability to export test artifacts so that these can be sent by using email or as printouts and shared with stakeholders who do not have access to TFS.
  • This update provides to testers and test leads the ability to manage test parameter data at one place by using Shared Parameters. Any subsequent changes to parameter data can be updated at one place and all the test cases referencing the Shared Parameter are automatically updated.
  • You can view default set of performance counters from your application under test during Cloud Load testing by using Application Insights service.
TypeScript 1.0 RTM for Visual Studio 2013
  • TypeScript is an open-source language that makes it easier to create cross-platform, large-scale JavaScript applications that run on any browser or host. TypeScript offers developers the advantages of strongly-typed languages on top of the flexible, dynamic runtime, and the ubiquity of JavaScript. TypeScript, a typed superset of JavaScript that compiles to plain JavaScript, works seamlessly with existing JavaScript tools and libraries, and easily integrates with existing applications and sites. TypeScript's native types and class-based modular programming model enable scalability and better productivity through early error detection and enhanced tooling, such as Intellisense, code refactoring, and code navigation. For more information about TypeScript, go to the TypeScript website.
Visual C++
  • Some C++ compiler crashes and language conformance issues have been addressed.
Visual Studio IDE
  • You can view incoming changes from other branches in code editors by using CodeLens.
Windows Azure Tools
  • You can use Windows Azure Notification Hubs to send test notification messages to Windows Store, Windows Phone, iOS, and Android devices and check the outcome in real-time.
  • When you log in to Visual Studio, you are presented the option to easily activate your Windows Azure MSDN Benefits (if you have not already done this).
  • You can create new .NET Windows Azure Mobile Services projects, add scaffolds to projects, set breakpoints and debug the projects, publish them to Windows Azure, and finally remotely debug the published service.
  • You can use Windows Azure resources to develop, test, and deploy your application.
Windows Phone
  • Visual Studio 2013 Update 2 provides a full-featured development environment that you can use to develop applications and games for Windows Phone 8.1 and Windows Phone 8 by using Visual Studio Express 2013 for Windows or Visual Studio 2013 Professional, Premium, or Ultimate editions. With these tools, you can use your existing programming skills and code to build managed code, native code, or HTML and JavaScript applications. Additionally, the update includes multiple emulators and additional tools for profiling and testing your Windows Phone application under real-world conditions. For more information, go to the Windows Phone Developer Center.
  • You can create universal projects that share code between Windows Store applications and Windows Phone applications. For more information, see Develop an application that targets Windows and Windows Phone.
  • You can use Visual Studio 2013 to author and execute Coded UI tests against your Windows Phone Store applications.
  • You can author and execute unit tests against your Windows Phone Store applications and Windows Phone Silverlight applications by using Visual Studio 2013 Update 2.

Fixed issues

Note Unless otherwise indicated, linked items will take you to Microsoft Connect webpages.

Code Analysis
  • Visual Studio 2013 Code Analysis check-in policy does not trigger on websites.
IntelliTrace
  • A Security.VerificationException is raised on a custom event handler if IntelliTrace is enabled.
  • Visual Studio crashes when loading a corrupted IntelliTrace file.
Visual C++
  • Assume that you have Windows Driver Kit (WDK) and Visual Studio 2013 Update 2 installed on your computer. You open Visual Studio 2013 and create a Visual C++ universal project. When you press F5 to compile and debug the project, you may receive the following error message:
    No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))
Visual Studio IDE
  • JavaScript errors occur when you open webpages by using the internal Visual Studio Web Browser.
  • Tabs do not open correctly when solutions have both Design and Code views opened.
  • The Account Settings dialog box may display a "license will expire in 2147483647 days" message when Visual Studio downloads an online license.
Web Platform and Tools
  • When you use new URL picker in web applications, it is not correctly populated when URLs begin with ".".
  • When you press F5 or Ctrl+F5 for a web project that has enabled with SSL (https) URL, you will receive a prompt from Internet Explorer if you would like to continue with an untrusted or self-signed certificate.
  • When you install the PHP editor of DevSense, you may lose your PHP outlining regions.
  • You may experience a Visual Studio crash after using CTRL+F4 to close the web references property page dialog box.
  • Assume that you open a project that contains a generated HTML script document. When you debug the project on a phone emulator, an error occurs.
  • Visual Studio crashes when you try to publish a project or open a project that has a FTP publishing profile by using a relative URL such as localhost, "\\", or "//."
  • Enable Web Essentials for Web Express.
Windows Azure
  • You cannot create a new Windows Azure Mobile Services project by using Visual Studio 2013 on an x86-based computer.

Known Issues

Entity Framework


Symptoms

When you open an existing Entity Framework 5 Designer model (.EDMX file) by using Entity Framework 6.0.2 or 6.1.0 Tools in Visual Studio 2012 or Visual Studio 2013, you may receive the following error message:
Cannot load 'filename.edmx': Specified cast is not valid.

This issue only occurs if the model in question contains function import that has parameters of decimal type.

Versions affected

This issue affects the following released versions of Entity Framework Tools for Visual Studio:
  • Entity Framework 6.0.2 Tools for Visual Studio 2012
  • Entity Framework 6.0.2 Tools for Visual Studio 2013
  • Entity Framework 6.1.0 Tools for Visual Studio 2012
  • Entity Framework 6.1.0 Tools for Visual Studio 2013
If you have updated the Entity Framework Tools for Visual Studio 2012 or Visual Studio 2013 from the Microsoft Download Center, or if you have installed either Visual Studio 2013 Update 1 or Update 2, the version of the designer you are using has this issue.

If your Entity Framework model does not contain a function import for stored procedures that return objects that containdecimal type properties, this issue does not occur.

Cause

This issue occurs because the designer casts a value to byte incorrectly if the parameter has no precision and scale facets.

Workaround

To work around this issue, use one of the following methods:
  • Revert your setup to the 6.0.0 version of the Entity Framework Tools

    To do this, you have to manually uninstall any version of the tool that is more recent by using the Add or remove programs window, and then reinstall the 6.0.0 version. For Visual Studio 2012, you can find it in the Microsoft Download Center:


    For Visual Studio 2013, the EFTools.MSI and EFTools.cab files were originally included in the Visual Studio setup package. Therefore, you can revert to the 6.0.0 version of the tools by uninstalling them and then repairing Visual Studio, or by finding the MSI installer in the Visual Studio setup media.
  • Modify the EDMX files in an editor

    An alternative workaround requires manual modification of the EDMX files by using either a text or XML editor.
    Note Make sure that you create backup copies of your original EDMX files, and do not make any additional changes to them that could cause them to become invalid.

    The modification has to be applied to <parameter> elements of any <function> (such as stored procedures or Table-Valued Functions) inside the <edmx:StorageModels> section that is also known as the SSDL section of the EDMX. The changes are to make sure that all parameters map to decimal type parameters in the corresponding function import in the CSDL section. For example, consider the following function:
    <Function Name="Product_Insert" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" 
    ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
                   <Parameter Name="Id" Type="int" Mode="In" />
                   <Parameter Name="Name" Type="int" Mode="In" />
                   <Parameter Name="Price" Type="numeric" Mode="In" />
    </Function>
    The Price parameter has to be changed as follows:
    <Parameter Name="Price" Type="numeric" Mode="In" Precision="8" Scale="4" />
    Note The actual numeric values that are assigned to Precision or Scale are not important in this case.
Visual Studio IDE
  • For the known issue in Visual Studio IDE after you apply this update, go to the following knowledge base article:
    2954109 Solution Platform drop-down list is not visible after you install Visual Studio 2013 Update 2
Windows Phone
  • Visual Studio Team Build does not build Windows Phone 8, Windows Phone Silverlight 8.1, and Silverlight applications.

    To work around this issue, set your project to build with the MSBuild x86 tool set. To do that in TFS, change the MSBuild Platform option from Auto to x86 in the Team Build configuration wizard's Process section. For more information, see this blog post.
  • Consider the following scenario:
    • You have installed Visual Studio 2013 Update 2 on a computer that is running Windows 7 or Windows 8.
    • You upgrade Windows to Windows 8.1.
    • You create a Windows Phone 8.1 project and build it.
    In this scenario, you receive build or packaging errors.

    To work around this issue, repair Visual Studio 2013.
  • Deleting a file from a shared project is not detected by Team Foundation Version Control correctly. The file will be removed from the shared project, but the file will not be deleted from Team Foundation Version Control.

    To work around the issue, manually delete the file from the server by using Source Control Explorer.
  • Team Foundation Version Control cannot undo pending changes to a solution if files were moved from a shared project to another project in the solution. After the undo, the file entries will be moved back into the shared project. However, the files will be missing from disk.

    To work around the issue, restore the files on disk by obtaining the latest files from Team Foundation Version Control.
  • In Visual Studio 2013 Update 2, unit testing of C++ Silverlight 8.1 apps is not supported. When you retarget existing C++ Silverlight 8.0 unit test project to Silverlight 8.1, the build operation fails, and you receive the following error message:
    error: AppManifest Validation failed. Invalid AppPlatformVersion in WMAppmanifest.xml
  • When you develop a C++ application for Windows Phone 8.1, you may not see the Device option in the debug target drop-down list.
    To deploy to a device, you must first change the build configuration to "ARM" by using the solution platform drop-down list in the Visual Studio toolbar.
  • If you rename a JavaScript shared project in Microsoft Visual Studio 2013 Update 2, the References node of the projects that import the shared project may not be updated to the project name.
  • If you do not install Windows Phone 8.0 software development kit (SDK) on your computer, Blend for Visual Studio 2013 does not display the operations for Windows Phone Silverlight 8.1 projects.
  • Assume that you are using a Visual Studio Chinese language pack. When you build a Windows Store or Windows Phone application by using HTML and JavaScript, English text is displayed in the IntelliSense suggestions that are provided for WinJS APIs.
  • Assume that you have Visual Studio 2013 Update 2 and Windows Phone 8.0 tools installed on Windows 8. The Windows Phone 8.1 emulators are available. In this situation, you cannot run a Windows Phone 8.0 application by pressing F5. Additionally, you receive the following error message:
    Windows Phone Emulator is unable to verify that the virtual machine is running:

    Unable to load DLL 'LocBootPresets': The specified module could not be found. (Exception from HRESULT: 0x8007007E)