protected override void Execute(CodeActivityContext context) { string configurationFile = ConfigurationFile.Get(context); string modelFile = ModelFile.Get(context); var serverConfig = Helper.GetServerConfig(configurationFile); bool overwrite = OverwriteExisting.Get(context); CodeCrib.AX.Manage.ModelStore store = null; if (serverConfig.AOSVersionOrigin.Substring(0, 3) == "6.0") { store = new Manage.ModelStore(serverConfig.DatabaseServer, string.Format("{0}", serverConfig.Database)); } else { store = new Manage.ModelStore(serverConfig.DatabaseServer, string.Format("{0}_model", serverConfig.Database)); } if (overwrite) { store.InstallModelOverwrite(modelFile); } else { store.InstallModel(modelFile); } if (SetNoInstallMode.Get(context)) { store.SetNoInstallMode(); } }
protected override void Execute(CodeActivityContext context) { string configurationFile = ConfigurationFile.Get(context); string modelFile = ModelFile.Get(context); string axutilFolder = AxUtilBinaryFolder.Get(context); string modelName, publisher, layer; CodeCrib.AX.Manage.ModelStore.ExtractModelInfo(ModelManifestFile.Get(context), out publisher, out modelName, out layer); string keyFile = StrongNameKeyFile.Get(context); var serverConfig = Helper.GetServerConfig(configurationFile); CodeCrib.AX.Manage.ModelStore store = null; if (serverConfig.AOSVersionOrigin.Substring(0, 3) == "6.0") { store = new Manage.ModelStore(serverConfig.DatabaseServer, string.Format("{0}", serverConfig.Database), axutilFolder); } else { store = new Manage.ModelStore(serverConfig.DatabaseServer, string.Format("{0}_model", serverConfig.Database), axutilFolder); } context.TrackBuildMessage(string.Format("Exporting model {0} ({1})", modelName, publisher)); store.ExportModel(modelName, publisher, modelFile, keyFile); }