Error when starting Sambapos

My development Sambapos system has been working fine for several years but I am now getting an error on startup as follows


I can still access the database with SSMS so I don’t think this is the issue. I have completely uninstalled and reinstalled SambaPOS but the issue is still there and I am unable to start the application.

The log is shown below and I think is saying this is a .NET error rather than anything to do with SambaPOS however, I am not sure if that is the case or what to do next.

[Exception Info 1]

Top-level Exception
Type: System.ComponentModel.Composition.CompositionException
Message: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

  1. Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.

Resulting in: The type initializer for ‘DevExpress.Xpf.Utils.Themes.ThemeKeyExtensionGeneric’ threw an exception.

Resulting in: Set property ‘System.Windows.Controls.ContentControl.Content’ threw an exception.

Resulting in: An exception occurred while trying to create an instance of type ‘Samba.Presentation.Shell’.

Resulting in: Cannot activate part ‘Samba.Presentation.Shell’.
Element: Samba.Presentation.Shell → Samba.Presentation.Shell → DirectoryCatalog (Path=“C:\Program Files (x86)\SambaPOS5”)

Resulting in: Cannot get export ‘Samba.Presentation.Shell (ContractName=“Samba.Presentation.Shell”)’ from part ‘Samba.Presentation.Shell’.
Element: Samba.Presentation.Shell (ContractName=“Samba.Presentation.Shell”) → Samba.Presentation.Shell → DirectoryCatalog (Path=“C:\Program Files (x86)\SambaPOS5”)

Source: System.ComponentModel.Composition
Stack Trace: at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
at Samba.Presentation.Bootstrapper.CreateShell()
at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)
at Samba.Presentation.App.RunInReleaseMode()

[Assembly Info]

mscorlib, Version=
System, Version=
Samba.Services, Version=5.3.7816.39267
Samba.Domain, Version=5.3.7816.39266
Samba.Infrastructure.Data, Version=5.3.7816.39266
System.ComponentModel.Composition, Version=
Samba.Presentation.Services, Version=5.3.7816.39270
System.Core, Version=
PresentationCore, Version=
WindowsBase, Version=
PresentationFramework, Version=
DevExpress.Xpf.LayoutControl.v17.2, Version=
System.Xml, Version=
DevExpress.Xpf.Grid.v17.2, Version=
DevExpress.Xpf.Grid.v17.2.Core, Version=
System.Xaml, Version=
Samba.Infrastructure, Version=5.3.7816.39262
Microsoft.Practices.Prism, Version=
System.Runtime.Serialization, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
DevExpress.Xpf.Core.v17.2, Version=
System.Windows.Forms, Version=
System.Drawing, Version=
Samba.Persistance, Version=5.3.7816.39267
Stateless, Version=
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=5.3.7816.39263
ReachFramework, Version=
EntityFramework, Version=
FluentValidation, Version=
NCalc, Version=
Microsoft.CSharp, Version=
Omu.ValueInjecter, Version=
Microsoft.Practices.ServiceLocation, Version=
DevExpress.Data.v17.2, Version=
WindowsInput, Version=

[System Info]

Operating System
-Microsoft Windows 11 Home Single Language
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 420
–FreePhysicalMemory = 15615132
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.22598

A recent windows 11 patch caused that. Are you on win 11 preview?

Yes, Windows Insider program. Must have been a very recent update, everything was working fine three days ago.

So is there a solution other than roll back the latest update?

Microsoft broke something. You must roll back for now. Its not an official update it is specifically the one from insider track so there is a chance this will happen. Usually i don’t see any issues come up like this but apparently this time we were not so lucky.

I would not recommend getting Win11 just yet, one of my clients did it and most of the things are misfiring, printer drivers are broken, cant use image tags on your invoices among many other things.

That solved the problem, last update 17 April rolled back and all working again.

Just to clarify in case anybody else sees this issue, contrary to my original post, this actually broke the database so unable to start MSSQL server express. Seems that when the update first occurred the database must have already been running and I was able to access it. After rebooting, connection to the database was lost and problems occurred.

Thanks to @Jesse.

With regards to running Windows 11 on a production system, I have it running in two restaurants with no issues. This problem was on my personal laptop which I use as a development system and is also linked with the Windows Insider program, it was the Insider preview that caused the issue. A bit of a worry however that MS seem to have managed to break their own software!

1 Like