I em working with wss3.0 and moss. I need to define a constant which is true for wss3.0 and false for moss. I am using the following method to detect whether my custom webpart is running under wss or moss.
public static bool IsMOSS()
{
SPFeatureDefinitionCollection features = SPContext.Current.Site.WebApplication.Farm.FeatureDefinitions;
if (features["OssNavigation"] != null && features["Publishing"] != null)
return true;
else
return false;
}
But how can I set the above result(true or false) to the csproj constants?is is possible? if not then how can I load the assembly(dll) based on wss or moss in the project?