How does MSBee filter out .NET 2.0 functionality?

Topics: For MSBee Users
Aug 16, 2006 at 7:01 AM
migrated from power toy forums
originally posted by BozUK
------------------------------------------------------

I have successfully created a .NET 1.1 build of a multi project solution that had been upgraded to VS2005. And it runs on a .NET 1.1 only machine. Great!

But I'd like to know how I can prevent my developers writing code that utilizes .NET 2.0-only functionality. Is MSBee/MSBuild able to detect such functionality at build time?

Regards
Boz
Aug 16, 2006 at 7:01 AM
originally posted by Sara Ford MSFT
------------------------------------------------------

MSBee was not intentionally designed to detect or prevent developers from writing code that utilities .NET 2.0-specific functionality. Currently, the only way to find out if you are using .NET 2.0 is when you compile and get errors. Are you asking whether you'll get a specific ".NET 2.0-specifc functionality detected" error back from MSBee?

If you are developing within the Visual Studio 2005 IDE, you may want to check out the work Jamie Cansdale is doing with TestDriven.NET and MSBee at http://weblogs.asp.net/nunitaddin/archive/2006/03/01/439359.aspx, as we’re still investigating whether to do IDE support with MSBee.

Hope this helps.
Aug 16, 2006 at 7:01 AM
originally posted by BozUK
------------------------------------------------------

I guess I'm not asking MSBee to do this specifically (if the build fails because the functionality is .NET 2.0 only, that's fine).

I'd like VS 2005 to have a build option to stop developers working with .NET 2.0 only functionality, like the "Supported Runtimes" build setting in VS2003. I've posted a question in VS.General forum about this.

The thing is, I want to use VS2005 to develop .NET 1.1 apps, but if I don't do the MSBee build regularly, then I'm in danger of developers adding reams of .NET 2.0 functionality that needs to be ripped out.

Boz
Aug 16, 2006 at 7:01 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

To have a truly integrated development experience, MSBee would need to be integrated within the IDE along with the background compiler reflecting .NET 1.1 behavior so Intellisense only displays 1.1 items. The Aftermarket Solutions team isn't currently planning on doing the former since that's not the purpose of MSBee. Once the code is released as shared source, I expect someone will add that capability. The second part is something we have no control over; there is no way to change the background compiler from the UI.
Aug 16, 2006 at 7:02 AM
originally posted by BozUK
------------------------------------------------------

That's fine, and I'm happy to wait for 3rd Party vendors to fill this gap.

Can any of you MSFT guys tell me if there is an equivalent of the VS2003 "Supported Runtimes" build setting in VS2005? I don't seem to be getting any closer to an answer on this question on newsgroups or MSDN forums.

Boz
Aug 16, 2006 at 7:02 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

I have not seen the "supported runtimes" setting in VS 2005.
Aug 16, 2006 at 7:02 AM
originally posted by BozUK
------------------------------------------------------


I think the /langversion:ISO-1 option might provide approximately what I'm after. This setting (in Advanced Build project options) appears to standardise the language to C# 1.0, which gives me some scope for limiting developers from using 2.0 features.

Is this a reasonable use of this setting? Or have I missed the point?

Boz
Aug 16, 2006 at 7:02 AM
originally posted by Craig Lichtenstein - MSFT
------------------------------------------------------

I quickly looked this over and it seems to sort of do what you're looking for. For example, when I tried building a C# app using generics and langversion was set to ISO-1, I got a compiler error saying that the 'generics' feature can't be used since it's not included in the standardized ISO C# spec. However, I believe there are two key deficiencies with this approach.

1. Intellisense isn't affected so a developer will still see 2.0 language features.

2. The ISO-1 version of C# applies to csc 1.0, which came with .NET 1.0. For MSBee, you'd really want the C# 1.2 Language Specification. Thus, ISO-1 will prevent devs from using C#/.NET 1.1 language features that weren't defined in the initial language spec.
Aug 16, 2006 at 7:02 AM
originally posted by BozUK
------------------------------------------------------

Yes, I realised that too. Its almost what I want, but not quite. Definitely an opportunity for some bright young 3rd party app developers!

Boz