Hmmmmm
Hmmmmm

Reputation: 870

Compilation error when changing C# application from .NET Framework 4.5.2 to 3.5

I have a C# application that works fine when compiled with a Target Framework of 4.5.2. However, when I change that setting in Visual Studio (Version 14.0.25424.00 Update 3) to 3.5 I get a bunch of errors and I am (obviously) not able to compile. Some of the errors I see have to do with trying to use the following namespaces and types:

  1. System.Net
  2. System.Xml
  3. System.Security.Authentication
  4. SslStream
  5. X509Certificate2
  6. System.Linq
  7. System.Threading.Tasks

I saw some other posts about trying to modify the references and add a new System.Core library but nothing has worked so far.

Upvotes: 1

Views: 556

Answers (1)

Alex Wiese
Alex Wiese

Reputation: 8370

Remove and re-add references to System.Core.dll and mscorlib.dll.

The Task class will not be available as it was only added in .NET 4.0. You could use the nuget package Task Parallel Library for .NET 3.5 which is a backport of Task that works on .NET 3.5.

Upvotes: 1

Related Questions