Posts Tagged ‘visual studio 2010’

Microsoft Releases Visual Studio 2010 RC

Visual Studio 2010 or VS 2010 is one of the powerful Integrated Development Environment (IDE) ever developed by Microsoft. Even though the beta version was a big hit, testers reported sluggish performance compared to VS2008, buggy or missing functionality, issues with memory consumption and stability concerns. Those issues caused Microsoft to push back the intended March launch event, and release the public RC build.

Testers who downloaded Release Candidate version have reported good feedback and indicated that it is much more faster and has lot of performance improvements.  The VS2010 launch event, planned for April 12 at DevConnections, is not confirmed as the date of the VS2010/.NET 4 RTM, although Microsoft would like to release the new development environment in that timeframe. The timing of the RTM “partly depends” on the developer feedback that Microsoft receives on the VS2010/ .NET 4 RC, according to Guthrie.

In VS2010 Beta 2, many developers reported issues when working with XAML and Windows Presentation Foundation and Silverlight. The VS2010 RC supports Silverlight 3.0 apps. Silverlight 4.0, still in beta, is not supported in this release.

“We will be adding VS 2010 RC support for SL4 with the next public Silverlight 4 drop,” explained Guthrie. “If you are doing active Silverlight 4 development today we recommend staying with the VS10 Beta 2 build for now.”

The VS2010 RC can be installed on machines with VS2005 and VS2008, but you need to remove VS2010 Beta 2 and .NET 4 Beta 2, according to Microsoft. MSDN subscribers can download the RC of VS2010 and .NET 4 here.

Microsoft is also working with companies that supply widely used third-party add-ins—ReSharper, CodeRush and Whole Tomato– to ensure that the tooling works as advertised in the new IDE. “We’ve still got more work to do here but are making great progress,” said Zander.

Right now the downloads are available only to MSDN subscribers.  Starting Wednesday (Feb 10th) everyone will be able to download them (regardless of whether you are a MSDN subscriber or not).

Related Links

http://visualstudiomagazine.com/articles/2010/02/09/microsoft-releases-vs2010-rc.aspx

http://weblogs.asp.net/scottgu/archive/2010/02/08/vs-2010-net-4-release-candidate.aspx

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - February 10, 2010 at 5:19 am

Categories: visual studio 2010   Tags: , ,

How do I build a C# application using Command Line Compiler?

Microsoft’s .NET SDK ships with a command line compiler called csc.exe. It can be executed from within the DOS prompt. In this article, I will show you how to build a simple C# program using this compiler with Notepad as the editor.

Open your editor and enter the code as given in listing 1

Listing 1

001: // HelloWorld.cs
002: // -------------
003: using System;
004: class HelloWorld
005: {
006: public static void Main()
007: {
008: Console.WriteLine("Hello World");
009: }
010: } 

The line numbers are given only for the sake of explanation and does not form part of the source code.

In the above listing, Line 3 defines the namespace System. Line 4 declares our class named HelloWorld. Line 6 defines the Main() method, which is considered as a entry point for all C# programs. Line 8 calls the WriteLine() method of the Console class and prints "Hello World" as output.

Save the file as HelloWorld.cs and compile the code using a C# compiler. I assume you are using the compiler which ship with .NET SDK. For this purpose, you have to give the following command at the DOS prompt as shown in the figure given below

csc HelloWorld.cs 

Figure 1

c#, visual c#, visual studio, mono

If you have installed Visual Studio 2008, you can compile a C# program using Visual Studio Command Prompt. You can launch it from Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio Tools

If you have installed Mono C# Compiler then you should compile the above program using the following command:

mcs HelloWorld.cs 

If there are any errors and warnings, the compiler will display them during the above process. You have to go through all those messages and correct them preferably by going back to the source code. As explained earlier, C# is a case sensitive language and hence even if you miss a semicolon or a comma, the compiler will throw error messages. If there are no errors and warnings your screen would look like as shown in the figure given above.

To view the output of the above program, you have to supply the name of the assembly (HelloWorld.exe) at the DOS prompt.

For example, you have to give the following command for executing the above program.

HelloWorld 

The output will be as shown in the figure given below

Figure 2

c#, visual c#, visual studio, mono

For mono compiler, the execution statement will be as shown below:

mono HelloWorld.exe 

An Assembly is a file which is created by the compiler upon successful compilation of every C# application.

Commenting the Code

If you look at line numbers 1 and 2 in the above code, you would see two slash lines at the beginning. In programming terminology, these lines are called as comments. C# compiler won’t compile the statements inside these comments and they are given only for documentation and reference purposes. It is a best practice to give comments while coding as it will help you to study the code at a later stage or for others who look at your code.

There are three ways by which you can give comments in C#. The first two will be already familiar to you if you had worked with C++ and Java. They are single-line and multiline comments.

Single-line comments are given with the symbol //, while Multiline comments are applied with /*…..*/ symbols and can spread more than one line (See Listing 2)

Listing 2

// this is a single line comment
/*
This is a
Multiline
Comment
*/

The third type of comment which is given with “///” is a new one introduced by the .NET Framework. It is used to generate documentation for your C# program and they are denoted by using the relevant XML tags as shown in listing 3:

Listing 3

/// <summary>
/// this is a new comment system
/// <summary>

 

microsoft, c#, java

Technorati Tags: , ,

3 comments - What do you think?  Posted by Anand Narayanaswamy - June 22, 2009 at 7:57 am

Categories: C#, Channels, Latest   Tags: , , , ,

What are the different editors that are available for C# programming?

Once you have installed a C# compiler, the next process is to choose an editor to enter source codes. There are different types of editors such as Notepad and Visual C#. In addition to these two, many third party vendors have also developed editors for programming with C#. This FAQ briefly discusses each one of these editors.

Notepad is a commonly used editor among many programmers. It comes with Windows and it is very easy to use as well. But there are lots of disadvantages with this editor like it doesn’t supports syntax coloring and other features such as intellisense. Moreover, you cannot directly compile and execute a C# program from within the editor. Although it doesn’t support features such as line numbering, you can jump to a specific line of the code by using the CTRL+G shortcut.

Microsoft Visual Studio is a full featured development tool and it includes project templates for all .NET languages in an Integrated Development Environment (IDE). Other than C#, the IDE supports the development of major .NET languages such as Visual Basic , Visual J#  and Visual C++. In other words, it provides a single development environment for all these languages. You need to master the various elements found on the IDE such as Toolbox, Properties window apart from learning the C# language.

Will I get Visual C# as a separate product?

Yes. Microsoft sells a standard version of the product named “Visual C# .NET Standard Edition” at a reduced price. It comes with four CD’s along with a printed manual. This product doesn’t supports advanced features such as Crystal Reports which is available with Visual Studio. This product is a big boon for developers with limited budget.
Visual C# .NET provides you with the required templates and wizards for building applications. It also supports features such as Intellisense and Dynamic Help. Dynamic Help is a new functionality which will provide you help according to the relevant situation while developing a project. It will be available only if you have installed MSDN Library collection. Moreover, it ships with powerful debugging capabilities and automatic syntax/clause completion features. For instance, if you enter the keyword “try”, remaining clauses like catch and finally will be automatically get listed on the code editor.

What do you mean by IntelliSense?

IntelliSense refers to popping up of methods and properties according to the context. For instance, if you enter Console followed by a dot, a menu automatically pops up, which gives you all the methods and properties of the Console class. You should already be aware of this useful feature, if you had used any of the languages in Visual Studio 6.0.

Where will I get MSDN Library?

MSDN Library ships with all editions of Visual Studio. You will be automatically prompted to install the same after the installation of Visual Studio. You will get periodic updates of the library if you have subscribed to MSDN. Alternatively, you can access the library online at any time. The biggest advantage of using Visual C# is that it significantly reduces the development time of projects by integrating all parts of a project under a single roof. Even though there are lots of benefits, Visual C# is not compulsorily required for programming with C#.

In addition to Visual C#, many third party vendors have also released editors for C#. They can be downloaded from the websites of the respective vendors. One of the most popular editors is SharpDevelop. It supports syntax coloring, compilation and execution from the IDE apart from other features. With the help of this editor, you can also build Visual Basic, User controls and Web Services applications. You can also create XML and XSL files. Moreover, the developers of SharpDevelop have provided the complete source code for this editor under an Open Source License Agreement. The product and its source code can be downloaded from www.isharpdevelop.com.

Another editor is Antechinus C# editor developed by c-point but it is not as much popular due to its limited capabilities. Some of the other popular editors are given below

Borland C# Builder
CodeWright
EditPlus

Even though there are many editors available on the market its up to you to decide which editor to use. I strongly recommend you to install one editor and learn the language completely.

3 comments - What do you think?  Posted by Anand Narayanaswamy - June 12, 2009 at 12:29 am

Categories: C#, Channels, Latest   Tags: , , , , , , ,

FAQ 4 – What is Common Language Runtime?

Common Language Runtime shortly called as CLR provides a universal execution engine for .NET applications and it is provided by the .NET Framework. Every target computer should require CLR for executing .NET applications. One of the most interesting points to note is that the CLR itself manages the life of objects. This is the effect of Automatic Garbage Collection system built into it. When the CLR finds an object that is not being used, it destroys them and thus freeing memory allocation.

The corresponding compilers (C#, Visual Basic .NET) generate meta code upon successful compilation. This meta code contains lot of information about code types, its members and references used. The CLR generates Simple Object Access Protocol (SOAP) when it makes remote procedure calls. SOAP is a protocol used to access .NET Web Services. In addition to the garbage collection, CLR also provides support for Managed Code, Effective Memory Management, Type Safety Verification, Conversion of IL to native code, Structured Exception Handling and Effective Interoperability between COM components and Unmanaged Code. You can build secured applications using the runtime since the .NET Framework provides support for advanced security features as well.

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - May 13, 2009 at 12:41 am

Categories: C#, Channels, Latest   Tags: , , , , , , ,

FAQ 3 – What is C#?

C#, pronounced as C-Sharp, is one of the powerful programming languages provided by the .NET Framework. According to Microsoft “C# is a modern, object-oriented language that enables programmers to quickly build a wide range of applications for the new Microsoft .NET platform, which provides tools and services that fully exploit both computing and communications”. The main brains behind C# were Anders Hejlsberg and Scott Wiltamuth. However, many other personalities like Rob Howard, Scott Guthrie were also involved behind C# and the .NET Framework. The programming language has been standardized by European Computer Manufactures Association (ECMA).

Microsoft originally released beta versions of .NET Framework to get feedback about the product from developers and customers. Based on the massive response and suggestions received from them for the first beta, Microsoft released second beta in early 2001. Finally, they released final versions of C# under the name, .NET Framework 1.0 in 2002 and that of 1.1 in 2003. With each release, the product shipped with improved features for developing secured and scalable applications along with high quality documentation.

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - at 12:37 am

Categories: C#, Channels, Latest   Tags: , , , , ,