Error reordering backlog priority in TFS2015 - tfs-2015

In TFS at the backlog, you can reorder work items by selecting and dragging items according to the desired order.
When we try to do this with our recent TFS 2015 install, this error pops up:
Which says:
An error has occurred while attempting to save your changes. Click
here to discard your changes and refresh your view of the backlog.
Error details: TF400486: Unable to complete the operation because you
or another user has modified, removed, or re-parented items, or you
are trying to reorder an item outside of its immediate parent.
When we check the event log on the TFS machine, this exception is present:
Microsoft.TeamFoundation.Server.WebAccess.Agile.Models.BacklogChangedException:
TF400486: Unable to complete the operation because you or another user
has modified, removed, or re-parented items, or you are trying to
reorder an item outside of its immediate parent. at
Microsoft.TeamFoundation.Server.WebAccess.Agile.Utility.ProductBacklogReorderHelper.PerformReorder(ReorderOperation
operation, WorkItemData previousItem, WorkItemData nextItem,
WorkItemData reorderItem, List1 workItemsData) at
Microsoft.TeamFoundation.Server.WebAccess.Agile.Utility.ProductBacklogReorderHelper.Reorder(ReorderOperation
reorderOperation) at
Microsoft.TeamFoundation.Server.WebAccess.Agile.Utility.ProductBacklogReorderHelper.<Reorder>b__0(ReorderOperation
o) at System.Linq.Enumerable.<SelectManyIterator>d__142.MoveNext() at
System.Linq.Enumerable.d__811.MoveNext() at
System.Collections.Generic.List1..ctor(IEnumerable1 collection) at
System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at
Microsoft.TeamFoundation.Server.WebAccess.Agile.Controllers.ApiReorderWorkItemsController.ReorderWorkItems(ReorderOperation[]
operations, String hubCategoryRefName, String iterationPath) 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, IDictionary2
parameters) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult
asyncResult) at
System.Web.Mvc.Controller.<>c__DisplayClass1d.b__18(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult
ar) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult
ar) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at
System.Web.Mvc.MvcHandler.<>c__DisplayClass8.b__3(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(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)
What steps should we take to resolve this?

You can try:
upgrade TFS 2015 to TFS 2015 Update 1.
clean the file cache folder on your AT machine: C:\TfsData\ApplicationTier_fileCache
restart the TFS application pool in IIS.

As it turns out, this was related to how we used TFS in the past versus TFS now.
The guidance here indicates that work item ordering should be done in the context of features.
That is, order by feature, then in the relevant Sprint backlog, order by the work items present.

I noticed this only happens if:
CASE 1:
I move a PBI with children and put it before another PBI or
CASE 2:
I move a PBI and put it after a PBI with children
The workaround I used for each case is this.
WORKAROUND:
Imagine this is the order:
PBIWithChildren
PBINoChild
PBIINeedToMove
and this is the order I want to achieve:
PBIINeedToMove
PBIWithChildren
PBINoChild
I moved PBIWithChildren one down. So the order became like this:
PBINoChild
PBIWithChildren
PBIINeedToMove
Then I moved PBIINeedToMove and dropped it before PBINoChild so the order became like this:
PBIINeedToMove
PBINoChild
PBIWithChildren
Then I moved PBIWithChildren one up and ended with this which is what I wanted to achieve:
PBIINeedToMove
PBIWithChildren
PBINoChild
I know that sounds like many steps but only when you need to write it. Otherwise, it is a quick workaround.

I just ran into this issue and resolved it by ensuring my feature iteration path was in the same iteration path assigned to the corresponding team's backlog. This may not work in all cases but after making the change I was able to reorder my features with their children without error.

We experienced the same issue.
In our case, the error was caused by an accidental linking between features and requirements within a teams backlog:
A requirement, which already had a parent, had been made the parent of a different feature. Hence ordering of the backlog was no longer possible.
So in order to resolve this, we had to find the requirement, which had been made a parent of a different feature and remove this parent/child link. We were then able to reorder the requirement backlog.

This is still happening in VSTS on the Kanban board at the Stories level. I was able to work around this problem by moving a user story to a different column then moving it back to the original column in the order I desired. Annoying, but it seems to work.

Just to add to the list of experiences, I have just come across this in TFS 2018.1.
In my case, it occurred after one of our teams reorganised the way they were using boards, and made some sweeping changes to the area and iteration paths on PBIs, but not on tasks.
The root cause was that some (preexisting) open (New, Inprogress) tasks under the PBI were in a different iteration and area to new tasks added. Ensuring all open tasks were in the same areapath/iteration resolved the issue.

In my case, I had a features backlog view that choked. I discovered I had user stories as parents of bugs, which were set to be at the requirement level and not the task level (meaning they were nested). Fixing the bug/user

Related

ReflectedWorkItemIDField Name for basic and scrum processes

Azure-devops-migrations-tools only works with custom processes , If we need to use the tool for existing (Basic, Scrum ,CMMI ) , What will be the Reflectedworkitemid Field name for the existing predefined processes in Azure devOps Services .
My requirement is to move work items from one project in one organization to another project different organization in Azure Devops Services.
I am stuck at the reflected workitemID ?
Attaching Logs
[10:47:34 ERR] Error running query
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Scrum.ReflectedWorkItemId]».
at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 40
[10:47:34 FTL] Error while running WorkItemMigration
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51005: The query references a field that does not exist. The error is caused by «[Scrum.ReflectedWorkItemId]».
at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 70
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItems() in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemQuery.cs:line 30
at MigrationTools._EngineV1.Clients.TfsWorkItemMigrationClient.FilterExistingWorkItems(List`1 sourceWorkItems, TfsWiqlDefinition wiqlDefinition, TfsWorkItemMigrationClient sourceWorkItemMigrationClient) in D:\a\1\s\src\MigrationTools.Clients.AzureDevops.ObjectModel\_EngineV1\Clients\TfsWorkItemMigrationClient.cs:line 54
at VstsSyncMigrator.Engine.WorkItemMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 120
at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
Technically, you could of course use an unused field from the original process templates (Scrum, ...) and then change the value accordingly in the configuration (e.g. integrated in build).
Why not just derive the process and add the field as described in the documentation? The inheritance process model actually makes this approach super easy. After migration, you can then simply switch your team project back to the model without the migration field.

Orchard- All Indexes Rebuild Failing

I have been having an issue where Indexes for Search have been failing for a while it seemed like new indexes weren't getting created. I went to rebuild the Search index using that rebuild button, and all the documents that were previously indexed were no longer indexed.
I followed this article without results: Orchard - Search & Indexing issue
This did not work. I think probably because
App_data\Sites\Default\Search.settings.xml
doesn't get generated in the first place. I do however see a file:
App_data\Sites\Default\Search.settings.xml.lock
I believe the Orchard.Indexing.Services.IndexingTaskExecutor UpdateIndexBatch method is failing because my impression is the lock file would be created and then deleted if it was working. Here is a possibly relevant error:
2021-01-08 00:00:41,174 [48] Orchard.Exceptions.DefaultExceptionPolicy - Default - An unexpected exception was caught
(null)
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints)
at Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options)
at Orchard.Indexing.Services.IndexingTaskExecutor.b__0(ContentItemVersionRecord versionRecord)
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__641.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Orchard.Indexing.Services.IndexingTaskExecutor.BatchIndex(String indexName, String settingsFilename, IndexSettings indexSettings) at Orchard.Indexing.Services.IndexingTaskExecutor.UpdateIndexBatch(String indexName) at Orchard.Indexing.Services.UpdateIndexScheduler.UpdateIndex(String indexName) at Orchard.Events.DelegateHelper.<>c__DisplayClass2b2.b__2a(Object target, Object[] p)
at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String messageName, String interfaceName, String methodName, IDictionary2 arguments, IEnumerable& returnValue) at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary2 eventData, IEnumerable& returnValue)
Another error I see that I believe is related to the issue seems to occur in Orchard.Indexing.Handlers.InfosetFieldIndexingHandler
2021-01-08 00:00:02,236 [48] Orchard.ContentManagement.DefaultContentManager - Default - NullReferenceException thrown from IContentHandler by Orchard.Indexing.Handlers.InfosetFieldIndexingHandler
(null)
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.Fields.Fields.DateTimeField.get_DateTime()
at Orchard.Fields.Drivers.DateTimeFieldDriver.b__15(DateTimeField field)
at Orchard.ContentManagement.Handlers.DescribeMembersContext.Enumerate[TField](Func1 enumerate) at Orchard.Fields.Drivers.DateTimeFieldDriver.Describe(DescribeMembersContext context) at Orchard.ContentManagement.Drivers.ContentFieldDriver1.Orchard.ContentManagement.Drivers.IContentFieldDriver.Describe(DescribeMembersContext context)
at Orchard.Indexing.Handlers.InfosetFieldIndexingHandler.<.ctor>b__0(IndexContentContext context, InfosetPart cp)
at Orchard.ContentManagement.Handlers.ContentHandler.InlineStorageFilter1.Indexing(IndexContentContext context, TPart instance) at Orchard.ContentManagement.Handlers.StorageFilterBase1.Orchard.ContentManagement.Handlers.IContentStorageFilter.Indexing(IndexContentContext context)
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.Indexing(IndexContentContext context)
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass99.b__97(IContentHandler handler)
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable1 events, Action1 dispatch, ILogger logger)
To note, I did try to generate a new index and just have it index news articles. This did not work, or generate the settings.xml file either.
Is there a database location that I should be looking at that could be containing null dates, or should I be looking elsewhere? Any help would be greatly appreciated.
Edit: It has been two days and no responses, so I made a post with updated details on git (in case someone is looking for an answer to the same question, and in case git hub has an answer git hub issue)
The solution was found. There was some null data within ContentItemRecord. The null Data and ContentType_id resulted in no indexes being built even unrelated index.
Here is the query we used to find the bad data. The xxxxxx would need to be replaced by whatever prefix is associated with your table, but gives you an idea what to do.
SELECT *
FROM [dbo].[xxxxxx_Orchard_Framework_ContentItemVersionRecord] civr
LEFT JOIN [dbo].[xxxxxx_Orchard_Framework_ContentItemRecord] cir ON civr.ContentItemRecord_id = cir.Id
LEFT JOIN [dbo].[xxxxxx_Orchard_Framework_ContentTypeRecord] ctr ON cir.ContentType_id = ctr.Id
WHERE cir.Id IS NULL OR cir.Data IS NULL OR ctr.Id IS NULL

FluentAssertions throws ArgumentOutOfRangeException when assertion fails (possibly NCrunch related)

I'm using FluentAssertions 5.3.0 run under NCrunch 3.14.0.1. When a test fails, I often seen this error as FluentAssertions tries to generate a report message...
System.ArgumentOutOfRangeException: startIndex cannot be larger than
length of string. Parameter name: startIndex at
System.String.Substring(Int32 startIndex, Int32 length) at
FluentAssertions.CallerIdentifier.ExtractVariableNameFrom(StackFrame
frame) at
FluentAssertions.CallerIdentifier.DetermineCallerIdentity() at
FluentAssertions.Execution.AssertionScope.GetIdentifier() at
FluentAssertions.Execution.AssertionScope.FailWith(String message,
Object[] args) at FluentAssertions.Numeric.NumericAssertions`1.Be(T
expected, String because, Object[] becauseArgs) at
TableTests.ConsolidatedMovementsTester.AlternativingMovementStatesAreRecognised()
in ...test.cs
The error is sporadic - often it will disappear if the test is rerun (in which case, a proper error report is shown). I've seen this in the last couple of versions of both FluentAssertions and NCrunch and it appears on multiple machines (all running some flavour of Visual Studio 2017 Professional).
Here's an example of the latest call to bite me...
results.Count(c => c.IsStationary).Should().Be(5);
where results is an ImmutableArray of POCOs
In this case, right-clicking on the failing test and selecting "rerun in new test runner" in the ncrunch window, caused the test to re-run and FA to emit the correct report.
Can anyone suggest a workaround for this?

TFS 2015.4 Unable to start or detach a collection

I'm having an issue with a particular team project collection on my TFS2015.4. This collection caused issues when I wanted to upgrade TFS sometime ago as well. I was able to detach it in TFS2013.3 and then upgraded. Now I want to upgrade to TFS2017 and I don't know how to resolve the issue with this collection.
TF400868: Job definition not found for JobId d891ac97-ddf1-42df-8242-3cd4bd607790
Here is the current status:
Won't detach
Won't start
Status -> ApplyPatch -> won't execute
Stays Offline
One project inside and stays at 'Deleting' state
If I try to start, I get this error:
TF400783: The host 'MyDAS' cannot be started. The host is in the process of being serviced. The servicing may have failed and needs to be restarted and completed before the host can be started.
I did a pre-production upgrade to TFS2017 and there was a validation error with this collection's state that prevented me from finishing the upgrade.
The detailed log for ApplyPatch Rerun has just one failure point:
[12:29:58.457] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[12:29:58.457] Executing step: Populate commit changes
[12:29:58.457] Executing step: 'Populate commit changes' Git.M83PopulateCommitChanges (1017 of 1201)
[12:29:58.477] [Error] TF400868: Job definition not found for JobId d891ac97-ddf1-42df-8242-3cd4bd607790.
[12:29:58.480] Microsoft.TeamFoundation.Framework.Server.JobDefinitionNotFoundException: TF400868: Job definition not found for JobId d891ac97-ddf1-42df-8242-3cd4bd607790.
[12:29:58.480] at Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobService.ResolveJobPriorityClasses(IVssRequestContext requestContext, IEnumerable`1 jobReferences, ITFLogger logger)
[12:29:58.480] at Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobService.QueueJobsRaw(IVssRequestContext requestContext, IEnumerable`1 jobReferences, JobPriorityLevel priorityLevel, Int32 maxDelaySeconds, ITFLogger logger, Boolean queueAsDormant)
[12:29:58.480] at Microsoft.TeamFoundation.Server.Deploy.TFCollection.GitStepPerformer.M83PopulateCommitChanges(IVssRequestContext requestContext, ServicingContext servicingContext)
[12:29:58.480] at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.PerformHostStep(String servicingOperation, ServicingOperationTarget target, IServicingStep servicingStep, String stepData, ServicingContext servicingContext)
[12:29:58.480] at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.PerformStep(String servicingOperation, ServicingOperationTarget target, String stepType, String stepData, ServicingContext servicingContext)
[12:29:58.480] at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Int32 stepNumber, Int32 totalSteps)
[12:29:58.480] Step failed: Populate commit changes. Execution time: 23 milliseconds.
[12:29:58.480] [StepDuration] 0.0236576
[12:29:58.480] [GroupDuration] 0.2517195
[12:29:58.480] [OperationDuration] 0.2517302
[12:29:58.587] Clearing dictionary, removing all items.
======================================================================================================
Step execution times in descending order
======================================================================================================
Updates all rows in tbl_GitCommit and sets the Status to ... (GitToDev14M83Collection, ToDev14M83Collection) - 227 milliseconds
Populate commit changes (GitToDev14M83Collection, ToDev14M83Collection) - 23 milliseconds
Write service level to stamp (StartInstallUpdates, StartInstallUpdates) - 20 milliseconds
Configure framework servicing tokens (VsspToDev14M71Collection, VsspToDev14M71Collection) - 20 milliseconds
Setup integration environment (TestManagementToDev12M65FinalConfiguration, ToDev12M65FinalConfiguration) - 3 milliseconds
Setup Git environment (GitToDev14M74Collection, ToDev14M74Collection) - 1 millisecond
Setup Git environment (GitToDev14M83Collection, ToDev14M83Collection) - 1 millisecond
Set the collection partition id tokens in servicing context (GitToDev14M83Collection, ToDev14M83Collection) - 1 millisecond
======================================================================================================
Execution times by group in descending order
======================================================================================================
GitToDev14M83Collection (ToDev14M83Collection) - 250 milliseconds
StartInstallUpdates (StartInstallUpdates) - 20 milliseconds
VsspToDev14M71Collection (VsspToDev14M71Collection) - 20 milliseconds
TestManagementToDev12M65FinalConfiguration (ToDev12M65FinalConfiguration) - 3 milliseconds
GitToDev14M74Collection (ToDev14M74Collection) - 1 millisecond
I was pondering the fact that this is a rouge job that needs to be deleted from the databse manually but I mmight be wrong. Any pointer will be greatfully +1-ed.
The main reason for TFS being unable to upgrade team project collections usually is that their data was already either corrupted, incomplete, or stuck between schema versions.
You will need to contact customer support for assistance troubleshooting these data issues and getting your data back to a workable state.
Since there is only one project inside. If you don't care the source control history and have the back up of project. A crude (not recommend) way should be deleting the special project collection, delete the database from SQL Server and create a new collection, restore the project inside.
Also take a look at this similar question with the same error as you: Starting a team project collection after detaching and attaching again
Ultimately, there was no way to recover the collection. So I used the admin command to permanently remove the collection. In my case, n one came back to me asking where the collection go so it's solved for me. I'm running the latest TFS 2017.2 and the rest of the dev are happy.

NHibernate.MappingException - Trouble Shooting Checklist (no persister for)

Here's a starter list:
if hbm is hand generated, is it an embedded resource?
if using FNH, does it pass a PerssistenceSpecification test?
if not using FNH, can you save and then load the persisted class?
use Ayende's "sanity checks"
I'm sure many of you have gotten this one at one point or another. But have you ever gotten it when you knew your mapping was set up correctly?
I started getting this exception after I started using a new repository design, but only in one scenario! PersistenceSpecification tests pass, as do all repository methods (using SQLite).
The scenario that leads to the exception is when legacy projects from a different db are converted to green field system. The legacy system is from a different database and has it's own session factory, which should be irrelevant because the error comes after previously unconverted Projects are retrieved and in memory.
As the routine tries to save these unconverted Projects into the new database, the exception is thrown, full stack trace below.
Any ideas on how to build up the trouble shooting check list and solves this problem?
Cheers,
Berryl
=== the Exception trace =====
failed: NHibernate.MappingException : No persister for: Smack.ConstructionAdmin.Domain.Model.Projects.Project
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String entityName)
at NHibernate.Impl.SessionImpl.GetEntityPersister(String entityName, Object obj)
at NHibernate.Engine.ForeignKeys.IsTransient(String entityName, Object entity, Nullable`1 assumed, ISessionImplementor session)
at NHibernate.Event.Default.AbstractSaveEventListener.GetEntityState(Object entity, String entityName, EntityEntry entry, ISessionImplementor source)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
NHibernate\Repository\FabioNHibRepository.cs(46,0): at Smack.Core.Data.NHibernate.Repository.FabioNHibRepository`1.Add(T item)
LegacyConversion\LegacyBatchUpdater.cs(20,0): at Smack.ConstructionAdmin.Data.LegacyConversion.LegacyBatchUpdater.ConvertOpenLegacyProjects(ILegacyProjectDao legacyProjectDao, IProjectRepository greenProjectRepository)
Data\Brownfield\ProjectBatchUpdate_SQLiteTests.cs(19,0): at Smack.ConstructionAdmin.Tests.Data.Brownfield.ProjectBatchUpdate_SQLiteTests.Test()
The problem here turned out to be that I was inadvertently binding the same session context to both the legacy and greenfield db session factories, first to the greenfield and then the legacy.