Visual Studio 2008 Beta 2 Released

Visual Studio 2008 Beta 2 was released to the web for download today. The releases are available both as regular installs and as VPC images. If you choose the regular installation, you should run this script to “ensure that the installation of .NET Framework 3.5 Beta 2 will not affect the development of ASP.NET AJAX 1.0 applications.”

The C# Language Specification Version 3.0 is now available for review.

There are samples and hands on labs available to help you explore this release:

The samples ship with the product. You can find them by choosing Samples from the Help menu. We are, of course, unable to update the samples that ship with Beta 2 after the product as been released. As a result we make the latest versions of the samples available from the link shown above. These links are maintained on the Visual Studio 2008 Samples Download Page.

Additional documents relating to the Visual Studio 2008 Beta 2 will be added to this post as they become available.

kick it on

Comments (28)

  1. You’ve been kicked (a good thing) – Trackback from

  2. Charlie Calvert , in his post announcing Visual Studio 2008 Beta 2, shares some links to LINQ & C#

  3. Tudor Vlad says:

    Thanks for the links! Nice job!

    BTW, the VS2008 Sample link doesn’t work for me either

  4. ccalvert says:

    I apologize for the broken link to the samples. It is fixed now.

  5. tariq sheikh says:

    I very slow net, i took me 4 days to download it and i did , see what it currted, i try again, what happen it all files expand but not install there some problem in 2008 beta 2, i check other ppl all have same problem

  6. Jason says:

    Thanks a lot.You got me started with linq.

  7. TJO says:

    I downloaded this thing but it does not seem to have any LINQ templates in it.  Where can I find them?  Thanks

  8. Joe says:

    Where do you get the customers.xml that "LINQ Hands On Labs" says is attached?

  9. Not sure where Customers.xml is, but you can just copy and paste this:

    <?xml version="1.0" encoding="utf-8" ?>


    <Customer CustomerID="ALFKI" City="Berlin"/>

    <Customer CustomerID="BONAP" City="Marseille"/>

    <Customer CustomerID="CONSH" City="London"/>

    <Customer CustomerID="EASTC" City="London"/>

    <Customer CustomerID="FRANS" City="Torino"/>

    <Customer CustomerID="LONEP" City="Portland"/>

    <Customer CustomerID="NORTS" City="London"/>

    <Customer CustomerID="THEBI" City="Portland"/>


  10. And here’s one with contact names for the "Transforming XML Output" task. You can just ignore my previous post and use this one:

    <?xml version="1.0" encoding="utf-8" ?>


    <Customer CustomerID="ALFKI" City="Berlin" ContactName="Kent"/>

    <Customer CustomerID="BONAP" City="Marseille" ContactName="Mark"/>

    <Customer CustomerID="CONSH" City="London" ContactName="Gavin"/>

    <Customer CustomerID="EASTC" City="London" ContactName="Cherie"/>

    <Customer CustomerID="FRANS" City="Torino" ContactName="Belinda"/>

    <Customer CustomerID="LONEP" City="Portland" ContactName="Tempany"/>

    <Customer CustomerID="NORTS" City="London" ContactName="Melanie"/>

    <Customer CustomerID="THEBI" City="Portland" ContactName="Kent"/>


  11. Micheal Johansen says:

    This a big relief on my family – the gas in my stomach makes a strong pressure, it is not a good thing.  I want to be an ice skater in the Olympics!

  12. I’ve been working with the Hands On Labs for Linq and Orcas beta 2 all afternoon. I can’t get the Xml Linq stuff to work. It compiles, it runs, but no results are ever returned. I’ve confirmed the XDocument is successfully loaded with the Customers.Xml data, but the query never returns any results. I tried breaking it down a little like this, but still no results (see below). Anyone else run into this? Too bad, I’d really like to use this feature.

               XDocument xd = XDocument.Load(@"c:Customers.xml"); // verified, loading

               // this didn’t work for me

               IEnumerable<Customer> lc =

                   from c in xd.Descendants("Customers").Descendants()

                   where !(c.Attribute("City").Value.Equals("Portland"))

                   select new Customer


                       City = c.Attribute("City").Value,

                       CustomerID = c.Attribute("CustomerID").Value


    // lc is always null

               return lc;

  13. Charlie, I’m debugging the linq hands on lab, the xml stuff. It’s all just wrong.

    page 6, the example should read like this:

           static IEnumerable<Customer> CreateCustomersFromXml1()



                   from c in XDocument.Load("Customers.xml")


                   select new Customer


                       City = c.Element("city").Value,

                       CustomerID = c.Element("id").Value



    what’s wrong?

    1. case of listeral element names in the example is wrong and won’t work

    2. id, not CustomerID

    2. .Element("city") and .Element("id") is correct based on the provided xml, not .Attribute("City") and .Attribute("CustomerID")

  14. this works for the XmlQuery() example on page 7

           public static void XMLQuery()


               var doc = XDocument.Load("Customers.xml");

               var results = from c in doc.Descendants("customers").Descendants("customer")

                             where c.Element("city").Value == "London"

                             select c;


               foreach (var contact in results)

                   Console.WriteLine(contact + "n");

  15. my version of the XmlQuery with transform, that works:

               var doc = XDocument.Load("Customers.xml");

               var results = from c in doc.Descendants("customers").Descendants("customer")

                             where c.Element("city").Value == "London"

                             select c;

               XElement transformedResults =

                   new XElement("Londoners",

                       from customer in results

                       select new XElement("Contact",

                           new XAttribute("id", customer.Element("id").Value),

                           new XElement("name", customer.Element("name").Value),

                           new XElement("city", customer.Element("city").Value)));


  16. on page 12 of the Linq Hands On Lab

    LINQ to SQL File

    should be

    LINQ to SQL Classes


    on page 13

    Top Most Extensive Products

    should be

    Ten Most Expensive Products

  17. ccalvert says:

    Michael, thank you for these great comments.

    I’ll try to roll them up into a single file and get them incorporated into the document.

    – Charlie

  18. page 16

    Top Most Expensive Products

    should be

    Ten Most Expensive Products

  19. arash says:

    hello,i need sample sorce for visual c# .thanks

  20. arash says:

    i was want 1 program for microsoft provide about .net !!! but????

  21. Douglas Peterson says:

    I’m on page 6 and I get the following exception when calling XDocument.Load. I’m using the .xml file Kent posted above, but even if it’s just an empty .xml file (<?xml version="1.0" encoding="utf-8" ?>EOF) I get the same exception.

    System.MissingMethodException was unhandled

     Message="Method not found: ‘Void System.Xml.XmlReaderSettings.set_MaxCharactersFromEntities(Int64)’."



          at System.Xml.Linq.XNode.GetXmlReaderSettings(LoadOptions o)

          at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)

          at System.Xml.Linq.XDocument.Load(String uri)

          at LINQ_Overview.Program.CreateCustomers() in E:ProjectsDeleteMeLINQ OverviewLINQ OverviewProgram.cs:line 54

          at LINQ_Overview.Program.ObjectQuery() in E:ProjectsDeleteMeLINQ OverviewLINQ OverviewProgram.cs:line 44

          at LINQ_Overview.Program.Main(String[] args) in E:ProjectsDeleteMeLINQ OverviewLINQ OverviewProgram.cs:line 26

          at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

          at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

          at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

          at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

          at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

          at System.Threading.ThreadHelper.ThreadStart()


  22. Apologies if this has already been caught, but the instructions from number five of exercise four don’t make sense:

    "Recall your query printed out all orders for each customer that lives in London.  This time, instead of printing all the orders, print the number of orders per customer."

    All in all, a really gentle introduction to a formidable topic.

  23. Boboyu says:

    Thank you for your work.cheer!!

  24. honey says:


        i am honey

        it is very nice project to help othe for the guidence .i appriciat it very much

        i got very improtent info

        thank  uuu


  25. Tony Admin says:

    My QQ is 370007548

    I am 16 years old!

  26. eliff says:

    dgjlghtszmö bnypoıivc vçjhlpbvöçAfşygkw34oı5gjeürpobmtyouıh5r6oyh5pto465h