OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Set preprocessing identifier when compiling module #2398

Open orchardbot opened 12 years ago

orchardbot commented 12 years ago

AimOrchard created: https://orchard.codeplex.com/workitem/18571

As stated in http://orchard.codeplex.com/discussions/349412 I don't think there currently is a way to have 1 module supporting multiple orchard versions.

A somehow 'quickfix' would be to set some preprocessor identifiers that you can check on to enable / disable certain bits of code.

For example for the v1.4 release you would define ORCHARD_1, ORCHARD_1_4, ORCHARD 1_4_0 and ORCHARD 1_4_0_0 or something.

Just an idea ;)

orchardbot commented 12 years ago

@sebastienros commented:

It has been implemented by the past but it breaks Medium trust. we'll reintroduce it when we drop medium trust.