Quantcast
Channel: Category Name
Viewing all 10804 articles
Browse latest View live

Announcing the release of .NET Framework 4.5 RTM - Product and Source Code

$
0
0

Today, we are happy to announce the availability of Microsoft .NET Framework 4.5 and Visual Studio 2012. You can develop apps that will take advantage of all the great features that we have added, including new features in Windows 8. We are also announcing the availability of the .NET Framework 4.5 reference source code.

You can read more about the Visual Studio 2012 release on Jason Zander’s blog and Soma’s blog. Please visit the Visual Studio 2012 downloads page to install both products.

Improvements in the .NET Framework 4.5

We have made many improvements in the .NET Framework 4.5. Many of these advances help you write better apps with less effort, while others help you target particular Microsoft platforms. In either case, you’ll find the new features useful and relevant for the apps that you write today.

  • Core runtime and class library improvements
    The most important core advance is the new async programming model, which has broad support across the common language runtime (CLR), the .NET Framework base class libraries, and the C#, Visual Basic, and F# languages. In particular, we added hundreds of new Task-returning methods across the .NET Framework libraries.

    We made performance improvements in many parts of the core. Given the focus on async, we made the Task Parallel Library (TPL) and other concurrency APIs faster. We also made across-the-board improvements in the CLR, including multicore JIT, MPGO, and big wins in CLR garbage collection. If you are building responsive or scalable systems, or would like to take advantage of multicore and manycore processors, you'll find this a very exciting release.

    Visual Studio 2012 has built-in support for creating portable class libraries, which make it easier to re-use your code across apps built for different platforms.

  • Windows Store app programming experience for C# and Visual Basic
    The .NET Framework 4.5 enables you to create Windows Store apps using C# and Visual Basic. These include both XAML and Windows Web Apps. This support is based on the work that we did to allow Windows Runtime APIs to be called from managed code. It also includes the new .NET for Windows Store apps API surface area.

    You can call Windows Runtime APIs with C# and Visual Basic, and you can also create Windows Runtime APIs with those same languages. This ability is very useful if you want to call managed code within a Windows Web App or a C++ XAML or DirectX app. As part of this scenario, you can call Windows Communication Foundation (WCF) services from within your Windows Runtime API implementation.

    We made performance improvements specifically for Windows Store apps. We reduced startup time substantially, updated the garbage collector to aggressively reclaim memory upon app suspension, and created a service to automatically generate native images for your app DLLs. We also improved file I/O performance when using the .NET Framework stream extension methods, which automatically buffer underlying Windows Runtime streams.

  • ASP.NET
    ASP.NET followed the trend of excellent support for async, including async in ASP.NET Web Forms, ASP.NET MVC, and ASP.NET Web API.

    ASP.NET 4.5 and Windows 8 added support for the Web Sockets API. The upcoming ASP.NET SignalR provides developers with an ideal high-level abstraction that enables real-time communication not just over Web Sockets, but also transport fallback for older browsers.

    ASP.NET Web Forms 4.5 gets a huge upgrade with support not only for strongly typed data controls in all data-bound controls, but also Model Binding, which will greatly simply your Web Forms code-behind files. Web Forms developers can even use ASP.NET Data Controls with the repository pattern. ASP.NET Web Forms also has complete support for HTML5 and CSS3, and takes advantage of the new editor improvements in Visual Studio 2012.

  • Windows Communication Foundation (WCF)
    We made many improvements in WCF, including: better performance, reliability and scale with WebSockets, and support for client-side validation of the server SSL certificate using WCF’s custom X509 certificate validator on a per-request basis.

  • Entity Framework
    Entity Framework now supports enum properties and spatial data types in models created with Code First and the EF Designer. Models created with the EF Designer can now map to Table-Valued Functions (TVFs) in an existing database. We also made significant performance improvements to Entity Framework.

  • Windows Workflow (WF)
    Windows Workflow now includes key authoring improvements, new versioning features, and runtime enhancements. You can now host workflow definitions and instances, with side-by-side versioning, in WorkflowServiceHost. The new Dynamic Update feature allows running workflow instances to be modified.  Expression extensibility gives you more flexibility in providing custom expression authoring experiences.

Releasing the source code for the .NET Framework 4.5 libraries

In addition to releasing the .NET Framework 4.5, we are pleased to announce that we are also releasing the source code for the .NET Framework libraries. While you may enjoy reading the many interesting algorithms in our product, we release the .NET Framework source primarily to improve your debugging experience. Having access to all the managed source for the code running in your process provides you with a lot more information about what your app is actually doing.

If you are new to developing with the .NET Framework, you may not know that we have released the source and rich symbols in past versions. We know that many developers rely on our source code to efficiently get to the root cause of functional and performance problems in their apps. As a result, we provide the source code concurrently with the release of .NET Framework 4.5.

This release includes the following:

  • Downloadable source code
  • Source available on-demand, deployed to the Microsoft Reference Source Server
  • Rich symbols (PDB files) for .NET Framework 4.5 source, deployed to the Microsoft Reference Source Server

We’ll now look at how you can use the source code and symbols.

Debugging with .NET Framework library reference source

You may be wondering what debugging with .NET Framework reference source looks like. In the example below, you will see a tool of mine calling the public Console.WriteLine method. From there, the WriteLine method calls several private managed APIs, and eventually ends with one or more platform invoke calls. You can see each of these calls in the Call Stack window. You can look at each call frame, both in terms of the source for that frame, and any locals that are available. That’s pretty useful!

Example of debugging into the .NET Framework reference source code

This experience works for 32-bit and 64-bit apps on x86 and x64 machines, as appropriate. It also works when running on either an x86 or x64 machine, while remote debugging an app that is running on an ARM tablet. I can imagine that you might be looking forward to giving that last scenario a try.

This experience also works for all .NET Framework app types, including ASP.NET, WPF, Windows Forms, console, and Windows Store apps. We call this experience of seeing .NET Framework library source in Visual Studio, “.NET Framework source stepping.” As you might guess, you can step in and out of .NET Framework code, using all of the stepping commands that you are used to, such as F11, F10, and Shift+F11. It's pretty easy to set this up. I'll explain how.

Enabling .NET Framework source stepping in Visual Studio 2012

We’ll first start with the instructions for enabling source and symbols download on demand. This mode works the best if you have consistent Internet access. You need to make a few configuration changes in Visual Studio 2012.

First, open the Options dialog box by choosing Options and Settings… from the Visual Studio Debug menu, expand the Debugging node, and then choose the General option. Set the following:

  • Clear the Enable Just My Code checkbox.
  • Check Enable .NET Framework source stepping.
  • Clear Step over properties and operators (Managed only)
  • Check Enable source server support.
  • Clear Require source files to exactly match the original version.

Settings to enable debugging into the .NET Framework reference source

Next, set the following on the Symbols page which is also under the Debugging node:

Settings to get online debugging symbols for the .NET Framework

You can now choose OK, and start using .NET Framework source stepping as part of your development process.

Enabling offline source in Visual Studio 2012

There are times when you don’t have a connection to the Internet, for example, when you're traveling. Also, some people prefer to pay the download cost just once, and then not think about it again. We’ve got both of those cases covered.

You can download the source and symbols for the .NET Framework 4.5 as an MSI installer. Once you've installed them to a particular location on your local disk or network, you need to provide a symbol file location that's different from what we've specified in the previous section. I’ve provided an example below.

Settings to get offline debugging symbols for the .NET Framework

Once you have the offline reference source package installed and configured (as shown above) in Visual Studio 2012, you are ready to start stepping into .NET Framework library source.

Implications for multi-targeting

You can use the .NET Framework multi-targeting features and the reference source together; however, it is important to know how these relate to each other. The reference source is tied to the runtime version that you run your project on, not the version of the .NET Framework that you are targeting. For example, even if your project targets the .NET Framework 4, you will be using the .NET Framework 4.5 reference source when debugging in Visual Studio 2012.

Closing

We hope that you are as excited as we are about the release of the .NET Framework 4.5 and the reference source. We’ve built many new features that will make you more productive targeting all of the Microsoft platforms. You can download the .NET Framework 4.5 and Visual Studio 2012 from the Visual Studio downloads page.

You can learn more about reference source at the Microsoft Reference Source Code Center.

As always, we would like to hear from you. Please don’t hesitate to post a comment on the blog or at one of the forums that we monitor: Connect (report bugs), UserVoice (request features), and MSDN Forums (ask for help).


Visual Studio 2012 and .NET Framework 4.5 released to the web!

$
0
0

I’m thrilled to announce that this morning we released Visual Studio 2012, Team Foundation Server 2012, and .NET Framework 4.5 to the web. It’s time to start your engines, and begin downloading today!

MSDN Subscribers can download immediately at the MSDN Subscriber Download Page, and volume licensing customers will be able to download starting tomorrow from the Volume Licensing Service Center. You’ll also be able to find the product in stores in the next month or so, as well as some availability to purchase through the Visual Studio product website in the next few days. Finally, to evaluate the free trial versions or download our free Express products, please visit the Visual Studio product website today.

This has been a great release for the team, and I’m really excited about all that we’ve accomplished. By adopting agile practices, and using our IDE and ALM tools, we’ve been able to complete the release in half as many milestones this time around. Here’s a picture of our release team, signing off on the final build:

P1060432

Developing great apps for Windows 8 is an important goal of this release. Therefore, in coordination with today’s developer tools releases, you’ll notice that the final version of Windows 8 has released to the web as well. Furthermore, in addition to the Blend tools that ship with Visual Studio 2012 RTM, today we also released a new Blend + SketchFlow Preview for Visual Studio 2012 that addresses some top Blend customer requests, including support for WPF, Silverlight, and SketchFlow.  For more details, check out BlendInsider, the Blend team blog.

Top 12 of Visual Studio 2012

In case you’re still deciding whether to download Visual Studio 2012, or haven’t been keeping up with all the news about the release, I’ll leave you with 12 good reasons to upgrade today. ;-)

#1) Develop for Windows 8

Visual Studio 2012 contains all the tools you need to develop killer apps for Windows 8, from templates, to designers, to testing, to debugging. Blend now comes with the Visual Studio installation providing rich visual tools for creating Windows store apps using HTML/CSS and XAML. Using these tools, you’ll find everything you need to develop a great app and submit it to the Windows Store.

NewProject

For more information, see the Windows 8 App Developer Blog and the Windows Dev Center.

#2) Develop for the Web

Visual Studio 2012 and .NET 4.5 provide the latest advances in ASP.NET including web optimization improvements (minification and bundling), new templates, HTML & CSS editor improvements, page inspector, and new publishing tools. We’ve added new features to support JavaScript development including IntelliSense improvements, a new DOM explorer, and a JavaScript console. For more information, check out the Web Development team blog.

MvcApplication4 (Running) - Microsoft Visual Studio (10)

Page Inspector

#3) Develop for Windows Phone 8

Visual Studio 2012 will provide support for developing Windows Phone 8 applications (both with a Express SKU as well as a freely downloadable plug-in for VS Pro and above). This will come online in the future, once Windows Phone 8 and the developer SDK become available. Some new features to look forward to include native C++ support, the ability to target both Windows Phone 7.x and Windows Phone 8 applications, multi-chassis support, and enterprise publishing. Stay tuned for more info from the Windows Phone team.

marblemaze_complete_phone

C++ Windows Phone 8 Application

#4) Develop for Windows Azure

Visual Studio provides the best possible tools to develop your cloud services. In Visual Studio 2012, you’ll notice cloud tooling improvements including support for distributed caching, new publishing options, new templates, and a lower install footprint. Using Team Foundation Service with Windows Azure, you can now achieve continuous integration and continuous deployment of your software. For more information, please visit the Windows Azure .NET Developer center, and download today’s release of the Windows Azure SDK for .NET.

Deployed Builds in TFS Portal

Deployment history

#5) Develop Business Applications

Visual Studio 2012 contains a variety of tools for developing business applications. SharePoint developers will find new designers for list and content types, new templates for site columns and Silverlight web pages, as well as new options for deploying SharePoint sites. ALM features like performance profiling, unit testing, and IntelliTrace are now available for SharePoint development. Client-side development has been improved as well, with support for JavaScript debugging and IntelliSense. For more information, please visit the SharePoint developer team blog.

ListDesigner

SharePoint List Designer

Meanwhile, we’ve also announced a new app model for Office and SharePoint 2013, which enables you to host your apps in the cloud, and to use web technologies to develop them. Visual Studio 2012, along with the Microsoft Office Developer Tools for Visual Studio 2012 – Preview, gives you the tools to program with the new app models for Office and SharePoint. To learn more and get started building apps for Office & SharePoint 2013, head to http://dev.office.com.

LightSwitch is a powerful tool available for building business applications for the Desktop and the Cloud. Starting in Visual Studio 2012, LightSwitch is available as part of the Visual Studio Professional, Premium and Ultimate installations. LightSwitch includes a variety of improvements in Visual Studio 2012, such as a new theme, the ability to access data from any OData source as well as create OData services, Active Directory integration, and new business types. We also are working on support for HTML clients, which will be available as an add-on to VS2012. To learn more, please visit the LightSwitch Developer Center and the LightSwitch team blog.

LS

LightSwitch in Visual Studio 2012

#6) Develop Games and other 3D Applications

Visual Studio 2012 includes graphics tools to help game developers become more productive, making it easier to build innovative games. From debugging DirectX graphics, to designing and coding DirectX shaders (HLSL), to inspecting and manipulating graphics assets (images and models), Visual Studio 2012 provides all the functionality you need to build graphically rich 2D/3D applications.

GraphicsImage - Game

Visual Studio 2012 Graphics Diagnostics Tools

#7) Take advantage of the latest language advancements

If you’re developing in C# or Visual Basic, you can take advantage of the language new features in Visual Studio 2012 and .NET 4.5 for asynchronous programming. Using the new async and await keywords, you can write asynchronous code that looks a lot like the synchronous version:

Async

The C++ support in Visual Studio 2012 includes the full C++ 11 standard library as well as new language features: stateless lambdas, SCARY iterators, range-based for loops, and scoped enumerations support. Visual C++ 11 also adds seamless access to Windows Runtime components through C++/CX as well as C++ Accelerated Massive Parallelism (C++ AMP), which enables hardware acceleration for the execution of your data-parallel C++ code.

For JavaScript development, please see more details about the improvements we’ve made in the Web development section above.

Lastly, if you’re using F#, you’ll enjoy improvements for information-rich programming, which enable you to program directly against data services, and are made possible by F# type providers and LINQ queries.

#8) Performance, Reliability, and Compatibility Improvements

In addition to adding new features, we’ve also invested heavily to improve the core capabilities of the product. For example, we’ve invested in performance and made significant improvements in areas such as the toolbox, typing and editing, debugging, and solution loading time.

SolutionLoad

We’ve also taken care to improve the backward compatibility of Visual Studio 2012, and enabled you to continue collaborating on projects with teammates using Visual Studio 2010 SP1.

#9) New IDE Productivity Features

The Visual Studio 2012 user interface includes an updated look and feel, which is consistent with the latest Microsoft products, and designed to focus your attention on the code. The overall environment has been streamlined, including simplified toolbars, a lightweight Find dialog, and less tab clutter by previewing files rather than opening them during debugging. Using Quick Launch, you can now search the IDE for any menu or command.

IDE

New Find Dialog

#10) Improve your code quality with enhanced testing tools

Visual Studio 2012 includes a wealth of testing tools.

Microsoft Test Manager 2012 has been enhanced to embrace exploratory testing (sometimes called agile testing), which allows you to explore the product in any way you want while keeping relevant steps and data that can be used to directly file bugs and feedback:

Exploratory Testing

Lab Management has also been greatly simplified in this release with the consolidation of agents and the introduction of standard environments, which allow you to benefit from build-deploy-test workflows without the dependency on Hyper-V or SCVMM.

With Visual Studio 2012, we now provide the ability for you to include additional adapters to support 3rd party unit testing frameworks such as xUnit.net, NUnit, and others. The new Test Explorer will showcase all of the tests across your solution regardless of which testing framework they were written for. Visual Studio 2012 will continue to provide support for traditional unit tests written using the classic Visual Studio Unit Testing Framework, and adds support for writing tests in C++ as well.

Unit Testing

New Test Explorer

#11) Reduce cycle times using tools for agile practices

Visual Studio 2012 contains a variety of tools to create transparency between team members, reduce waste, and accelerate the flow of the project. As you set out to start the project, PowerPoint storyboarding is a useful way to communicate the requirements of the software. When you get further along, the Microsoft Feedback Client can be used to gather feedback on the working bits from external stakeholders.

Team Foundation Server 2012 provides a rich toolset for planning out your sprints, managing the backlog, and tracking progress. I recommend reading my earlier post, where I explored these features in detail. As an example, below is a picture of the taskboard, which can be used to easily edit work items during a standup meeting:

Taskboard - TFS

#12) Deliver Cloud-Based Services with Smoother Collaboration between Operations and Engineering

Each release of our ALM tools, we’ve integrated additional roles to improve collaboration across the team, and decrease cycle time. This release, we’re including operations, which is increasingly important for today’s cloud-based services apps. Many of you are already using System Center to monitor your applications in production. This release, we’ve introduced a new management pack, which will allow critical production issues detected by System Center 2012 SP1 to be immediately assigned to the development team with high quality diagnostic information via TFS and Visual Studio.

1667.SCOM-TFS_APM_Alert[1]

System Center Operations Manager

These kinds of tools for operations and engineering are something we plan to continue delivering in the future. For example, System Center 2012 SP1 will also introduce “Global Service Monitor” (GSM), which allows you to monitor your application’s functionality, performance, and uptime from multiple endpoints around the world.

Conclusion

I’m very excited for the bits to be out and available for download! As you can see, there are a ton of new capabilities in this release, which is now the best version of Visual Studio we’ve ever shipped. I look forward to seeing all the amazing things that you will do with it. I hope this post gave you a glimpse of what’s in store. To learn more, I invite you to join us on September 12th for the Visual Studio 2012 Launch event online at http://www.visualstudiolaunch.com/.

 

Follow me at http://twitter.com/jlzander.

Visual Studio 2012 and .NET 4.5 now available!

$
0
0

Two weeks ago, I shared that final builds of Visual Studio 2012 and .NET 4.5 had been created, and that they’d be available for MSDN Subscribers on August 15th.  Well, today is August 15th, and I’m excited to announce that the bits are live and ready to go.

How can you get them?

  • If you’re an MSDN Subscriber, you can download them today from MSDN Subscriber Downloads.
  • If you want the free Visual Studio Express 2012 products, or free trial versions of Visual Studio 2012, you can download them from here.  Visual Studio Express for Windows 8, Visual Studio Express for Web, and Team Foundation Server Express are all now available.  Express for Windows Phone and Express for Windows Desktop will be available later this fall.
  • If you want to install .NET 4.5 separately, you can get it from http://www.microsoft.com/net.
  • For volume licensing customers, Visual Studio 2012 products will be available starting tomorrow (August 16th) from the Volume Licensing Servicing Center.
  • Packaged products will begin to show up in stores next month, with some products available for purchase digitally in selected regions starting in the next few days (visit the Visual Studio product website for details).

For all of you excited to use Visual Studio 2012 to develop for Windows Azure, the Windows Azure SDK for .NET – June 2012 release has been updated to work with these bits.  The recent Microsoft Office Developer Tools for Visual Studio 2012 release has also been updated accordingly.

With Visual Studio 2012, we’re delivering a productive and powerful development experience, one that makes it easy to develop on your own or as part of a collaborative team, all the while building apps that target the latest platforms.  The interesting question for every developer out there is - what app will you build today?  We look forward to discussing it more with you during the Visual Studio 2012 Launch Event on September 12th.

I’m also excited today to announce another release.  As part of Visual Studio 2012, we updated Blend to provide a terrific experience for designing Windows Store apps that use HTML and XAML, and we incorporated its designer into Visual Studio for use with all XAML platforms.  However, the RTM release of Visual Studio 2012 does not include support in Blend for designing WPF 4.5 or Silverlight 5 applications.  Today, we’re releasing Blend + SketchFlow Preview for Visual Studio 2012, a preview of Blend that does support all XAML platforms and includes SketchFlow.  Download it from here, and visit the BlendInsider blog for more details on the release.

Namaste!

Welcome to Visual Studio 2012 ALM Rangers Readiness “Wave”

$
0
0

JasonZ announced the Visual Studio 2012 RTM, which triggered a final SIMultaneous-SHIPping event for the Visual Studio ALM Rangers Readiness solutions wave Smile


ALM Ranger Solutions

Find the latest list of all ALM Ranger solutions here and a list of all ALM Ranger projects on CodePlex here. For an overview of the ALM Rangers Readiness wave and to hear from some of the product owners and project leads, watch the 3min RC awareness video and presentation.

The following diagram summarizes the Visual Studio ALM Rangers solutions that are included and/or related to the RTM sim-ship wave.
The ■’s (tiles) are hyperlinked!

image

image
 image image image
image image image image
image image image image
image image
















image  
image image image





image  
image image







The “Team”

Slide11Slide10Slide9


What’s planned for FY13?

In ALM Ranger solution types and a practical walkthrough of the Quick Response concept (Part 2) we covered the variety of ALM Ranger solution types and eluded to a shortened cadence of solutions lifecycles. During FY13 the ALM Rangers will be starting projects when and as needed, primarily driven by the triage of ideas and adoption blockers raised in UserVoice.

Keep an eye on my blog for information on new projects and our FY13 vision.


Related Links

Blogs

Downloads



Send Feedback

We can’t wait to hear from you, and learn more about your experience using the Beta. Here are some ways to connect with us:

Enjoy!

Follow me at twitter.com/wpschaub.

Visual Studio 2012 and .NET Framework 4.5 is RELEASED - Here's 5 minute videos to get you up to speed quick

$
0
0

Jason Zander announced today that Visual Studio 2012 and .NET Framework 4.5 is RELEASED to web. The .NET Web Tools Team (the team I'm on) has coverage on their blog as well. I thought I'd showcase some Tiny Happy Features that the team worked on just because it made life better. Some are large some are small, but all are tiny happy features.

I'll continue for a few more Tiny Happy Features over the next few weeks but this last week I took some time and recorded 13 (ya, thirteen, oy) short videos to show you guys these features in action. These are SHORT videos that are at most 4 to 6 minutes. It's hard to watch 60 to 90 minute screencast so I did these little one-take quick shots so you could watch them at lunch.

If you watch all these videos it will take you less than an hour and you'll have a good practical idea of what's new in Web Development and Tools with Visual Studio 2012. This is by no means exhaustive, but it's a lot.

The other concept that's worth pointing out is One ASP.NET. We've pulled the Web Tooling and Templates out into extensions in Visual Studio 2012. This means we can update Web Tools without updating all of Visual Studio. I talked about this in the One ASP.NET keynote at aspConf. We'll be updating the tools - not in major scary ways - but in useful and important ways that make front end web development easier. We'll look at small updates either quarterly or maybe semi-annually so when a new technique comes out you don't have to wait for the next version of Visual Studio.

Download Visual Studio 2012

MSDN Subscribers can download now at the MSDN Subscriber Download Page. For volume licensing customers, Visual Studio 2012 products will be on the Volume Licensing Service Center tomorrow. If you want to download Visual Studio 2012 free trial versions, or to download the free Express versions, head over to the the Visual Studio product website.

Here's the 13 short videos showing each of my favorite features in just a few minutes.

Model Binding

HTML Editor

CSS Editor

JavaScript Editor

Page Inspector

ASP.NET 4.5 Web Forms Strongly Typed Data Controls

Web Publishing Improvements

ASP.NET MVC 4

ASP.NET Web API

Bundling and Optimization

SignalR and Web Sockets

Async and Await

OAuth in the Default ASP.NET 4.5 Templates

Related Links



© 2012 Scott Hanselman. All rights reserved.

Visual Studio 2012 Released to Web!

$
0
0

We are extremely excited that Visual Studio 2012 has released to the web today! As of this morning, everyone can download the final release of Visual Studio 2012 which includes the latest version of LightSwitch! MSDN Subscribers can download the bits through their MSDN subscription.

LightSwitch includes a variety of improvements in Visual Studio 2012, such as such as a new theme, the ability to access data from any OData source as well as create OData services, Active Directory integration, new business types, and a whole lot more. We are also working on support for HTML clients, which will be available as an add-on to VS2012. For more details on what’s in the Visual Studio 2012 release see Jason Zander’s blog.

LightSwitch in Visual Studio 2012 

DOWNLOAD: Visual Studio 2012

LightSwitch is now a core part of the Visual Studio product line and is available through Visual Studio 2012 Professional, Premium and Ultimate. With this integration, Visual Studio now provides a comprehensive solution for developers of all skill levels to build line-of-business applications and data services quickly and easily for the desktop and cloud. For more information on Visual Studio 2012, head to http://microsoft.com/vstudio

With this product integration, we have also aligned the LightSwitch and Visual Studio web sites including a new integrated Developer Center and User Voice sites. Your URLs remain the same and will redirect to the new locations. The Developer Center is still your one-stop-shop for learning all about Visual Studio and building business applications with LightSwitch.

LightSwitch on the Visual Studio Developer Center: http://msdn.com/lightswitch

We have a ton of resources for you here, check out some of the goodies we’ve updated for you:

We also have more content on the way so stay tuned!

If you’d like to connect with the community, our community sites remain the same:

Thanks to everyone in this amazing LightSwitch developer community who helped report and troubleshoot bugs, requested features and helped others learn about LightSwitch in Visual Studio 2012. We ended up with an amazing release!

Enjoy,
-Visual Studio LightSwitch Team

WCF Data Services 5.0.2-rc Prerelease

$
0
0

We’re happy to announce that we’re ready for another public RC that includes a whole bunch of bug fixes.

What is in the prerelease

This prerelease contains a number of bug fixes:

  • Fixes NuGet packages to have explicit version dependencies
  • Fixes a bug where WCF Data Services client did not send the correct DataServiceVersion header when following a nextlink
  • Fixes a bug where projections involving more than eight columns would fail if the EF Oracle provider was being used
  • Fixes a bug where a DateTimeOffset could not be materialized from a v2 JSON Verbose value
  • Fixes a bug where the message quotas set in the client and server were not being propagated to ODataLib
  • Fixes a bug where WCF Data Services client binaries did not work correctly on Silverlight hosted in Chrome
  • Allows "True" and "False" to be recognized Boolean values in ATOM (note that this is more relaxed than the OData spec, but there were known cases where servers were serializing "True" and "False")
  • Fixes a bug where nullable action parameters were still required to be in the payload
  • Fixes a bug where EdmLib would fail validation for attribute names that are not SimpleIdentifiers
  • Fixes a bug where the FeedAtomMetadata annotation wasn't being attached to the feed even when EnableAtomMetadataReading was set to true
  • Fixes a race condition in the WCF Data Services server bits when using reflection to get property values
  • Fixes an error message that wasn't getting localized correctly
Getting the prerelease

The prerelease is only available on NuGet. To install this prerelease NuGet package, you will need to use one of the following commands from the Package Manager Console:

  • Install-Package –Pre –Version 5.0.2-r
  • Update-Package –Pre –Version 5.0.2-r

Our NuGet package ids are:

Call to action

If you have experienced one of the bugs mentioned above, we encourage you to try out the prerelease bits in a preproduction environment. As always, we’d love to hear any feedback you have!

Visual Studio 2012 and .NET Framework 4.5 is RELEASED - Here's 5 minute videos to get you up to speed quick

$
0
0

Jason Zander announced today that Visual Studio 2012 and .NET Framework 4.5 is RELEASED to web. The .NET Web Tools Team (the team I'm on) has coverage on their blog as well. I thought I'd showcase some Tiny Happy Features that the team worked on just because it made life better. Some are large some are small, but all are tiny happy features.

I'll continue for a few more Tiny Happy Features over the next few weeks but this last week I took some time and recorded 13 (ya, thirteen, oy) short videos to show you guys these features in action. These are SHORT videos that are at most 4 to 6 minutes. It's hard to watch 60 to 90 minute screencast so I did these little one-take quick shots so you could watch them at lunch.

If you watch all these videos it will take you less than an hour and you'll have a good practical idea of what's new in Web Development and Tools with Visual Studio 2012. This is by no means exhaustive, but it's a lot.

The other concept that's worth pointing out is One ASP.NET. We've pulled the Web Tooling and Templates out into extensions in Visual Studio 2012. This means we can update Web Tools without updating all of Visual Studio. I talked about this in the One ASP.NET keynote at aspConf. We'll be updating the tools - not in major scary ways - but in useful and important ways that make front end web development easier. We'll look at small updates either quarterly or maybe semi-annually so when a new technique comes out you don't have to wait for the next version of Visual Studio.

Download Visual Studio 2012

MSDN Subscribers can download now at the MSDN Subscriber Download Page. For volume licensing customers, Visual Studio 2012 products will be on the Volume Licensing Service Center tomorrow. If you want to download Visual Studio 2012 free trial versions, or to download the free Express versions, head over to the the Visual Studio product website.

Azure SDK for both Visual Studio 2012 and Visual Studio 2010

It's also worth noting that the Windows Azure .NET SDK has been updated today as well and you can download versions for either Visual Studio 2010 SP1 or Visual Studio 2012.

The Videos

Here's the 13 short videos showing each of my favorite features in just a few minutes. There are new Entity Framework 5 videos as well, so be sure to scroll all the way down!

CODEC NOTE: These are using HTML5 video and MP4. If you are using a browser that doesn't support that codec, click the Header links to go to the ASP.NET site directly and the videos will stream with Silverlight.

Model Binding

HTML Editor

CSS Editor

JavaScript Editor

Page Inspector

ASP.NET 4.5 Web Forms Strongly Typed Data Controls

Web Publishing Improvements

ASP.NET MVC 4

ASP.NET Web API

There's also lots of details and a preview of what's next for Web API on Henrik's blog.

Bundling and Optimization

SignalR and Web Sockets

Async and Await

OAuth in the Default ASP.NET 4.5 Templates

Entity Framework 5

There are also 5 new Entity Framework videos done by Rowan Miller that show new features of the new Entity Framework 5 as well as walk you through Code First vs. Model First vs. Database First. They are excellent screencasts and I recommend them.

I want to write code:

I want to use a visual designer:

EF5 is the newest version of Entity Framework. These short videos and step-by-step walkthroughs will get you started with the new EF5 features

  • Enum Support in Code First - The domain classes that make up your Code First model can now contain enum properties that will be mapped to the database.
  • Enum Support in EF Designer - Using the EF Designer you can now add enum properties to your entities.
  • Spatial Data Types in Code First - Spatial data types can now be exposed in your Code First model using the new DbGeography and DbGeometry types.
  • Spatial Data Types in EF Designer - Spatial data types can now be used in the EF Designer using the new DbGeography and DbGeometry types.
  • Table-Valued Functions - Table-valued functions (TVFs) in your database can now be used with Database First models created using the EF Designer.
  • Multiple Diagrams per Model - The EF Designer now allows you to have several diagrams that visualize subsections of your overall model. This allows larger models to be broken up into multiple smaller diagrams. You can also add color to the entities to help identify sections of your model.

Related Links



© 2012 Scott Hanselman. All rights reserved.

Workflow Manager

$
0
0

I mentioned in the previous post that one of our key investments has been supporting the new workflow model in SharePoint 2013, which is now available in Preview form.  To accomplish this, we have been developing the “Workflow Manager”.  As the name implies Workflow Manager provides a hosting and management solution for workflows, built on the Windows Workflow Foundation in .NET 4.5.  Workflow Manager will be a general purpose technology, but the schedule and features for the first release have been driven by the SharePoint 2013 and Office 365 requirements.  We are, however, making the bits public for all customers, and we will continue to build out the capabilities and supported scenarios in future releases.

With Workflow Manager, we are focused on addressing some of the key challenges that our customers face today.   Specifically, we’ve looked at the common architectural patterns that customers have built around Windows Workflow Foundation and worked to provide more of those capabilities to you as a product.  This will allow you to invest less time in architectural infrastructure and more in the overall solution and business logic. 

More specifically, we’ve taken on some of the challenges that our ISVs customers are facing as they design their applications for the cloud.   Building multi-tenant applications presents some significant challenges in terms of isolation, scale and resource management.   A driving scenario for us in this work has been supporting the ISVs who are building their SaaS (Software as a Service) applications on Azure, including multi-tenant support and a “cloud scale” architecture.  The multi-tenant support includes not only the runtime isolation mechanisms and resource utilization throttles, but also the ability to store - in isolated fashion - the activities and workflows for various tenants of the system. 

For more information on Workflow Manager, please see our documentation here (including our samples).  The easiest way to install the Workflow Manager 1.0 Beta is via the Web Platform Installer (search on “workflow beta” and install “Workflow Beta 1.0”). 

Finally, we’ve also created a new MSDN forum for the Workflow Manager Beta.

Full-page Animations Using CSS

$
0
0

Internet Explorer 9 introduced support for CSS 2D Transforms. Internet Explorer 10 Developer Preview added support for CSS 3D Transforms and CSS Animations. By tapping the power of your GPU and running asynchronously from regular JavaScript, these IE10 features provide a more performant and flexible alternative to traditional script-based animations for Web content.

In previous blog posts, we covered CSS 3D Transforms as well as CSS Animations and Transitions. In this post, we introduce a more “unconventional” use case for these technologies by describing the concept of “full-page animations” that can be used during the navigation process to add fluidity and continuity to browsing. Our target is to achieve a seamless browsing experience in which content smoothly appears into view when the user visits a page and transitions away when he clicks on a link or performs a relevant action.

These effects can be accomplished by transforming the HTML element using CSS Animations. However, this use case presents some considerations that we felt were worthy of discussion, such as the effect of layout and sizing on transforming , as well as how to appropriately time page navigations so that they mesh properly with our animations.

The code samples in this post use unprefixed CSS markup as supported by IE10 Release Preview; other browsers may require vendor prefixes for the CSS Animations and CSS Transforms properties used.

Transforming a Page’s Entire Content

CSS Transforms are defined on the stylistic properties of an HTML DOM Element. For example, the markup for rotating an element 45 degrees along its Z axis would look like this:

#element {

transform: rotateZ(45deg);

}

Attaching a transform to the element of your HTML document works exactly the same way. So performing in order to declaratively add the same effect to your document’s you could do something like this:

body {

transform: rotateZ(45deg);

}

Let’s look at a before-and-after shot of a page when applying a transform to the body element:

Screen shot showing applying a rotateZ(45deg) transform to the body element of a document
Applying a rotateZ(45deg) transform to the body element of a document.

For three dimensional transformations, the CSS Transforms specification defines the perspective property that can be specified on the parent of the element that we transforming. When transforming the element of your content, it has to be applied to the element that resides above it in the DOM hierarchy. Doing so is straightforward:

html {

perspective: 500px;

}

Combining this with a rotateY(45deg) transform on the element yields the following result:

Screen shot showing applying a rotateY(45deg) transform to <body> with perspective: 500px set on <html>
Applying a rotate(45deg) transform to

with perspective: 500px set on .

We can manipulate the transform-origin property on the body element for interesting results. Let’s look at a couple of examples:

body {

transform-origin: 50% 100%;

transform: rotateX(45deg);

}

The above markup sets a rotation along X for the body element while shifting the origin of rotations to the bottom of the element using transform-origin. Effectively this rotates the document’s contents “into” the screen like this:

Screen shot showing applying transform: rotateX(45deg) and transform-origin:  50% 100% to <body>

We can also manipulate the perspective-origin property on the root element of our document to achieve an off-axis projection effect. Changing the style for to:

html {

perspective: 500px;

perspective-origin: 90% 50%;

}

Our page now looks like this:

Screen shot showing applying perspective: 500px and perspective-origin: 90% 50% to the <html> element

By using CSS Transforms, we can easily manipulate the visual appearance of the entirety of our page’s content. Since the usual layout and sizing rules still apply, some transforms on the body element (particularly ones that use percentage values or rely on the transform-origin property) can result in different visual effects depending on the content of our page. Recall our previous rotateX(45deg) example with transform-origin set to 50% 100%.

Below you can see the results before and after the transform is applied.

Screen shot highlighting the difference in scroll bars before and after the application of a transform under perspective projection

Notice how the content does not actually pivot on the bottom of the window but rather at some point outside of the viewport. This is expected behavior for CSS Transforms: the is laid out normally, then it is rotated along its bottom edge that is somewhere off screen. You will also notice that the actual foot print of the content has expanded (take a look at the scroll bars in the “after” picture) in order to accommodate the transformed content (the fact that we are using perspective projection makes this effect even more pronounced).

So how do we deal with arbitrarily sized content when applying transforms to our body element? Custom tailoring all content in order to ensure that the size of the body does not expand more than a certain amount may be unrealistic. Instead, we can use a simple HTML/CSS pattern that allows us to fix the size of the body element to that of the browser window and append content inside a wrapper

. The following markup achieves just that:

html, body {

width: 100%;

height: 100%;

min-width: 100%;

max-width: 100%;

padding: 0;

margin: 0;

overflow: hidden;

}

 

#Wrapper {

position: absolute;

width: 100%;

height: 100%;

overflow: scroll;

}

The illustration below shows what happens when a page is scrolled vertically and we apply a rotateY(45deg) transform to the element of our document directly (left) and using the wrapper pattern (right):

Screen shot showing what happens when a page is scrolled vertically and a rotateY(45deg) transform is applied to the <body> element under perspective projection, with and without a wrapper CSS/HTML pattern

The direct application of the transform results in a skewed visual result due to the off-axis projection (since we are no longer looking at the “center” of the body element). Using the wrapper pattern ensures that the element’s perspective-origin property (50% 50% by default) will always be correctly centered with relation to the element, giving us a pleasant visual effect.

By utilizing the above pattern and setting up CSS Transforms with percentage values whenever possible, we can affect our element in consistent ways, regardless of the size of its contents.

From Transforms to Animations

Having sorted out the intricacies of applying CSS Transforms to the element, CSS Animations are the next step. By following the principles described above, we can create animations that bring our Web content into view (or remove it from view) in interesting ways.

Consider this basic @keyframes rule:

@keyframes rotateInLeft {

from {

transform-origin: 0% 0%;

transform: rotateY(180deg);

}

to {

transform-origin: 0% 0%;

transform: rotateY(0deg);

}

}

When applied to an element, this animation will cause it to rotate on its left side. When applied to a element that uses our wrapper pattern the visual result is more interesting. The document will actually rotate from outside of the visible area of the browser window and into full view:

Three screen shots in sequence showing the affect of applying the

Similarly, we can compose animations that fluidly remove our Web content from view. For example, if we wanted our page to disappear into the distance while rotating, we could use something like this:

@keyframes whirlOut {

to {

transform: scale(0) rotateZ(1260deg);

}

}

With the visual result being:

Three screen shots in sequence showing the affect of applying the

Since we can use the full power of CSS Animations to affect the entirety of our Web content, we have a lot of flexibility in terms of generating these page effects (and we are certainly not limited to just using CSS Transforms). But once we have composed the effects that we want to apply to our content, how do we cause them to trigger during the page navigation process?

Attaching Animations to

Our goal is to use trigger animations at strategic times during the browser experience in order to give the appearance of content transitioning into view when a page loads and out of view when the user clicks on a link.

The first intuitive place to add an animation to the body element would be the onload JavaScript event. As it turns out however, adding an animation when onload fires is actually too late. This event actually triggers when the entirety of the content in our page has finished loading (including any images or other bandwidth-intensive resources). Attaching an animation to onload on a bandwidth-intensive page would result in our content displaying “normally,” followed by the animation triggering and re-bringing the content into view. Not exactly the effect that we were aiming for.

Alternatively, we could utilize the DOMContentLoaded event that triggers when the browser has finished parsing the DOM structure of our content (but potentially before resources have finished loading). The IE Test Drive DOMContentLoaded demo illustrates the difference between these two events. However, in cases of complex Web content, a modern browser may choose to perform “progressive” rendering, displaying the page before the entirety of the DOM tree has been loaded. In these situations, the visual result would be similar to the onload scenario.

The optimal place to set up an animation that transitions our page content in view is inline at the top of the element. This ensures that the animation will commence right as the content is being rendered (and that the starting position of the content will be that of the from keyframe of our selected animation). A pleasant side effect of this approach is that the animation may actually mask any progressive rendering, re-layout or resource loading that can occur with complex content.

Setting up the animations that transition our content out of view is also interesting. One could assume that we could attach an onclick handler to all elements of interest in our content (for instance all tags) and just set the relevant animation properties (animation-name, animation-duration, etc.) in the callback function. However, if we do not actually delay the navigation from happening, we will not see our expected fluid transition.

This is a good opportunity to utilize the animation events described in the CSS Animations specification. In particular, we can use the animationend event to detect when the animation has completed and then trigger a navigation (by setting window.location.href, for instance). Thus our onclick will trigger the “remove-from-view” animation and register a handler for animationend on that will ensure that the navigation event occurs.

Live Demo Available

We’ve created a demonstration and tutorial on bringing pages alive with CSS Transforms & Animations that provide depth and examples beyond what we’ve been able to show here. The tutorial itself utilizes full page animations during page navigation that work in Internet Explorer 10 on Windows 8 as well as recent versions of Chrome and Firefox..

To simply enjoy the page-to-page animations, step through the pages of the tutorial using the “Continue to ...” links in the lower right corner of each page.

At the end of the tutorial we provide some additional guidance and sample code on how to incorporate these animations with your own Web content.

Conclusion

CSS Transforms and CSS Animations are two powerful feature-sets that enable richer and more immersive Web experiences. This blog post outlined the considerations of using CSS Transforms and CSS Animations to bring the entirety of your Web content to life. With a small amount of effort you can create Web pages (even static ones) that provide a fluid and almost app-like navigation experience.

—Charilaos “Harris” Papadopoulos, Program Manager Intern, Internet Explorer Graphics

Memory Profiling: The Types View

$
0
0

[Performance is a key concern for all but the most trivial of apps, and memory usage helps determine how well your app runs. In this series, Pratap Lakshman shows how the Windows Phone Performance Analysis Tool can help you diagnose and fix memory issues and improve app performance. –ed.]

Let’s continue our look at the memory profiling feature of the Windows Phone Performance Analysis tool. Today I’m focusing on the Types view, which presents a conveniently grouped organization of heap activity and can be used to quickly focus diagnosis on specific types and allocating assemblies. Every activity can be tracked back to the assembly causing it, and indeed to the line of code in source (as we shall see in a future post). Your allocations cannot hide from the profiler.

The Heap Summary view, which I covered in my last post, provided a categorized demographic representation of heap activity—springboards to dive from for deeper analysis. Selecting a category and navigating to the Types view reveals details about the participating types, arranged in a tabular form.

The Types view
Here is the table from the memory leak diagnosis case where we navigated to the Types view for the “Retained Silverlight Visuals at End” category.

image

It can be seen that there are 5 instances of the type ManagedLeak.Page2 allocated from mscorlib.dll, using up 467 KB on average for a total of about 2.2 MB, and accounting for 99% of the memory within the category.

The table lays out—using a combination of text, numerals and graphics—the association between the names of allocated types, a count of the allocated instances and their sizes, and the module (assembly) from where the allocation occurred; this “allocating module” serving as the provenance for sets of instances grouped by their type. The columns in the table support sorting, and sorting by Allocating module can quickly focus diagnosis to appropriate application assemblies.

The profiler records the active execution call stack in response to every managed object allocation. During subsequent post processing of this recorded data it descends frames on the call stack until it discovers the method causing the allocation and displays the module to which the method belonged as the Allocating Module. An “N/A” in the Allocating Module column indicates that the stack frame of the method causing the allocation was not discovered. Recording a deeper call stack improves the chances of discovering the allocating method, and can be configured from the Advanced Settings hive under the Memory Profiler, but beware that it will also bloat the size of the data that needs to be recorded and subsequently transferred back to desktop for post processing.

The Type Name column lists the full name of a type (i.e. including the namespace). For every type name listed there will be corresponding type declaration in code (in user code or Framework code), whose instances have been allocated dynamically; in C# that would be by using the new operator. The attached sample demonstrates how these are reported in the Types view. Running it under the Memory Profiler with the Allocation Depth set to 12 (thrice the default value, for good measure), and navigating to the Types view from the New Allocations category in the Heap Summary view, we see the following table:

image

Named types
Open the sample and you should see the following snippet that allocates the same named type from two assemblies PhoneClassLibrary1.dll and PhoneClassLibray2.dll using the new operator:

namespace PhoneClassLibrary3 {

public class Bazooka { }

}

// ...

for (int i = 0; i < 101; i++) {

var o = new Bazooka();

}

This is shown in the Types view as two sets of 101 instances of the type PhoneClassLibrary3.Bazooka and while one set has PhoneClassLibrary1.dll as the Allocating Module the other has it as PhoneClassLibrary2.dll.

Arrays
The following snippet allocates one dimensional arrays:

public class Base { };

// ...

for (int i = 0; i < 101; i++) {

o = new Base[0];

}

This is shown as 101 instances of PhoneApp15.Base[] from the same module. The unadorned [] indicates that this is a one dimensional array. For a two-dimensional array, a single comma will be used inside the square brackets (an array of rank 2). This notation extends in the obvious way: each additional comma between the square brackets increasing the rank of the array by one.

Straight forward enough one may think, but there can be a few subtleties:

  • There might be allocations happening without explicit use of the new operator in code.
  • There might cases where there is no direct mapping from the type name shown to a declaration in code. Especially for complex types where the profiler creates a simplified representation of the type name.

Let us see a few such cases from the same sample and refer to how they are reported in the table above.

Delegate types

The following snippet allocates delegates:

public delegate void Proc();

// ...

public static void method() { }

// ...

Proc o;

// ...

for (int i = 0; i < 101; i++) {

o = method; // synctactic sugar hides the 'new'

}

This is shown as 101 instances of PhoneApp15.Proc from the module PhoneApp15.dll. But notice that there is no explicit use of the operator new in code. Despite that, such allocations cannot escape detection!

Nested types

The following snippet allocates instances of a nested class:

public class Outer {

public class Nested { }

};

// ...

for (int i = 0; i < 101; i++) {

var o = new Outer.Nested();

}

This is shown as 101 instances of PhoneApp15.Outer+Nested from the same module.

Generic types

For constructed generic types the full name of the type includes Culture and Version information of the actual type parameters. Since this information is irrelevant for reporting allocations, the profiler drops them, and instead shows a simplified form of the full name. Consider the following snippet that allocates instances of a constructed generic type:

public class MyCollection { };

// ...

for (int i = 0; i < 101; i++) {

var o = new MyCollection();

}

This is shown as 101 instances of PhoneApp15.MyCollection`1. The back tick “`” and the integer specify the arity (number of type parameters) of the generic type (encoded into the name itself by the CLR), and the simplified actual type name is shown within the angle brackets.

Nested Generic Types

And the following snippet allocates instances of a nested generic type:

public class OuterGenericDecl {

public class NestedGenericRedecl { }

}

// ...

for (int i = 0; i < 101; i++) {

var o = new OuterGenericDecl.NestedGenericRedecl();

}

We have seen that nesting introduces a “+” sign into the type name, and that generic types have their arity encoded into their type name, but the CLS rules for generics also states that “Nested types must have at least as many generic parameters as the enclosing type. Generic parameters in a nested type correspond by position to the generic parameters in its enclosing type.” As expected, this is reported as 101 instances of PhoneApp15.OuterGenericDecl`1+NestedGenericRedecl

Since the nested type did not introduce any type parameters of its own, it does not have an arity encoded.

Having seen how arrays, nested types and generics are reported, we can figure out what a source declaration would look like by inspecting the type name reported by the profiler; consider this:

PhoneApp15.OuterGeneric`1+NestedGeneric`1[]

We know that the full name begins with the namespace, have seen that “+” is used to indicate nesting, that the arity of a generic type is encoded as part of its name, and that a nested generic type implicitly re-declares the type parameters of its enclosing generic type. We can infer the source declaration (in C#) to be:

namespace PhoneApp15 {

public class OuterGeneric {

public class NestedGeneric { }

}

}

And the allocation to be of the form:

new OuterGeneric.NestedGeneric[0];

Sure enough that is how it is in the source.

Anonymous types

But what about types that have no names? This snippet allocates instances of anonymous types:

for (int i = 0; i < 101; i++) {

// the below 2 anonymous types will be unified

var o = new { x = 5, y = 3.1415 };

var o2 = new { x = 5, y = 3.1415 };

// this one is a different type than the one above.

var o3 = new { y = 3.1415, x = 5 };

}

For anonymous types in source, the compiler always generates them as generic types with synthesized names. Furthermore, usage of structurally identical anonymous types (i.e. having the same property names and types, and appearing in the same order) within an assembly are unified to be the same type. In the snippet above the two occurrences of new { x = 5, y = 3.1415 } unify to a single type, while new {y = 3.1415, x = 5} remains distinct.

And this is shown as 202 instances of <>f__AnonymousType0`2 and 101 instances of <>f__AnonymousType1`2. As we saw in the case of generic types, notice the encoding of the arity and the simplified representation of the actual parameters used in constructed type. The generated names are mangled by the compiler to guarantee that they cannot be used as-is even accidentally in source code.

In an upcoming post, I shall introduce the Instances view and show how it enables tracing heap activity back to your source code.

More posts in the series:

Part 1: Memory Profiling for Application Performance

Part 2: Memory Profiling: Launching, Graphs, and Markers

Part 3: Memory Profiling: The Heap Summary View

Links to ASP.NET WebAPI blog posts and Data Access blog posts

$
0
0

Here are some blog posts about ASP.NET WebAPI that we just released.

 

Here are some ASP.NET Data access blog posts intended for newcomers to ASP.NET. The purpose is basic guidance for making data access choices for ASP.NET application development.  The two SQL Server docs may also be useful to people who have been using ASP.NET but aren’t familiar with LocalDB and SSDT.

 

Enjoy web development!

Release Notes for 8/16/2012

$
0
0

Below are the release notes for today's deployment.

Source Tab Improvements

  • Revamped fork navigation to make it more clear that you are within a fork verses the parent project.

Infrastructure

  • Updated CodePlex to ASP.Net MVC 4.0. RTM+1 how's that for a turnaround?

Bug Fixes

  • Fixed a set of user experience issues with the in-line diff view experience.
  • Fixed issue with date mismatches between UTC and local time for discussions and issue tracker
  • Fixed issue where new issues would not show up in search results.
  • Changed the default destination branch for pull requests to master.

Have ideas on how to improve CodePlex? Please visit our suggestions page! Vote for existing ideas or submit a new one.

As always you can reach out to the CodePlex team on Twitter @codeplex or reach me directly @mgroves84

Few tips on implementing a Coded UI Test Plugin Extension

$
0
0

This blog assumes that you have a prior understanding of Coded UI Test extensibility. If not, a good starting point would be here. Also check out additional links in the “Extending Coded UI Test” section available here.

In this post, I’ll enumerate a few points you would need to watch out for while implementing an extension plugin. Some of the data are a compilation of actual issues the plugin writers hit while developing their plugin in collaboration with the Coded UI Test team.

1. Set the ComVisibleAttribute

Ensure that the System.Runtime.InteropServices.ComVisibleAttribute is set to true for both technology manager and technology element class. For example,

[ComVisible(true)]

public class TelerikGridViewTechnologyElement : UITechnologyElement { … }

[ComVisible(true)]

public sealed class TelerikGridViewTechnologyManager : UITechnologyManager { … }

2. Implement some caching mechanism for properties in property provider.

You could be using different approaches for fetching the control properties. It could be through an accessibility interface or some code injection technique with some remoting mechanism to communicate between the two processes.  Either way, always ensure that you property fetching is optimized, specifically for properties whose value remain constant throughout.

A good example is ControlType. This property is accessed a lot number of times on each PropertyProvider call at different contexts.  Ensure that such property values for the controls are cached in your plugin. Secondly, use lazy initialization for the property values. Use your own diligence to decide on whether to do bulk fetching versus individual property fetching. At instances we have observed as much as 3x improvement in performance with proper level of caching implemented.

 

3. Limit the hierarchy for the specialized class

Ensure you provide the correct level of ancestor in the hierarchy. For example, the Desktop UITestControl need not be specified as the container for the TopLevelWindow. It simply creates an unnecessary hierarchy during CodeGeneration.  

  public WpfInjectedWindow() : base(UITestControl.Desktop) { … }

Instead, simplify it as

  public WpfInjectedWindow() : base(null) { … }

 
4. Do not access “live” UITestControl properties in UITestPropertyProvider.GetControlSupportLevel(UITestControl)

No new property fetching should be done within the GetControlSupportLevel() method. The UITestControl passed to this method may not necessarily be a “live” control i.e. may not exist currently in the desktop session. (Note: The GetControlSupportLevel() is called both in the context of Playback as well as CodeGeneration). So the decision of support level should be based solely on the static information available in the UIObject map i.e. search properties, technology name, etc.

Here is an example that makes use of ClassName and AccessibleDescription values from the UIObject search properties.

 public override int GetControlSupportLevel(UITestControl uiTestControl)
{
bool useClassName = false;
string className = string.Empty;
string accDescriptionValue = string.Empty;

if(uiTestControl.SearchProperties != null && uiTestControl.SearchProperties.Count > 0)
{
PropertyExpression controlTypeExpression = uiTestControl.SearchProperties.Find(“ClassName”);
if (controlTypeExpression != null)
{
className = controlTypeExpression.PropertyValue;
useClassName = true;
}

controlTypeExpression = uiTestControl.SearchProperties.Find("AccessibleDescription"));
if (controlTypeExpression != null)
{
accDescriptionValue = controlTypeExpression.PropertyValue;
}
}

// Use this 'accDescriptionValue' and ‘className’ for all your decision making.
// Do not call uiTestControl.GetProperty("AccessibleDescription") or uiTestControl.GetProperty("className")

if (string.Equals(uiTestControl.TechnologyName, “TelerikGridView”, StringComparison.OrdinalIgnoreCase)
&& (!useClassName || string.Equals(className, TelerikGridViewConstants.TelerikGridViewClassName, StringComparison.OrdinalIgnoreCase))
&& accDescriptionValue.Contains("Telerik.WinControls.UI.GridView"))
{
return (int)ControlSupport.ControlSpecificSupport;
}

return (int)ControlSupport.NoSupport;
 }
 

Also, note the difference between the UITestPropertyProvider.GetControlSupportLevel(UITestControl) and UITechnologyManager.GetControlSupportLevel(IntPtr). The latter is used by the recorder and Coded UI Test control locator on a live control. So it is fine to access the live information of the control (corresponding to the window handle passed) in this method.

 

5. Do not use the existing core technology manager names.

The Core technology managers have reserved names.

const string WindowTechnologyName = "Window";

const string MsaaTechnologyName = "MSAA";

const string WebTechnologyName = "Web";

const string UiaTechnologyName = "UIA";

const string SilverlightTechnologyName = "Silverlight";

Ensure you provide an unique name to the extension plugin manager. If there is any name conflict, the extension manager will load the plugin, but will fail to register it to the recorder or playback. As a result, the plugin is rendered useless.

 

6. Avoid specific implementation inside the Specialized class properties.

This is particularly of relevance if you are using the plugin for both Coded UI Test as well as MTM. The property fetcher implementation should reside on your common property provider’s UITestPropertyProvider.GetPropertyValue(UITestControl, string) implementation. The specialized class property should just be a thin layer calling into the UITestControl.GetProperty()

   public class TelerikGridViewCell : WinControl
   {

 ...
public virtual string BorderColor
{
get { return (string)this.GetProperty(PropertyNames.BorderColor); } // This internally invokes UITestPropertyProvider.GetPropertyValue().
}
 }


 

7. Make use of the new extension proxy classes

You could be implementing support for a completely different UI Technology or you goal could be to create add-on support or customization over existing UI technologies supported by coded UI Test. For the latter, make use of the new extension proxy classes recently released that simplifies the implementation to a great extent. The details are available here.

  

Silverlight Show: Connecting Windows 8 applications with services: Part 1: Using services to get data in our Windows 8 applications

$
0
0

Windows 8’s biggest novelty is without a doubt “Apps”. Microsoft is entering the world of apps and is for the first time introducing a “real marketplace”, named the Windows 8 Store where developers can publish, market and sell their applications. This new (for Microsoft developers at least) way of working requires in many views a change of mindset. We as developers are facing many new things, including a new application lifetime management, a new API (WinRT), a different type of communication between apps (Contracts), a new Start experience (Tiles) and many more.

Since apps are going to be distributed through the means of a store, topics such as accessing data also requires some thought. In many views, accessing data through services is similar to accessing data in Silverlight applications. Although the principles are similar, the implementation tends to differ in many places.

The apps we build need to give the user the feeling of being connected. When we’re building a stock ticker application, the app needs access to up-to-date data. An RSS reader would be pretty useless without access to RSS feeds. A LOB app may need access to a CRM data. Without being connected to (up-to-date) data, many apps can’t even execute their normal routine.

Read more…


Wackiness ensues

$
0
0

No tech today, but this is too funny to not pass along, so consider this your fun for Friday.

What would happen if Anders Hejlsberg and Barbara Liskov were forced to share an apartment in an "odd couple" sitcom? (*)

Apparently I'm the "Kramer" of this sitcom. I hope I'm played by Ryan Gosling. Additional suggestions on casting the principal roles can be left in the comments.


(*) A single-threaded apartment, I'd assume.

Video: Touring the Windows Phone Dev Center

$
0
0

If you’re looking for a little more behind-the-scenes insight into our new Windows Phone Dev Center, check out the latest episode of Channel 9’s Inside Windows Phone.

Host Larry Lieberman sat down with Ash Wahi, program manager for the new portal, and asked him to drill into some of the new features and explain a little of the thinking behind them. (Ash, you might recall, also penned last week’s post announcing it to the world.)

Definitely worth checking out if you haven’t seen it. Have a great weekend.

Installing HTTPIE (HTTP for Humans) on Windows - Great for ASP.NET Web API and RESTful JSON services

$
0
0

Recently in on a post on the RESTful ASP.NET Web API framework I used curl to post JSON to an HTTP endpoint:

curl -X POST -H "Content-Type: application/json" -d "{ Name: 'Scott Guthrie', Age: 67}"

Curl is lovely and should be in your c:\utils folder and more importantly in your PATH. I have a UTILS folder in my Dropbox and in the PATH on all my machines. Whenever I find a useful no-install utility I put it in there.

Curl is great but it's still confusing enough to me that I don't use it enough. It's slightly obscure command-line switches are keeping me from using it on a regular basis.

For HTTP work there is a better utility called HTTPie at http://httpie.org. (It has nothing to do with IE (Internet Explorer)). For Mac and Linux folks who use Python all the time, it's easy to install, you just

pip install -U httpie

For Windows folks who don't use Python it's a little harder to install, but it's worth it and I recommend you take a moment and set it up. You'll wonder how you lived without it.

Installation of HTTPIE

First, go download Python. I got the x86 version of Python 3.2.3 cause it was the latest and I didn't think I needed the x64 one.

I then added c:\python32 and c:\python32\scripts to my path. I do this by hitting WinKey+Break, then Advanced, then Environment.

Add Python and Python/Scripts to your PATH

Second, download CURL. Yes, I realize the irony, but it's still a VERY useful tool. I downloaded the 7.27 binary SSL Win32 version, unblocked it, unzipped it and put it in C:\UTILS so it was automatically in my PATH.

Third, run this from an Administrator command prompt. Note again that it needs both curl.exe and python.exe in the PATH to run as it is. This should run without incident.

curl http://python-distribute.org/distribute_setup.py | python

Then run

curl -k https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

This should end with "successfully installed pip."

Pip is a Python package manager.

Finally, run

pip install -U https://github.com/jkbr/httpie/tarball/master

I'm recommending you install the development edge build of HTTPie rather than just "pip install httpie" as the developer is actively fixing Windows issues and just recently helped me with one.

So, to sum up what you need to run, in four lines, assuming curl.exe, python.exe and python scripts are all in your PATH.

curl http://python-distribute.org/distribute_setup.py | python
curl -k https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
pip install -U https://github.com/jkbr/httpie/tarball/master

Running HTTPie

You'll know it works if you can run "http" from the command line and get this output:

C:\Users\scottha\Desktop> http
usage: http-script.py [--help] [--version] [--json | --form] [--output FILE]
[--pretty | --colors | --format | --ugly]
[--print OUTPUT_OPTIONS | --verbose | --headers | --body]
[--style STYLE] [--stream] [--check-status]
[--auth USER:PASS] [--auth-type {basic,digest}]
[--verify VERIFY] [--proxy PROXY] [--allow-redirects]
[--timeout SECONDS] [--traceback] [--debug]
[METHOD] URL [ITEM [ITEM ...]]
http-script.py: error: too few arguments

Here's where the fun happens. The syntax is VERY intuitive. Here I post some JSON to an endpoint that will echo it back.

C:\> http POST http://localhost:50231/api/Contact name=scott age:=100
HTTP/1.1 200 OK
Content-Length: 26
Content-Type: application/json; charset=utf-8
Date: Fri, 17 Aug 2012 21:59:51 GMT
Server: Microsoft-HTTPAPI/2.0

{
"age": 100,
"name": "scott"
}

It's just like using HTTP itself, except from the command line. The best part is that it will take name=value for strings and name:=value for non-strings and turn it into JSON!

HTTPie supports any HTTP Verb, FORM data, raw JSON, and lots of other features. Here's another example:

C:\>http PUT api.example.com/person/1 name=John age:=29 married:=false hobbies:='["http", "pies"]'
PUT /person/1 HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
Host: api.example.com
User-Agent: HTTPie/0.2.7dev

{
"age": 29,
"hobbies": [
"http",
"pies"
],
"married": false,
"name": "John"
}

There's lots more examples here https://github.com/jkbr/httpie/ and I encourage you to check it out. I'll leave you with a lovely PowerShell screenshot showing that HTTPie also does syntax highlighting at the command line!

HTTPie is HTTP for Humans and Syntax Highlights as well

Awesome. Expect to see this tool in all my Web API and JSON demos. Go get it and star it at GitHub.



© 2012 Scott Hanselman. All rights reserved.

Upgrading from Visual Studio 2012 RC to RTM

$
0
0

Now that Visual Studio 2012 and .NET Framework 4.5 have been released, some customers are wondering if they need to uninstall the Visual Studio 2012 Release Candidate (RC) first before upgraded. In general, the answer is “no”. VS2012 RC will upgrade to RTM, but there are a few things to note:

  • You can only upgrade from RC to RTM using the same edition (ex: Ultimate RC to Ultimate RTM).
  • You can only upgrade from RC to RTM on Windows 7 or Windows 2008 R2. VS2012 RTM is not supported on the Windows 8 Release Preview (RP) or older, so Windows 8 RTM needs to be installed first.
  • You cannot upgrade from VS2012 Beta to RTM – only from the RC. You can either upgrade from Beta to RC, or uninstall the Beta before installing RTM.

For more information about compatibility, see our compatibility page on the Visual Studio website.

If you need to uninstall VS2012 RC, we have posted instructions to KB2744926. For the most part, you only need to remove the main program entry in Programs and Features. While we have done a lot to reduce the number of “ARP” entries, some still remain from external partners which are not ref-counted in VS2012.

A certificate chain could not be built to a trusted root authority

$
0
0

This is a preview of a Knowledge Base article. This page will be updated with a link to that KB article as soon as it is published.

Symptom

After Visual Studio 2012 has been installed, the finish page displays the following:

Setup Completed
However, not all features installed correctly.

Please correct the following problems to ensure full product functionality. Click here to see the most common issues and workarounds or here to review the log file.

Microsoft Web Deploy 3.0
A certificate chain could not be built to a trust root authority.

If you click to view the log file and search for “Error”, you will see log lines similar to the following:

[05B0:0500][2012-08-05T14:07:07]: Acquiring package: webdeploy_x64_en_usmsi_902, payload: webdeploy_x64_en_usmsi_902, copy from: D:\packages\WebDeploy\WebDeploy_x64.msi
[04E4:0564][2012-08-05T14:07:08]: Error 0x800b010a: Failed to verify certificate chain policy status.
[04E4:0564][2012-08-05T14:07:08]: Error 0x800b010a: Failed to get certificate chain for authenticode certificate.
[04E4:0564][2012-08-05T14:07:08]: Error 0x800b010a: Failed to verify signature of payload: webdeploy_x64_en_usmsi_902
[04E4:0564][2012-08-05T14:07:08]: Failed to verify payload: webdeploy_x64_en_usmsi_902 at path: C:\ProgramData\Package Cache\.unverified\webdeploy_x64_en_usmsi_902, error: 0x800b010a. Deleting file.
[04E4:0564][2012-08-05T14:07:08]: Error 0x800b010a: Failed to cache payload: webdeploy_x64_en_usmsi_902

Note: Some information contained in your logs will be different than what you see above.

Cause

Some components in Visual Studio 2012 were signed by a Certificate Authority that is not installed on Windows 7 or Windows Server 2008 R2. Computers that are not connected to the Internet also cannot automatically download these certificates.

Resolution

To resolve this problem, please download the root certificate updates referenced in the following Knowledge Base article:

  • 931125 Windows root certificate program members

Note: The update actually applies to Windows XP and Windows Server 2003 and newer, so it will install on Windows 7 and Windows Server 2008 R2 which are the minimum supported Windows versions for Visual Studio 2012.

After you have installed the root certificate update, repair Visual Studio 2012 using the following instructions to install those packages affected by the problem described in this Knowledge Base article:

  1. Go to your Start menu.
  2. Type Programs and Features.
  3. Click Programs and Features in the search results.
  4. Find and select one of the products listed in the “Applies to” section.
  5. Click the Change button on the toolbar.
  6. Click the Repair button.
  7. If prompted, click Continue or Yes to elevate and continue with the installation.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

New root certificate authorities were created after Windows 7 and Windows Server 2008 R2 were released that enable strong signatures using a SHA256 hash. Computers that are connected to the Internet will automatically download these certificates; however, computers that are not connected to the Internet or have not already installed the root certificate update will not have the required certificate authority installed.

Once the updated certificate authorities are installed, repairing Visual Studio 2012 will install any missing components, so Web Deploy 3.0 or any other affected components will be installed.

Applies to

  • Microsoft Visual Studio Express 2012 for Web
  • Microsoft Visual Studio Professional 2012
  • Microsoft Visual Studio Premium 2012
  • Microsoft Visual Studio Ultimate 2012
Viewing all 10804 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>