Assembly mismatch
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 |
|
Monday, January 28, 2013, 10:23:53 AM |
0
|
Change your references to reference the 5.1.5 dlls. |
||||
|
0
|
please elaborate : should I extract all files in the Assemblies-folder (CountersoftGeminiAPIv51_5.zip) and overwrite the files in
would that be the correct procedure ? |
||||
|
0
|
Change the references for the http://www.geminiplatform.com/downloads/v5/Countersoft.Gemini.Samples.zip solution to reference the 5.1.5 dlls. |
||||
|
0
|
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
|
||||
|
0
|
Why do you need the API dll? |
||||
|
0
|
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 |
||||
|
0
|
You do not need the api for this. create a before issue created listener and update the status etc... |
||||
|
0
|
I will try to look into this - but I will prefer the API - is that doable ? |
||||
|
0
|
Yes it is, what is the full exception? |
||||
|
0
|
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 ? |
||||
|
0
|
Look at the plugin folder of the samples. |
||||
|
0
|
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.Repository 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.Repository |
||||
|
0
|
You will need to set all the items properties (priority etc...) |
||||
|
0
|
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 ? |
||||
|
0
|
Use the project default values service:
|
||||
|
0
|
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" |
||||
|
0
|
Can you post the full error? |
||||
|