New technology improvements and fixed issues in Visual Studio 2013 Update 2
Technology improvementsThe 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
- 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 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
- Support Azure sign in
- Remote debugging for Windows Azure Web Sites (WAWS)
- Remote view
- Support Azure Web Sites creation
- Improve User experience for publishing
- 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.
- The Web Forms templates now show how to do Account Confirmation and Password Reset for ASP.NET Identity.
- Entity Framework Data Source and Dynamic Data Provider for Entity Framework 6. For more details please see the following MSDN blog:
- Attribute routing improvements
- Bootstrap support for editor templates
- Enum support in views
- Unobtrusive validation for MinLength/MaxLength Attributes
- Supporting the 'this' context in Unobtrusive Ajax
- Various bug fixes
- Global error handling
- Attribute routing improvements
- Help Page improvements
- IgnoreRoute support
- BSON media-type formatter
- Better support for async filters
- Query parsing for the client formatting library
- Various bug fixes
- Various bug fixes
- 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
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.
Visual Studio Web Editor Enhancements
Windows Azure Web Sites Support in Visual Studio
Web Publish Enhancements
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
- This update lets a developer specify his program be compiled to target latest-generation processors that support the AVX2 instruction set.
- 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.
- 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.
- 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.
- 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.
- 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 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 monikersWindowsPhoneApp, WPA, WindowsPhoneApp81, 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-package, uninstall-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.
- Target Windows Phone 8.1 Applications
- 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.
- 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.
- 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.
- 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.
- Some C++ compiler crashes and language conformance issues have been addressed.
- You can view incoming changes from other branches in code editors by using CodeLens.
- 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.
- 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 issuesNote Unless otherwise indicated, linked items will take you to Microsoft Connect webpages.
- Visual Studio 2013 Code Analysis check-in policy does not trigger on websites.
- A Security.VerificationException is raised on a custom event handler if IntelliTrace is enabled.
- Visual Studio crashes when loading a corrupted IntelliTrace file.
- 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))
- 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.
- 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.
- You cannot create a new Windows Azure Mobile Services project by using Visual Studio 2013 on an x86-based computer.
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:
This issue only occurs if the model in question contains function import that has parameters of decimal type.
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 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.
This issue occurs because the designer casts a value to byte incorrectly if the parameter has no precision and scale facets.
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>
<Parameter Name="Price" Type="numeric" Mode="In" Precision="8" Scale="4" />
- 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
- 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.
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 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 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)