Friday, April 30, 2010

Migrating from ASP.Net MVC 1 to ASP.Net MVC 2

A pretty good write-up on some of the new feature and/or techniques provided with MVC 2.

http://www.datasprings.com/Resources/ArticlesInformation/MigratingfromASPNetMVC1toASPNetMVC2.aspx

The top categories of MVC2:

  • Areas
  • Templated Helpers
  • Asynchronous Controller
  • RenderAction/Action
  • Validation Options    
    Cited From: Data Springs

    Tuesday, April 27, 2010

    Windows Azure Tools - Development Storage Service Error and Solution

    If you are receiving this error:



    indicating that the Windows Azure Tools - Development Storage Service failed to initialize, then please perform the following steps to resolve the error. Aperently by default the service is searching for SQLExpress.

    Run Windows Azure SDK Command Prompt (as Administrator)
    Enter DSInit /sqlinstance:[your sql instance name]

    As a result this will perform a couple of automated steps for ports, tables, etc. and create your development storage database.

    When it is finished the screen will look like this:


    A Quick 8 Step Example on How to Add an Area using ASP.NET 4.0 MVC 2 and Visual Studio 2010


    Step 1:

    Open Visual Studio 2010 and Select “New Project”, ASP.NET MVC2 Web Application




    Once the project is created it will look similar to what is shown below.





    Step2:

    In the Solution Explorer Window Right Click on the Project File and Click “Add”, then click “Area




    Step3:

    Enter the Area Name such as “Departments




    Note:


    An example of an Area is shown below.




    Code Snippet:


    public class DepartmentsAreaRegistration : AreaRegistration
    {
    public override string AreaName
    {
    get
    {
    return "Departments";
    }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
    context.MapRoute(
    "Departments_default",
    "Departments/{controller}/{action}/{id}",
    new { action = "Index", id = UrlParameter.Optional }
    );
    }
    }


    In addition to this code there is code in the “Global.asax” that is registering your areas as highlighted below.

    protected void Application_Start()
    {
    AreaRegistration.RegisterAllAreas();

    RegisterRoutes(RouteTable.Routes);
    }


    Step4:

    In the Solution Explorer Window Right Click on the Areas/[YourArea]/Controllers and Click “Add”, then click “Controller”. For this example the path would be “Areas/Departments/Controllers/




    Step 5:

    REPEAT STEP 4 FOR EACH CONTROLLER NEEDED. For this example create (3) three HR, IT, and Marketing.




    Step6:


    Next Add a View by right-clicking on the "Index" method in the appropriate controller and selecting “Add View”.









    Step7:

    REPEAT STEP 6 FOR EACH VIEW NEEDED. For this example create (3) three one for each respective controller.




    Note:


    Once this is complete you will now see the appropriate structure located in the Views Folder in the Solution Explorer.



    Step8:


    Run the project and navigate to the appropriate location:

    http://localhost:[yourport]/Departments/HR

    http://localhost:[yourport]/Departments/IT


    http://localhost:[yourport]/Departments/Marketing


    Hopefully this guide was useful as a quick 8 Step dive into the New "Areas" introduced with Microsoft Visual Studio 2010, ASP.NET and MVC 2.

    tangible T4 Editor plus modeling tools for VS 2010

    These tools are awesome!!!

    tangible T4 Editor plus modeling tools for VS 2010

    MVC 2 Architecture



    Cited from: ASP.NET MVC 2: Ninja Black Belt Tips by Scott Hanselman

    Monday, April 26, 2010

    Windows Azure Platform Benefits for MSDN Subscribers

    Included is a link to Microsoft's site for this information.

    Windows Azure Platform Benefits for MSDN Subscribers

    (from Microsoft's Site - All content is theirs.)

    Tuesday, April 20, 2010

    Visual Studio 2010 - Publish Details and Output for detailed troubleshooting

    Have you ever had Visual Studio tell you your web application publish failed, but never gives you a reason why? You’re not alone. I’ve been putting off looking into this issue on a project and just found a way to get my answer right away.

    Visual Studio 2010 Publish Fails

    Here’s what you should do inside of Visual Studio to find out why your publish failed.

    1. Click the Tools menu > then Options to bring up the Options dialog.
    2. Expand ‘Projects and Solutions’ on the left and click General
    3. On General, click ‘Show Output window when build starts’
    4. Now click on ‘Build and Run’ in the left tree
    5. Next select a value from the ‘MSBuild project build output verbosity’ drop down menu
    6. OK your way back to the main Visual Studio window
    7. The next time you Build or Publish your project, you should see the Output panel pop up. If your publish is still failing, the answer will live inside the Output panel

    Windows7, Vault, and SQL Server 2008 Issues - Resolution


    If you are getting the following error, then try these steps to correct the issue.

    regsvr32 actxprxy.dll

    If that does not work try:

    for %1 in (%windir%\system32\*.dll) do regsvr32 /s %1

    for %1 in (%windir%\system32\*.ocx) do regsvr32 /s %1

    If that still does not work try this as a final step.

    http://support.sourcegear.com/viewtopic.php?f=5&t=12680&p=52790&hilit=management+studio#p52790

    x86: regsvr32 "C:\Program Files\Internet Explorer\ieproxy.dll"

    x64: regsvr32 "C:\Program Files (x86)\Internet Explorer\ieproxy.dll"

    Interestingly enough I had to perform all of these steps to correct the issue.

    Sunday, April 18, 2010

    Software Architecture Assessment Outline

    The primary goal of this software architecture assessment outline is to help identify and recommend how to increase the software quality while lessening the overall maintenance needs from both software and hardware perspectives. To perform this assessment several major categories will be reviewed in combination with a weighted measurement factor for each category and rolled up into one final summary.

    General Software Architecture Assessment Categories

    Included in this outline are further definitions of each of the software assessment categories evaluated. Within each section is a detailed explanation of the category relevant to this document, a design /architectural principles section, measurement factors, and a score summary.

    For this outline only a high-level software architecture assessment is being applied. However, the measurement factors will most likely be evaluated as a part of a more detailed architectural analysis. For the purpose of this assessment, the measurement factors were considered, but not effectively evaluated in all code modules.

    Performance

    The performance of an application is generally categorized as how well the application responds to simultaneous events. The performance can also be viewed as how well the application responds after a certain interval of time.

    Design/Architectural Principles Evaluated

    • Connection Pooling

    • Load Balancing

    • Distributed Processing

    • Caching

    • Object Instantiation

    • Transaction concurrency

    • Process Isolation

    • Replication of Data

    Measurement Factors

    • Transactions per unit time

    • Amount of time it takes to complete a transaction

    Reliability

    Application reliability represents how well the system continues to operate over time in the context of application and system errors in situations of unexpected or incorrect usage. The reliability of the system can be viewed as how well overall the system performs based on a predictable set of factors.

    Design/Architectural Principles Evaluated

    • Using preventive measures
    o Recycling of server processes in IIS.6 ASP.NET /COM+ 1.5
    o Containment - COM+ server process isolation
    o Database transaction logs (rollback)

    Measurement Factors

    • Mean-time to failure

    Availability

    Availability refers to the ability of the user community to access the system, whether to submit new work, update or alter existing work, or collect the results of previous work. If a user cannot access the system, it is said to be unavailable. Generally, the term downtime is used to refer to periods when a system is unavailable.

    Design/Architectural Principles Evaluated

    • Fail-over

    • Transaction Manager

    • Stateless Design

    Measurement Factors

    • Length of time between failures

    • How quickly the system is able to resume operation in the event of failure.

    Security

    Application security encompasses measures taken to prevent exceptions in the security policy of an application or the underlying system (vulnerabilities) through flaws in the design, development, or deployment of the application.

    Applications only control the use of resources granted to them, and not which resources are granted to them. They, in turn, determine the use of these resources by users of the application through application security.

    Design/Architectural Principles Evaluated

    • Authorization

    • Authentication

    • Auditing

    • Integrity

    • Confidentiality

    • Denial-of-service

    • Data Isolation

    Measurement Factors

    • N/A

    Portability

    Portability is one of the key concepts of high-level programming. Portability is the software codebase feature to be able to reuse the existing code instead of creating new code when moving software from an environment to another. The pre-requirement for portability is the generalized abstraction between the application logic and system interfaces. When one is targeting several platforms with the same application, portability is the key issue for development cost reduction

    Design/Architectural Principles Evaluated

    • Virtual machines

    • Functionality

    Measurement Factors

    • Number change request

    Change Management

    The change management process in systems engineering is the process of requesting, determining attainability, planning, implementing and evaluation of changes to a system. There are two main goals concerning change management. The main goals include, supporting the processing of changes, and enabling traceability of changes, which should be possible through proper execution of the process of the system or application.

    Design/Architectural Principles Evaluated

    • Client-Server

    • Independence of interface from implementation

    • Strategy Separation

    • Encoding function into data meta-data and language interpreters

    • Runtime Discovery

    Measurement Factors

    • Using specific changes as benchmarks and recording how expensive those changes are to implement

    Extensibility

    In software engineering, extensibility (sometimes confused with forward compatibility) is a system design principle where the implementation takes into consideration future growth. It is a systemic measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be through the addition of new functionality or through modification of existing functionality. The central theme is to provide for change while minimizing impact to existing system functions.

    In systems architecture, extensibility means the system is designed to include hooks and mechanisms for expanding/enhancing the system with new capabilities without having to make major changes to the system infrastructure. A good architecture provides the design principles to ensure this—a roadmap for that portion of the road yet to be built. Note that this usually means that capabilities and mechanisms must be built into the final delivery, which will not be used in that delivery and, indeed, may never be used. These excess capabilities are not frills, but are necessary for maintainability and for avoiding early obsolescence.

    Design/Architectural Principles Evaluated

    • Easy incremental additions of functionality

    • Coupling/cohesion

    • Conceptual Integrity

    Measurement Factors

    • N/A

    Interoperability

    Interoperability is a property referring to the ability of diverse systems and organizations to work together (inter-operate). The term is often used in a technical systems engineering sense, or alternatively in a broad sense, taking into account social, political, and organizational factors that impact system-to-system performance.

    Design/Architectural Principles Evaluated

    • Simple data-types

    • XML

    • RSS

    • Web Services

    • Windows Communication Foundation

    • .Net Remoting

    Measurement Factors

    • General overview of service oriented architecture

    Usability and Standards

    Usability and software standards enable software to interoperate seamlessly and cohesively. Many things are (somewhat) arbitrary, so the important thing is that everyone agrees on what they are and represent within an organization. Usability and software standards are one of the unsolved problems in software engineering.

    The key factor evaluated is the incorrect implementation of standards or specifications. Many organizations result in a requirement for implementation specific code and special case exceptions as a necessity for cross-platform interoperability. Notable modern examples include web browser compatibility and web-services interoperability. The arbitrariness of most software concepts, which is related to historical hardware and software implementation, lack of common standards worldwide, and economic pressures.

    Design/Architectural Principles Evaluated

    • User Interface Standards

    • Coding Standards

    • Deployment Standards

    • Security Standards

    • Database Standards

    • Service Oriented Architecture Standards

    Measurement Factors

    • Number of errors made by a user familiar with prior releases or other members of the product line

    Maintainability

    In software testing, based on the definition given in ISO 9126, the ease with which a software product can be modified in order to, correct defects, meet new requirements, make future maintenance easier, or cope with a changed environment.

    Design/Architectural Principles Evaluated

    • Localization

    • Globalization

    • Effects of change

    Measurement Factors

    • N/A

    Efficiency
    In software engineering, the efficiency of an application is defined as how well the application has been coded in order to be efficient. The efficiency is often handled by acquiring resources during the initial load of an application such as a splash screen and then releasing resources throughout the application.

    Design/Architectural Principles Evaluated

    • Acquire late, release early

    • Reducing round-trips

    • Lowering traffic throughput

    Measurement Factors

    • N/A

    Testability

    The testability of an application refers to how easy it is to test and validate the code as a unit, sub-system or application. Using key tools such as automated testing tools for unit testing, white box and black box testing are also considered when evaluating the overall testability of a particular system.

    Tests are applied at several steps in the hardware manufacturing flow and, for certain products, may be used for hardware maintenance in the customer’s environment. The tests generally are driven by test programs that execute in Automatic Test Equipment (ATE) or, in the case of system maintenance, inside the assembled system itself. In addition to finding and indicating the presence of defects (i.e., the test fails), tests may be able to log diagnostic information about the nature of the encountered test fails. The diagnostic information can be used to locate the source of the failure.

    Testability plays an important role in the development of test programs and as an interface for test application and diagnostics. Automatic test pattern generation, or ATPG, is much easier if appropriate testability rules and suggestions have been implemented.

    Design/Architectural Principles Evaluated

    • Test plans

    • Code implemented unit test scripts

    • Build server automation

    • Interface-based programming

    • Inversion of control/Dependency injection

    • Classes with well defined responsibilities

    Measurement Factors

    • N/A

    Reusability

    In computer science and software engineering, reusability is the likelihood a segment of source code can be used again to add new functionalities with slight or no modification. Reusable modules and classes reduce implementation time, increase the likelihood that prior testing and use has eliminated bugs and localizes code modifications when a change in implementation is required.

    Subroutines or functions are the simplest form of reuse. A chunk of code is regularly organized using modules or namespaces into layers. Proponents claim that objects and software components offer a more advanced form of reusability, although it has been tough to objectively measure and define levels or scores of reusability.

    The ability to reuse relies in an essential way on the ability to build larger things from smaller parts, and being able to identify commonalities among those parts. Reusability is often a required characteristic of platform software.

    Reusability implies some explicit management of build, packaging, distribution, installation, configuration, deployment, and maintenance and upgrade issues. Software reusability more specifically refers to design features of a software element (or collection of software elements) that enhance its suitability for reuse.

    Design/Architectural Principles Evaluated

    • Code components are reusable

    • Use Enterprise Libraries

    • Use stored procedures

    • Reuse of User Controls

    • Reuse of Web User Controls

    • Use of common services

    • Use of business objects

    Measurement Factors

    • N/A


    Ease of deployment

    Software deployment is all of the activities that make a software system available for use. The general deployment process consists of several interrelated activities with possible transitions between them. These activities can occur at the producer site or at the consumer site or both. Because every software system is unique, the precise processes or procedures within each activity can hardly be defined. Therefore, "ease of deployment" can be interpreted as a general process that has been customized according to specific requirements or characteristics to aid and assist in the overall ease of deploying the specific software.

    Design/Architectural Principles Evaluated

    • Deployment mechanism

    • Installation programs

    • Automated updates

    • Hot-fix deployment

    Measurement Factors

    • Can be measured by the time and resources required to install the product and /or distribute a new unit of functionality

    Ease of administration
    The ease of administration refers to the infrastructure, tools, and staff of administrators and technicians needed to maintain the health of the application. The ease of administration would include items such as being able to change the physical locations of services while having a minimal impact on the rest of the system.

    Design/Architectural Principles Evaluated

    • N/A

    Measurement Factors

    • Decreased Support Cost: can be measured by comparing number of help desk calls for a standard period of time

    Scalability

    In software engineering scalability is a desirable property of a system, a network, or a process, which indicates its ability to handle growing amounts of work in a graceful manner, or to be readily enlarged. For example, it can refer to the capability of a system to increase total throughput under an increased load when resources (typically hardware) are added.

    Scalability, as a property of systems, is generally difficult to define and in any particular case, it is necessary to define the specific requirements for scalability on those dimensions, which are deemed important. An algorithm, design, networking protocol, program, or other system is said to scale if it is suitably efficient and practical when applied to large situations (e.g. a large input data set or large number of participating nodes in the case of a distributed system). If the design fails when the quantity increases then it does not scale.

    The ability to support more users while maintaining the same level of performance, user demand, and business complexity would be considered scalable. The system must ale to extend the minimum hardware configuration needed for the application with additional hardware to support increased workloads.

    Design/Architectural Principles Evaluated

    • Stateless design

    • Load-balancing

    • Concurrency (optimistic)

    • Serialization

    Measurement Factors

    • N/A

    Debug-ability / Monitoring

    Debugging and monitoring is a name for design techniques that add certain testability features to a microelectronic hardware product design. The premise of the added features is that they make it easier to develop and apply manufacturing tests for the designed hardware. The purpose of manufacturing tests is to validate that the product hardware contains no defects that could otherwise, adversely affect the products correct functioning.

    Design/Architectural Principles Evaluated

    • Tracing support

    • Logging in exception handling mechanism

    • Alerting/notification mechanism

    Create and Install Visual Studio Project Templates

    How to create an item template

    http://msdn.microsoft.com/en-us/library/ms247113(VS.80).aspx

    How to get VS to locate the item template

    http://msdn.microsoft.com/en-us/library/y3kkate1(VS.80).aspx

    How to install your custom templates

    My Documents\Visual Studio 2005\Templates\ProjectTemplates\Language\

    In order to have a VS item template appear, you need to make sure that you run "devenv.exe /installvstemplates" after you have copied the .zip file containing your .vstemplate and template code file into the %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\ folder.

    Saturday, April 17, 2010

    How to Create Restart, Shutdown, Sleep Icons in Windows 7

    This entry will show you How to Create Lock Restart & Shutdown Icons in Windows 7. This process is as simple as creating a shortcut, adding a command to that shortcut, then simply adding an icon to accompany it. Let me show you how to do it with the shutdown button.



    Right click the Desktop

    New

    Shortcut

    Enter in the browse location

    Shutdown.exe -s -t 00

    Name the shortcut 'Shutdown'

    Now right click the new shortcut

    Properties

    Change Icon*

    Choose the Shutdown Icon

    Ok


    * NOTE: If you do not have a list of icons go back to step #9 and enter this in the browse section: %SystemRoot%\System32\shell32.dll


    quote:
    --------------------------------------------------------------------------------

    Windows 7 System Command Lines

    Shutdown Command - Shutdown.exe -s -t 00

    Restart Command - Shutdown.exe -r -t 00

    Lock Workstation Command - Rundll32.exe User32.dll,LockWorkStation

    Hibernate Workstation Command - rundll32.exe PowrProf.dll,SetSuspendState

    Sleep Computer Command - rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    --------------------------------------------------------------------------------

    Visual Studio 2010 Ultimate, Premium, Professional

    Visual Studio 2010 Ultimate, Premium, Professional




    Friday, April 16, 2010

    Open Visual Studio 2008 Applications in Visual Studio 2010

    Visual Studio 2010 allows you to target previous versions of the CLR/.NET framework at the project level.

    When you open the Visual Studio 2008 project file in Visual Studio 2010 it will convert the project file for you. Once this is done, it will be smart enough to target the proper framework and runtime version for you (.NET 3.5 and CLR 2). If it doesn't, you can change this yourself on the property sheet for the project.




    This is what the option will be after the solution file(s) are updated.

    Silverlight 4 Release Now Available!

    Silverlight is a powerful development platform for creating engaging, interactive user experiences for Web, desktop, and mobile applications when online or offline. Silverlight is a free plug-in, powered by the .NET framework and compatible with multiple browsers, devices and operating systems, bringing a new level of interactivity wherever the Web works. For information on the new features in Silverlight, and how it compares to previous versions, be sure to visit the overview and feature matrix page. For additional information, including details on the features, visit the Silverlight 4 Information Page.

    Silverlight and XNA are the two programming models for Windows Phone 7 devices. Once you have the bits, visit our section on developing for Windows Phone 7 with Silverlight. Silverlight is also available for Nokia Symbian mobile phones.

    Get Started with Silverlight with One Install

    If you already have Visual Studio 2010 installed, get everything you need for Silverlight 4 RTW by downloading the Silverlight 4 Tools RC2 for Visual Studio.



    Start Learning Silverlight

    1. Watch the Getting Started Video

      Tim Heuer introduces the concepts and tools needed to get started with Silverlight development from a developers perspective. (13:02)

    2. Read Tim Heuer's 8-part blog series on getting started

      Tim's blog posts will walk you through the fundamentals of Silverlight and will help you build a sample application along the way. Each step includes source code as well as C# and Visual Basic code for the completed application.

    3. Watch How Do I Videos

      Over two dozen new Silverlight 4 videos including Jesse Liberty's new Silverlight 4 From Scratch series.

    4. Read Jesse Liberty's Tutorials

      Learn more about Silverlight with Jesse's tutorial series.

    5. Learn to use Expression Blend

      Read Adam Kinney's tutorials in “Through the Eyes of Expression Blend" to understand the key features of Expression Blend, then watch Jesse Liberty's 3-part video series on the same subject.

    Other Useful Tools

    Once you're up and running with Silverlight, you'll find these optional tools to be a terrific addition.

    1. Developer Runtimes for Windows and OSX

      If you’re debugging or testing on machines without the tools installed, you’ll want to use the windows developer runtime or the Mac OSX developer runtime for Silverlight 4. Developers with the tools installed already have these releases.

    2. Microsoft Expression Blend 4 RC

      Expression Blend allows designers to graphically create UI's for Silverlight applications.

    3. Silverlight Toolkit

      This Toolkit is a Microsoft project containing Silverlight controls, components and utilities that can be downloaded and used in your Silverlight applications. It includes full source code, samples and tests.

    Thursday, April 15, 2010

    Installing SQL 2008 on Windows 7

    SQL Server 2008 on Windows 7

    SQL Server 2008 will install on Windows 7 and it works just fine – although you may need to reboot Window 7 before successfully installing SQL Server 2008.

    Invoke or BeginInvoke cannot be called on a control until the window handle
    has been created.

    Once you succeed in getting the installer to run, you will see the Program Compatibility Assistant appear with this warning:

    image

    It’s nothing to worry about. It’s just a friendly reminder that once the SQL Server 2008 installation completes, it must be followed up by an installation of SQL Server 2008 Service Pack 1 or later. Service Pack 1 is available here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19

    The version of Books Online that comes with SQL Server 2008 is outdated, so you might want to do a custom install and leave it out. The most current BOL is found here: http://www.microsoft.com/downloads/details.aspx?FamilyId=765433F7-0983-4D7A-B628-0A98145BCB97&displaylang=en

    SQL Server 2008 doesn’t come with sample databases. Instead, they are obtained from Codeplex: http://www.codeplex.com/MSFTDBProdSamples

    You can extend the spatial data functionality in SQL Server 2008 by installing these additional functions: http://sqlspatialtools.codeplex.com/Wiki/View.aspx?title=Current%20Contents. If you have MapPoint 2009 installed on a 32-bit OS, you might also be interested in this MapPoint add-in for SQL Server 2008: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=895c3de5-efc9-43a2-bd4e-7e4448c1fb96 (If you use 7-Zip to extract the files from the exe and then use Orca to remove the Launch Condition from the msi, you can install it on 64-bit systems but it won’t perform as well.)

    Those last few items really don’t have anything to do with Windows 7, but since this post is about installing SQL Server 2008, I wanted to provide you with a comprehensive list.

    What's New in the Visual Studio 2010 Editor



    Enhanced Docking Behavior

    Document windows are no longer constrained to the editing frame of the integrated development environment (IDE). You can now dock document windows to the edges of the IDE, or move them anywhere on the desktop (this includes a second monitor). If two related document windows are open and visible, for example, a designer view and an editor view of the same Windows Form, changes that were made in one window will immediately take effect in the other window.

    Tool windows can now move freely between docking at the edges of the IDE, floating outside the IDE, or filling part or all of the document frame. They remain in a dockable state at all times.

    For more information, see How to: Arrange and Dock Windows.

    Zoom

    In any code editing window or text editing window, you can quickly zoom in or out by pressing and holding the CTRL key and moving the scroll wheel on the mouse. You can also zoom textual tool windows, for example, the Output window. The zoom feature does not work on design surfaces or on tool windows that contain icons, for example, the Toolbox or Solution Explorer.

    Box Selection

    In previous releases of Visual Studio, you could select a rectangular region of text by holding down the Alt key while selecting a region with the mouse. You could then copy or delete the selected text. VS 2010 adds the following new capabilities to the box selection feature:

    • Text insertion: Type into a box selection to insert the new text on every selected line.

    • Paste: Paste the contents of one box selection into another.

    • Zero-length boxes: Make a vertical selection zero characters wide to create a multi-line insertion point for new or copied text.

    You can use these capabilities to rapidly operate on groups of statements, such as changing access modifiers, setting fields, or adding comments. For more information, see How to: Select and Change Text.

    Call Hierarchy

    Call Hierarchy, which is available in Visual C# and Visual C++, displays the following parts of your code so that you can navigate through it more effectively:

    • Calls to and from a selected method, property, or constructor.

    • Implementations of an interface member.

    • Overrides of a virtual or abstract member.

    This can help you better understand how code flows, evaluate the effects of changes, and explore possible execution paths by examining complex chains of method calls and other entry points in several levels of code.

    Call Hierarchy is available at design time, unlike the call stack that is displayed by the debugger.

    The member name appears in a pane of the Call Hierarchy window. If you expand the member node, Calls To member name and Calls From member name subnodes appear. If you expand the Calls To node, all members that call the selected member are displayed. If you expand the Calls From node, all members that are called by the selected member are displayed. You can also expand the subnode members into Calls To and Calls From nodes. This lets you navigate into the stack of callers.

    For more information, see Call Hierarchy.

    Navigate To

    You can use the Navigate To feature to search for a symbol or file in the source code.

    Navigate To lets you find a specific location in the solution or explore elements in the solution. It helps you pick a good set of matching results from a query.

    You can search for keywords that are contained in a symbol by using Camel casing and underscore characters to divide the symbol into keywords.

    For more information, see How to: Search for Objects, Definitions, and References (Symbols).

    Highlighting References

    When you click a symbol in the source code, all instances of that symbol are highlighted in the document.

    The highlighted symbols may include declarations and references, and many other symbols that Find All References would return. These include the names of classes, objects, variables, methods, and properties.

    In Visual Basic code, keywords for many control structures are also highlighted.

    To move to the next or the previous highlighted symbol, press CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW.

    For more information, see How to: Use Reference Highlighting.

    Generate From Usage

    The Generate From Usage feature lets you use classes and members before you define them. You can generate a stub for any undefined class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code, This minimizes interruption to your workflow.

    Generate From Usage supports programming styles such as test-first development.

    For more information, see Generate From Usage.

    IntelliSense Suggestion Mode

    IntelliSense now provides two alternatives for IntelliSense statement completion, completion mode and suggestion mode. Use suggestion mode for situations where classes and members are used before they are defined.

    In suggestion mode, when you type in the editor and then commit the entry, the text you typed is inserted into the code. When you commit an entry in completion mode, the editor shows the entry that is highlighted on the members list.

    When an IntelliSense window is open, you can press CTRL+ALT+SPACEBAR to toggle between completion mode and suggestion mode.

    What's New in Visual C# 2010

    This blog lists the new and enhanced features available in Visual C# 2010. The new features work together to improve Microsoft Office programmability, increase your ability to explore code, provide support for test-driven development, and more. For more information, see Visual Studio 2010 Product Highlights.

    Click the links in the following sections to read more about a feature.

    C# 4.0 Language and Compiler
    --------------------------------------------------------------------------------

    Dynamic Support
    Visual C# 2010 provides support for late binding to dynamic types by introducing a new type, dynamic. This addition enables many new scenarios, including simplified access to COM APIs such as the Office Automation APIs, to dynamic APIs such as IronPython libraries, and to the HTML Document Object Model (DOM). For more information, see Using Type dynamic (C# Programming Guide) and dynamic (C# Reference).

    Office Programmability
    Access to COM interfaces, including the Office Automation APIs, is greatly enhanced by the addition of named and optional arguments, the dynamic type, indexed properties and optional ref modifiers.

    For more information, see Named and Optional Arguments (C# Programming Guide), Using Type dynamic (C# Programming Guide), How to: Use Indexed Properties in COM Interop Programming (C# Programming Guide), and How to: Access Office Interop Objects by Using Visual C# 2010 Features (C# Programming Guide).

    Type Equivalence Support
    You can now deploy an application that has embedded type information instead of type information that is imported from a Primary Interop Assembly (PIA). With embedded type information, your application can use types in a runtime without requiring a reference to the runtime assembly. If various versions of the runtime assembly are published, the application that contains the embedded type information can work with the various versions without having to be recompiled. For more information, see /link (C# Compiler Options). For an example, see Walkthrough: Embedding Types from Managed Assemblies (C# and Visual Basic).

    Covariance and Contravariance
    Covariance enables you to use a more derived type than that specified by the generic parameter, whereas contravariance enables you to use a less derived type. This allows for implicit conversion of classes that implement variant interfaces and provides more flexibility for matching method signatures with variant delegate types. Variant interfaces and delegates can be created by using the new in and out language keywords. The .NET Framework also introduces variance support for several existing generic interfaces and delegates, including the IEnumerable(Of T) interface and the Func(Of TResult) and Action(Of T) delegates. For more information, see Covariance and Contravariance (C# and Visual Basic).

    New Command-Line Options
    The /langversion command-line option causes the compiler to accept only syntax that is valid in the specified version of C#.

    The /appconfig compiler option enables a C# application to specify the location of an assembly's application configuration file to the compiler.

    Visual C# Integrated Development Environment
    --------------------------------------------------------------------------------

    The following sections describe enhancements to the Visual Studio integrated development environment (IDE).

    Call Hierarchy
    Call Hierarchy enables you to navigate through your code by displaying the following:

    •All calls to and from a selected method, property, or constructor

    •All implementations of an interface member

    •All overrides of a virtual or abstract member

    This enables you to better understand how code flows and to evaluate the effects of changes to code. For more information, see Call Hierarchy.

    Navigate To
    You can use the Navigate To feature to search for a symbol or file in source code. You can search for keywords that are contained in a symbol by using Camel casing and underscore characters to divide the symbol into keywords.

    For more information, see How to: Search for Objects, Definitions, and References (Symbols).

    Highlighting References
    When you click a symbol in source code, all instances of that symbol are highlighted in the document. To move to the next or previous highlighted symbol, you can use CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW. For more information, see How to: Use Reference Highlighting.

    Generate From Usage
    The Generate From Usage feature enables you to use classes and members before you define them. Without leaving your current location in code, you can generate a stub for a class, constructor, method, property, field, or enum that you want to use but have not yet defined. This minimizes interruption to your workflow.

    Generate From Usage supports programming styles such as test-first development. For more information, see Generate From Usage and Walkthrough: Test-First Support with the Generate From Usage Feature.

    IntelliSense Suggestion Mode
    IntelliSense now provides two alternatives for IntelliSense statement completion: completion mode and suggestion mode. Suggestion mode is used when classes and members are used before they are defined. For more information, see List Members.

    Live Semantic Errors
    The Live Semantic Errors feature has been enhanced in Visual C# 2010. The use of wavy underlines to signal errors and warnings as you type has been extended to include constructs that are outside of method bodies, such as return types, parameter types, and default values in method declarations.

    ASP.NET MVC 2 Features

    • New Strongly Typed HTML Helpers
    • Enhanced Model Validation support across both server and client
    • Auto-Scaffold UI Helpers with Template Customization
    • Support for splitting up large applications into “Areas”
    • Asynchronous Controllers support that enables long running tasks in parallel
    • Support for rendering sub-sections of a page/site using Html.RenderAction
    • Lots of new helper functions, utilities, and API enhancements
    • Improved Visual Studio tooling support