Introducing LINQ—Installing LINQ
|Visual C# Tutorials|
|© 2006 J. Huddleston, et al|
Installing LINQ doesn’t replace any .NET 2.0 assemblies, but it does change our VCSE development environment, adding some new project types that support LINQ and use the C# 3.0 compiler (as you’ll see later in Figure 18-7).
The May 2006 LINQ CTP (Community Technology Preview) can be downloaded from the LINQ Project home page, http://msdn.microsoft.com/data/ref/linq/. Go there and click Microsoft Visual Studio Code Name "Orcas" - LINQ CTP (May 2006), which will take you to the download page. It’s small enough to just run the download if you have a reasonably fast Internet connection, but we save it to
To install LINQ:
- 1. Run
LINQ Preview (May 2006).msi, which starts the LINQ installation process. When the Welcome window appears (see Figure 18-1), click Next.
- 2. When the License Agreement window appears (see Figure 18-2), click the I Agree radio button and when the Next button is enabled, click it.
- 3. When the Update C# Language Service for LINQ window appears (see Figure 18-3), click the Update C# Language Service radio button and click Next.
- 4. When the Confirm Installation window appears (see Figure 18-4), click Next.
- 5. A progress window appears (see Figure 18-5). When the Next button is enabled, click it.
- 6. When the Installation Complete window appears (see Figure 18-6), click Close. LINQ is now installed, and you’ll find a lot of useful things in
C:\Program Files\LINQPreview. (We recommend you look at
- 7. Open VCSE and create a new project. You should see the four new templates for LINQ shown in Figure 18-7. Select LINQ Console Application, change the project name to
Chapter18, and click OK.
- 8. A message box will alert you to your use of an unsupported version of C# 3.0 (see Figure 18-8). Don’t worry, it works well enough for this chapter (in fact, it works quite stably). Click OK.
- 9. In Solution Explorer, expand the References node. Note the four new assemblies (
System.Xml.XLinq) VCSE automatically provides (see Figure 18-9).
- 10. Double-click
Program.cs. Note the three new namespaces (
System.Data.DLinq) VCSE automatically provides
usingdirectives for (see Figure 18-10). Save the solution. We’re ready to do some LINQ database programming.