views:

26

answers:

1

A while back a project I'm working on (and all other projects in the solution) were switched over to .Net 3.5. I'm trying to make use of Guid.TryParse which rocked up in .Net 3.5. When I try to use it I get the error:

'System.Guid' does not contain a definition for 'TryParse'

The MSDN docs clearly show that TryParse exists in .Net 3.5, but I'm unable to use it. I tried manually referencing the specific version of mscorlib, but visual studio refused. What might be causing this behaviour?

+2  A: 

As Brian's comment says, the docs "clearly show" that it's in .NET 4, not .NET 3.5.

Version information

.NET Framework
Supported in: 4
.NET Framework Client Profile
Supported in: 4

If you look in the Guid methods in .NET 3.5 you'll see it's clearly not there.

Jon Skeet