Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Assembly mismatch

api
plugins

Hi ,

I'm trying to develop a develop a plugin that utilize 'Countersoft.Gemini.Api' - I need to use the ServiceManager.

But there seems to be a mismatch with the versions - see below : Error 1 Assembly 'Countersoft.Gemini.Api, Version=5.1.5.3639, Culture=neutral, PublicKeyToken=7d1cd24c5b90fda4' uses 'Countersoft.Gemini.Commons, Version=5.1.5.3639, Culture=neutral, PublicKeyToken=7d1cd24c5b90fda4' which has a higher version than referenced assembly 'Countersoft.Gemini.Commons, Version=5.1.3.3606, Culture=neutral, PublicKeyToken=7d1cd24c5b90fda4' c:\TEMP\countersoft.gemini.samples\Libs\Countersoft.Gemini.Api.dll Countersoft.Gemini.Samples

Im using - http://www.geminiplatform.com/downloads/v5/CountersoftGeminiv515.zip - http://www.geminiplatform.com/downloads/v5/Countersoft.Gemini.Samples.zip - http://www.geminiplatform.com/downloads/v5/CountersoftGeminiAPIv51_5.zip

please advice.

Modist
· 1
Modist
Replies (17)
helpful
0
not helpful

Change your references to reference the 5.1.5 dlls.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

please elaborate :

should I extract all files in the Assemblies-folder (CountersoftGeminiAPIv51_5.zip) and overwrite the files in

  • the 'bin'-folder of the website
  • the 'libs'- folder in Countersoft.Gemini.Samples.zip (and recreate references )

would that be the correct procedure ?


Modist
· 1
Modist
helpful
0
not helpful

Change the references for the http://www.geminiplatform.com/downloads/v5/Countersoft.Gemini.Samples.zip solution to reference the 5.1.5 dlls.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

that helped - not I have now encountered another issue - after deploying the zip-file to "\App_Data\apps"

I get "Not Found Countersoft.Gemini.Api" in the errorlog - but "Countersoft.Gemini.Api.dll" is located in the bin-folder of the website. The security for the file is the same as the others. IIS have been restarted , the file is extracted from "countersoftgeminiapiv51_5.zip"

··· it should read:ModistTuesday, January 29, 2013, 8:53:31 PM
··· I should read: "that helped - but now I have encountered another issueModistTuesday, January 29, 2013, 8:54:29 PM

Modist
· 1
Modist
helpful
0
not helpful

Why do you need the API dll?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I need to do the following :

after an issue have been updated - iterate all customfields - access the alerttemplates - change the status of the issue to another status - Create new item


Modist
· 1
Modist
helpful
0
not helpful

You do not need the api for this. create a before issue created listener and update the status etc...


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

I will try to look into this - but I will prefer the API - is that doable ?


Modist
· 1
Modist
helpful
0
not helpful

Yes it is, what is the full exception?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

http://www.geminiplatform.com/downloads/v5/Countersoft.Gemini.Samples.zip does not include any examples for this when handling an event - eg. IIssueAfterListener - and I have seen no other form of documentation for this?

could you provide me an example for eg. creating an issue when handling an event ?


Modist
· 1
Modist
helpful
0
not helpful

Look at the plugin folder of the samples.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

the plugin folder contains no examples on CRUD ? There is 1 line - that holds actual code : if (args.Entity.GetWatchers().Count == 0) args.Entity.AddWatcher(args.User.Id);

But I think I have figured it out - but it seems that there is a difference between on how to create an issue :

In API - the following works ( Default values are being used automatically) :

Issue issue = new Issue(); issue.Title = "A title"; issue.Description = "A Description"; issue.ProjectId = projectID; issue.ReportedBy = sm.User.WhoAmI().Entity.Id; sm.Item.Create(issue);

Without API - the following throws two exceptions (seems that default values are not being used ??:

Issue NI = new Issue(); NI.Title = "New Title"; NI.Description = "New Description"; NI.ProjectId = I.ProjectId; args.Context.Issues.Create(NI);

the exceptions are:

The INSERT statement conflicted with the FOREIGN KEY constraint "geminiissuesissuepriorityidfk". The conflict occurred in database "Gemini5test", table "dbo.geminiissuepriorities", column 'priorityid'. The statement has been terminated.[SQL: INSERT INTO geminiissues (projectid, reportedby, mailboxid, originatortype, originatorreply, originatordata, originatorprocessed, parentissueid, isparent, hierarchykey, repeated, fixedinversionid, issuetypeid, issuestatusid, issuepriorityid, issueseverityid, issueresolutionid, affectedversions, resources, components, watchers, votes, points, percentcomplete, estimatehours, estimateminutes, loggedhours, loggedminutes, visibility, summary, longdesc, userdata1, userdata2, userdata3, startdate, duedate, resolveddate, closeddate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); select SCOPEIDENTITY()] NHibernate at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) at NHibernate.Action.EntityIdentityInsertAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.Save(Object obj) at Countersoft.Foundation.Data.Repository2.Save(T entity) at Countersoft.Gemini.Business.Issues.Create(Issue entity) at Countersoft.Gemini.Samples.Plugin.IssueListener.BeforeCreate(IssueEventArgs args) in I:\gemtest\org\org\Countersoft.Gemini.Samples\Plugin\IssueListener.cs:line 86 at Countersoft.Gemini.Infrastructure.Managers.GeminiEventDispatcher.RaiseBeforeIssue(UserContext user, Issue issue, Issue previous, BeforeIssueDelegate del) at Countersoft.Gemini.Infrastructure.Managers.IssueManager.Create(Issue entity) at Countersoft.Gemini.Infrastructure.Managers.IssueManager.SaveEdits(BaseController controller, ProjectTemplatePageType pageType, Int32& id, HttpRequestBase request) at Countersoft.Gemini.Controllers.Ajax.AjaxProjectsController.InlineEditSave(ProjectTemplatePageType viewType) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass42.b41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.<>cDisplayClass39.b33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass4f.b49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass4f.b__49()

The INSERT statement conflicted with the FOREIGN KEY constraint "geminiissuesissuepriorityidfk". The conflict occurred in database "Gemini5test", table "dbo.geminiissuepriorities", column 'priorityid'. The statement has been terminated.[SQL: INSERT INTO geminiissues (projectid, reportedby, mailboxid, originatortype, originatorreply, originatordata, originatorprocessed, parentissueid, isparent, hierarchykey, repeated, fixedinversionid, issuetypeid, issuestatusid, issuepriorityid, issueseverityid, issueresolutionid, affectedversions, resources, components, watchers, votes, points, percentcomplete, estimatehours, estimateminutes, loggedhours, loggedminutes, visibility, summary, longdesc, userdata1, userdata2, userdata3, startdate, duedate, resolveddate, closeddate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); select SCOPEIDENTITY()] NHibernate at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session) at NHibernate.Action.EntityIdentityInsertAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.Save(Object obj) at Countersoft.Foundation.Data.Repository2.Save(T entity) at Countersoft.Gemini.Business.Issues.Create(Issue entity) at Countersoft.Gemini.Samples.Plugin.IssueListener.BeforeCreate(IssueEventArgs args) in I:\gemtest\org\org\Countersoft.Gemini.Samples\Plugin\IssueListener.cs:line 86 at Countersoft.Gemini.Infrastructure.Managers.GeminiEventDispatcher.RaiseBeforeIssue(UserContext user, Issue issue, Issue previous, BeforeIssueDelegate del) at Countersoft.Gemini.Infrastructure.Managers.IssueManager.Create(Issue entity) at Countersoft.Gemini.Infrastructure.Managers.IssueManager.SaveEdits(BaseController controller, ProjectTemplatePageType pageType, Int32& id, HttpRequestBase request) at Countersoft.Gemini.Controllers.Ajax.AjaxProjectsController.InlineEditSave(ProjectTemplatePageType viewType) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass42.b41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.<>cDisplayClass39.b33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass4f.b49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass4f.b49() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.b36(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass25.<>cDisplayClass2a.b20() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass25.b22(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<>cDisplayClass1d.b18(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.b3(IAsyncResult ar) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.b3(IAsyncResult ar) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<>cDisplayClass8.b3(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.b3(IAsyncResult ar) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Modist
· 1
Modist
helpful
0
not helpful

You will need to set all the items properties (priority etc...)


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

But this is no necessary when using the API ?

If I need to do this - I need to be able to retrieve the default values so I can apply these - also for customfields - how do I do this ?


Modist
· 1
Modist
helpful
0
not helpful

Use the project default values service:

args.Context.ProjectDefaultValues.Get(your project id, null)

Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

thnx.

Seems to be easier to use the API - do you have an answer for the previous Question listed below ?

I get "Not Found Countersoft.Gemini.Api" in the errorlog - but "Countersoft.Gemini.Api.dll" is located in the bin-folder of the website. The security for the file is the same as the others. IIS have been restarted , the file is extracted from "countersoftgeminiapiv51_5.zip"


Modist
· 1
Modist
helpful
0
not helpful

Can you post the full error?


Mark Wing
· 9108
Mark Wing