Skip to content

SiteIntegrationConfiguration

Salem Korayem edited this page Jan 8, 2016 · 9 revisions

When running in a website, the models builder supports the following application settings, in the appSettings section of the web.config file:

  • Zbu.ModelsBuilder.EnablePublishedContentModelsFactory - can be true (default) or false, indicates whether the default models factory should be enabled.
  • Zbu.ModelsBuilder.EnableApi - can be true (default) or false, indicates whether the API for Visual Studio should be enabled. If you do not use the Visual Studio extension, you may want to disable the API for extra security.
  • Zbu.ModelsBuilder.EnableLiveModels - can be true or false (default), indicates that "live" models should be activated.
  • Zbu.ModelsBuilder.EnableAppCodeModels - can be true or false (default), indicates that "App_Code" models should be activated.
  • Zbu.ModelsBuilder.EnableAppDataModels - can be true or false (default), indicates that "App_Data" models should be activated.
  • Zbu.ModelsBuilder.EnableDllModels - can be true or false (default), indicates that "Dll" models should be activated.
  • Zbu.ModelsBuilder.ModelsNamespace - (string), specifies the generated models namespace.
  • Zbu.ModelsBuilder.LanguageVersion - (string), indicates the C# language version, is CSharp5 by default but can be set to CSharp6 or Experimental to try the new C# features.
  • Zbu.ModelsBuilder.FlagOutOfDateModels - (boolean), indicates whether out-of-date models (ie after a content type or data type has been modified) should be flagged.

WARN: due to a mistake, version 2.0.0-beta2 does not use EnableAppCodeModels but CreateAppCodeModelsFile. This is fixed in version 2.0.0-beta8.

Note that Zbu.ModelsBuilder.EnableDllModels, Zbu.ModelsBuilder.EnableAppCodeModels and Zbu.ModelsBuilder.EnableAppDataModels are exclusive. Only one should be true at a time, else an exception will be thrown.

Same for Zbu.ModelsBuilder.EnableAppDataModels and Zbu.ModelsBuilder.EnableLiveModels.

In other words, use..

  • EnableAppDataModels alone
  • OR EnableLiveModels alone or with either EnableAppCodeModels OR EnableDllModels but not both