1

I'm writing a C# class library, which will be used in a project that runs on .NET Framework 1.1. However, I'm using Visual Studio Ultimate 2010, which doesn't provide tooling for version 1.1.

Is there a static check that I can perform inside VS2010 to see that the code is 1.1 compatible?

isani
  • 418
  • 4
  • 6

2 Answers2

3

The csc has the ability to check for syntax compatibility. Use the langversion flag in some post build step to check for program compatibility with ISO-1. I would recommend keeping a separate project for the .NET 1.1 library since the conventions after .NET 2.0 greatly diverge.

Dustin Kingen
  • 20,677
  • 7
  • 52
  • 92
  • Thanks for the tip. However, the langversion mechanism is somewhat limited since it only checks the syntax of C# but is unable to report if the code references class libraries from incompatible frameworks. – htalvitie Sep 16 '13 at 15:03
0

There is a problem in backward compatibility in .NET Framework if you build your application in .NET 4.0 than you can not except that this version will work in .NET 1.1 Framework. A lot of functions are new or obsoleted. I think a good idea is to build the project in differents target vesions.

Check this information: http://msdn.microsoft.com/en-us/library/ff602939.aspx

Bassam Alugili
  • 16,345
  • 7
  • 52
  • 70
  • The original question did not mention this, but VS2010 is not used in compiling the code - only for editing. – htalvitie Sep 16 '13 at 14:58