Visual C# Orcas,6
Recent update: 2008-3-21

Unusual compiler error - Equals(object obj)

1368 byte By Grorange at 2008-3-7
Error 1 'TexasHoldemCalculator.Card' does not contain a definition for 'equals' and no extension method 'equals' accepting a first argument of type 'TexasHoldemCalculator.Card' could be found (are you missing a using directive or an assembly reference?) ...

Allow C# to infer generic type parameters from return type?

1095 byte By Michael_Giagnocavo at 2008-3-6
What is the thinking around letting C# infer generic type params when returning from a method? I'm sure I'm not explaining this right, so let me demonstrate: Code Snippet static int Foo(){ return Bar();}static T Bar<T>(){ return default(T);} It seems to me that in this case, the ...

Nested expression trees

697 byte By nikov at 2008-3-5
I've installed Orcas and began to play with lambdas and expression trees.Is it allowed to use 'nested' exression trees?I mean: Code Snippet using System;using System.Linq;using System.Linq.Expressions;namespace Nikov.Linq{ using Expr = Expression<Func<int, int>>; class Program ...

visual c# 2005 orcas express edition

273 byte By dons_view at 2008-3-3
When I goto Database Explorer Data Connections Add Connections I get an error message: "The event log file is full" I don't know what event log file it's talking about, where that file is located, and how to clear the file

Managed WMI Provider

4913 byte By DimitarKolev at 2008-3-1
I'm trying to create managed WMI provider using new classes provided by System.Magement.I do the flowing: Code Snippet [assembly: WmiConfiguration("Root/WmiResearch", HostingModel = ManagementHostingModel.Decoupled, IdentifyLevel = false)] Code Snippet using System;using ...

Reproducable compiler hang - 100% CPU. - miore information

1572 byte By -Matt- at 2008-2-28
Hi, I'm attempting to port our 60+ project solution from Visual Studio 8 to 9. Still targetting .Net 2.0. Have downloaded the most recent VHD. Converting the solution and projects to the new version was error free. But when I compile it hangs roughly half way through. In particular. 1. ...

NotImplementedException - why not use it?

613 byte By espeholt_jr at 2008-2-27
Hi...When er implement a abstract class automatic from Orcas i get this code: protected override int SomeInt() { throw new Exception("The method or operation is not implemented."); }but why not use: protected override int SomeInt() { throw new NotImplementedException(); }It would be ...

Reproducable compiler hang - 100% CPU.

1572 byte By -Matt- at 2008-2-26
Hi, I'm attempting to port our 60+ project solution from Visual Studio 8 to 9. Still targetting .Net 2.0. Have downloaded the most recent VHD. Converting the solution and projects to the new version was error free. But when I compile it hangs roughly half way through. In particular. 1. ...

CSharpCodeProvider.CompileAssemblyFromFile

406 byte By MatthieuMEZIL at 2008-2-25
Code Snippet CSharpCodeProvider provider = new CSharpCodeProvider(); [...] provider.CompileAssemblyFromFile(...) doesn't work with C# 3.0 code. It is normal because CSharpCodeProvider is defined in Framework 2.0. How can we do this with C#3.0? ...

Anonymous types and interfaces

958 byte By tatentax at 2008-2-24
Hi, I was wondering whether it is possible to instruct LINQ to treat a projected anonymous type as an implementation of an interface? This would be useful for allowing a query result to be passed around to other functions, for example. What I would like to see is something like this. ...

using System.Linq

445 byte By sj_h1 at 2008-2-23
In all new forms the "using System.Linq" is included automatically, however, it causes the error: Error 1 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) D:\C#\PPTestApp\PPTestApp\frmCmdC10.cs 6 14 PPTestApp ...

Why no method for copying directories?

226 byte By ralf_oop at 2008-2-22
The subject says it all - why doesn't have the Directory(Info) class no copy method? That's a feature what should be since 1.0. In VB you can solve the task via the My-object but why isn't it implemented in the BCL?

Shortcut syntax for no-arg lambdas?

840 byte By JohnSpurlock at 2008-2-22
In 2.0, it was not possible to point a delegate to a property getter. There were workarounds, but none of them particularly elegant.Although that restriction doesn't appear to be lifted in c# 3.0, one new type-safe workaround is to use a lambda with no arguments: Code Snippet var foo = new ...

Orcas Beta 1 - WF projects can't use C# 3.0 and vice versa

452 byte By Dmitry at 2008-2-21
Hi, Just noticed, if I create any WF project via the wizard, any C# 3.0 intruction results in compilation errors. This is despite the fact that project properties say that it is compiled against framework 3.5. And if I bring in some WF stuff into any framework 3.5 application (with C# 3.0, ...

Extension Methods bug

1122 byte By MatthieuMEZIL at 2008-2-20
I have this code: Code Snippetpublic static class StringExtension{ public static string Format(this string template, params object[] parameters) { return string.Format(template, parameters); } } Code Snippetstring s = StringExtension.Format("{0}", "toto"); is ok. But ...

Workaround

615 byte By TonyMiles at 2008-2-19
[ Running Orcas Beta 1 on VPC 2007, Vista 32 bit guest, Vista 64 host, ASP.NET futures also installed.] In a Page_Load method I have ... { NorthwindDataContect db = new NorthwindDataContext(); var query = from o in db.Orders where o.ShipCity == "London" select o; ...

DateTime fields don't show up in Gridview Databind

615 byte By TonyMiles at 2008-2-18
[ Running Orcas Beta 1 on VPC 2007, Vista 32 bit guest, Vista 64 host, ASP.NET futures also installed.] In a Page_Load method I have ... { NorthwindDataContect db = new NorthwindDataContext(); var query = from o in db.Orders where o.ShipCity == "London" select o; ...

Can't create a .NET 3.0 app (WPF) in Orcas

494 byte By Muzzzy at 2008-2-17
Hi,Sometime ago i installed Visual Studio extensions on Visual Studio 2005 and was able to create WPF projects. Then, yesterday i installed latest Orcas CTP on top of that and when i try to create a project i don't see an option for any of .NET 3 projects (WWF, WCF, WPF), but i still can ...

How do I make a NotificationIcon?

176 byte By Jivemasta at 2008-2-16
I've been trying to find the Notification Icon control so I can make a tray icon in the taskbar. Can anyone point me to where it is, or at least a way to work around it?

visual c# 2005 orcas express edition

280 byte By dons_view at 2008-2-15
When I goto Database Explorer Data Connections Add Connections I get an error message: "The event log file is full" I don't know what event log file it's talking about, where that file is located, and how to clear the file

using System.Linq

445 byte By sj_h1 at 2008-2-15
In all new forms the "using System.Linq" is included automatically, however, it causes the error: Error 1 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) D:\C#\PPTestApp\PPTestApp\frmCmdC10.cs 6 14 PPTestApp ...

Visual Studio Orcas March 2007 CTP and Windows Vista problem

206 byte By parthamandayam at 2008-2-15
I downloaded the Visual Studio Orcas March 2007 CTP but when I double click the VSCTPBase file to install it on Windows Vista, I get an error "The parameter is incorrect" Any ideas?

Orcas Beta 1 - WF projects can't use C# 3.0 and vice versa

452 byte By Dmitry at 2008-2-15
Hi, Just noticed, if I create any WF project via the wizard, any C# 3.0 intruction results in compilation errors. This is despite the fact that project properties say that it is compiled against framework 3.5. And if I bring in some WF stuff into any framework 3.5 application (with C# 3.0, ...

How does Linq to SQL Designer decide on what name to call the generated class?

176 byte By stratoblue at 2008-2-15
I dragged the Customers table to the Linq to SQL Designer. The designer generated a code for a Customer object. How does it decide on what name to use (in this case Customer)?

migrating from .net 2.0 to 3.0 - need some clarity

588 byte By MarkPiller at 2008-2-14
Hi, I apologize if this is not the right place to post this question. If you know of a more appropriate forum, let me know.I need to create a build of our product for .NET 3.0. Currently we compile it as a "Class Library" project in VS2005 and get an assembly. The assembly is deployed ...

Cannot connect to Northwind with Database Explorer

545 byte By stratoblue at 2008-2-14
This is my first time to open a database with Database Explorer. When I try to connect to Northwind, I get this error message Unable to open the physical file "C:\SQL Server 2000 Sample Databases\NORTHWIND.MDF". Operating System error 5: "5(Access is denied.)" An attemp to ...

Binding Lambdas when they are closures

1640 byte By NicholasSchrock at 2008-2-13
Hi, I am considering prototyping a system that would require remoting lambda expressions across remoting boundaries. It would be extremely useful if Expression<T> exposed the capability to "bind" itself to its surrounding environment and get the intermediate tree. Example: ...

Curry, anyone?

20815 byte By JHarjung at 2008-2-13
So now that we've got lambdas, is there any chance we can get some help from the compiler with currying too? :) It can be done at runtime (see code sample), but it doesn't seem terribly efficient, and it still requires writing out embedded Func<Func<...>, Func<...>> ...

what's the story with Web Application Projects in Orcas Beta 1?

1155 byte By Tim_Mackey at 2008-2-12
hi, i've got a basic Web Application Project set up in Beta 1. it looks like they did a great job on getting the VS2003 model properly implemented. i'm very impressed with the stability so far. however i'm having trouble with namespaces, i can't reference classes from aspx code behind.i ...

Assignments in Expression Trees?

807 byte By NicholasSchrock at 2008-2-11
Why are there no assignments of properties allowed in expression trees? It is really a method call to the set method of the property so it seems as if it should be allowed.? Code Snippet class Program{ static void Main(string [] args) { Expression<Action<P>> a = p => p.Number = ...

Runtime lambda expressions

1930 byte By Tunga at 2008-2-10
Hi, I have just tried to update a lambda expression in runtime... but I found no way...Is there a way to do it? I mean building a lambda expr.. from a string captured at runtime... Here is my trial, it only works if lambda exp can be evaluated at compile time:static ...

WPF\E C#

400 byte By ManjuVijay at 2008-2-10
Hi, 1. I need to run a WPF/E application from Apache server. Any Steps? 2. What are the restrictions on using WPF/E 3. I need to develop a Graphical Interface using WPF/E which should be controlled by the values i get from from SQL SERVER DB. How should I proceed for the same? How to add c# ...

Object Initializers ignore protection levels?

1975 byte By NicholasSchrock at 2008-2-8
Hello all, I was experimenting with object initializers in the orcas beta and found, to my surprise, that the following code compiles:public class Car { public int Id { get; private set; } } class Program{ static void Main(string [] args ) { Car c1 = new Car() { Id = 1 }; // works to my ...

Can't compile any Orcas Beta 1 C# Programs on Vista

2820 byte By SamGentileMVP-SolutionsArch at 2008-2-8
Orcas Beta 1 Professional Compile Fails on Vista I am having the same problem that is mentioned in this thread but that thread is for Vista RC2 and not the RTM. I can't compile any Orcas Beta 1 programs on Vista because I also get: Required file 'alink.dll with IAlink3' ...

Func<> return void

112 byte By MatthieuMEZIL at 2008-2-7
We can use Func<> in order to use a delegate. But how using Func to replace a delegate that returns void?

(SOS) Strongly Request: Improve generic constraint in C#3.0 !!!

6972 byte By Jethro at 2008-2-7
// Strongly Request: Improve generic constraint in C#3.0 /**********************************************************************************************************************************/ /* Now, in order to write a GenericType that support simple Arithmetics like "+ - * /" have to ...

The custom tool 'MSDataSetGenerator' failed. Method not found:

1263 byte By Tergiver at 2008-2-7
Have January 2007 CTP of Orcas. I click File -> New Project... Select Class Library Click OK Right-click project in Solution Explorer (ClassLibraryX) Select Add -> New Item... Select Dataset Click OK The following warning appears in the Error List: Warning 1 The custom tool ...

(SOS) Strongly Request: Improve generic constraint in C#3.0 !!!

6972 byte By Jethro at 2008-2-7
// Strongly Request: Improve generic constraint in C#3.0 /**********************************************************************************************************************************/ /* Now, in order to write a GenericType that support simple Arithmetics like "+ - * /" have to ...

new *Async methods in the Socket class

109 byte By Valdair at 2008-2-6
Anybody have or know of an example on how to use these? No docs and the functions are not exactly intuitive.

migrating from .net 2.0 to 3.0 - need some clarity

588 byte By MarkPiller at 2008-2-6
Hi, I apologize if this is not the right place to post this question. If you know of a more appropriate forum, let me know.I need to create a build of our product for .NET 3.0. Currently we compile it as a "Class Library" project in VS2005 and get an assembly. The assembly is deployed ...

Can't create .NET 3 DLLs !

332 byte By Sylvestre at 2008-2-5
Hi everyone,I have some trouble using the VS2k5 extensions : I have no "Class Library" template (I mean no .NET 3-specific template), and the old .NET 2 template won't work : when I try to add, for example "using System.Windows.Media", the assembly is just not found.Any ...

Curry, anyone?

20815 byte By JHarjung at 2008-2-5
So now that we've got lambdas, is there any chance we can get some help from the compiler with currying too? :) It can be done at runtime (see code sample), but it doesn't seem terribly efficient, and it still requires writing out embedded Func<Func<...>, Func<...>> ...

Visual Studio Orcas March 2007 CTP and Windows Vista problem

206 byte By parthamandayam at 2008-2-4
I downloaded the Visual Studio Orcas March 2007 CTP but when I double click the VSCTPBase file to install it on Windows Vista, I get an error "The parameter is incorrect" Any ideas?

Error in compiler, protected field not recoqnized

1143 byte By espeholt_jr at 2008-2-4
Hi...I have the Visual Studio Orcas March CTP (9.0.20209) and running on Windows Vista RC1.I have a class A which contains a protected field called "operators". Then I have a class called B and a class called C. Both classes uses the "operators" field, but class C could not ...

Visual Studio Orcas April CTP ETA

101 byte By AvadaKedavra at 2008-2-4
So when is the APRIL CTP of Orcas going to be released? Any time soon? I hope it works on Vista !!!

Automatic properties and structs

234 byte By cobain81 at 2008-2-4
Hi! Is it possible to use automatic properties within structs? I tried and compilation was right until I tried to initialize values in constructor. Am I forced to use Object Initializers as workaround? Thanks

ORCAS DEC CTP

104 byte By JamesMiles at 2008-2-3
What happened to the ORCAS DEC CTP? There was a post about it yesterday and now its gone?

The custom tool 'MSDataSetGenerator' failed. Method not found:

1249 byte By Tergiver at 2008-2-3
Have January 2007 CTP of Orcas.I click File -> New Project...Select Class LibraryClick OKRight-click project in Solution Explorer (ClassLibraryX)Select Add -> New Item...Select DatasetClick OKThe following warning appears in the Error List:Warning 1 The custom tool 'MSDataSetGenerator' ...

MSMQ bug...?

2639 byte By ottogbg at 2008-2-2
I have two applications that uses MSMQ for duplex communication, host and client.The host has an in-queue (Q1) where the client sends messages to the host. When a client sends a "register"-message, a new queue (Q2) is created by the host, where the client can receive answers from the ...

Jan CTP Microsoft.VisualStudio.Shell.WindowPane.OnCreate()

361 byte By Skidmark at 2008-2-2
When I open the project's properties. Each tab in the properties window displayes a red X and Microsoft.VisualStudio.Shell.WindowPane.OnCreate(). So far I have tried this using a C# web and a C# windows project.I am using the installable bits on XP SP2. I chose the default install option and ...

Visual Studio Orcas

Site Classified