Hello
I upgraded to NT 8.1.6.2 (from 8.1.6.1) and everything work fine, and I can also compile my custom code.
Soon as I copy my saved db folder to overwrite the empty one from the new installation then I’m getting this compilation error from NT8 editor. I can compile with VS (Visual Studio) but not from the NT8 Editor.
Error:
“2025-12-18 10:22:03:726|0|4|Unable to load custom assembly: The process cannot access the file ‘C:\Users\w\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll’ because it is being used by another process.”
I use ProcessExplorer from Sysinternal and no application hold the NinjaTrader.Custom.dll except NT8 and this is it.
If I close NT, then no other process hold NinjaTrader.Custom.dll
I’ve tried uninstallnig/reinstalling NT8 100 times, rebooting but nothing works. I tried all the Database repair options thinking that might be the db that is corrupted, I tried FusionLog but nope…same error
I literaly wasted a week+ of work on this.
Note I do have custom code, but I do not think this is involve as it compile when I first install NT, the problem occur jsut after I copy the db file over
Step to reproduce for my issue
1- install latest version of NT
2- start NT and compile
at this point this compile
3- shutdown NT
3- copy db folder with data over NT8\db folder
4- start NT and compile
Bug “Unable to load custom assembly: The process cannot access the file ‘C:\Users\w\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll’ because it is being used by another process.”
How do I fix this?
thanks
w
Log file:
2025-12-12 08:25:33:484|2|4|Session Break (Version 8.1.6.1)
2025-12-12 08:25:52:704|1|4|Global simulation mode disabled
2025-12-12 08:25:54:028|1|2|Using IS (is-us-nt-005.ninjatrader.com/31658)
2025-12-12 08:25:54:051|1|4|Automated trading disabled
2025-12-12 08:25:54:272|1|32|Order entry hot keys disabled
2025-12-12 08:25:54:274|1|4|Auto close enabled=False
2025-12-12 08:25:55:611|1|4|Restoring workspace ‘TheInternationalTrader_Downalod_MarketData’…
2025-12-12 08:26:35:640|0|4|Unable to load custom assembly: The process cannot access the file ‘C:\Users\w\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll’ because it is being used by another process.
Trace file:
******************* Session Start (Version 8.1.6.1) *******************
2025-12-12 08:25:49:279 Cbi.Globals.MachineId: True/True ccccccccccccccccccccccccccccccccccc
2025-12-12 08:25:49:280 NinjaTrader.Gui.LoginInternal user=‘foo@foo.com’ mode=‘Simulation’
2025-12-12 08:25:49:508 Core.Instrumentation.ActivitySource: enabled=True randomPercent=31.57949 enabledSessionsPercent=100 chartMs=250 enabledTypes=‘ChartPerformance Application NinjaScript Adapter Login ’
2025-12-12 08:25:49:551 Core.Instrumentation.LogActivity: activityType=Login errorCode=NoError errorMessage=’’
2025-12-12 08:25:50:054 (Simulation) NinjaTrader.Core.Authentication.GetAccessToken6
2025-12-12 08:25:50:056 (Simulation) NinjaTrader.Core.Authentication.QueueAccessTokenRenewal0 expSpanSeconds=‘4800.1284394’ renewSecs=‘2400.0642197’
2025-12-12 08:25:50:525 Cbi.UserEntitlement.VerifyAsync.0 apiUrl=‘https://live.tradovateapi.com’
2025-12-12 08:25:50:841 Cbi.UserEntitlement.VerifyAsync.98: OrderFlowPlus expiration=2098-12-31, MultiBroker expiration=2098-12-31, OrderFlowPlus expiration=2100-01-01, Evaluation expiration=2095-12-01
2025-12-12 08:25:51:103 NinjaTrader.Gui.LoginInternal4-5
2025-12-12 08:25:51:113 PrimaryMonitorWPFDPIScale=1.00
2025-12-12 08:25:51:405 Cbi.UserEntitlement.VerifyAsync.99: subscription=Lifetime licensedProviders=‘Playback Simulator NinjaTrader NinjaTrader Continuum NinjaTrader FXCM IQFeed E-Signal External FOREX.com Interactive Brokers Barchart.com Kinetick FXCM Coinbase cTrader Schwab Rithmic for NinjaTrader Brokerage Custom0 Custom2 Custom3 Custom4 Custom6 Custom7 Custom8 Custom9 Custom10 Provider13 Custom14 Provider26 Custom15 Custom16 Custom17 Custom18 Custom19 Custom20 Custom21 Custom22 Custom23 Custom24 Custom25 Custom26 Custom27 Custom28 Custom29 Custom30 Custom31 Custom32 Custom33 Custom34 Custom35 Custom36 Custom37 Custom38 Custom39 Custom40’
2025-12-12 08:25:51:456 InstallDir=‘C:\Program Files\NinjaTrader 8'
2025-12-12 08:25:51:456 UserDataDir=‘C:\Users\w\Documents\NinjaTrader 8'
2025-12-12 08:25:51:456 MachineID=‘cccccccccccccccccccccccccccc’
2025-12-12 08:25:51:456 OS=‘Microsoft Windows NT 10.0.19045.0’/‘Win32NT’
2025-12-12 08:25:51:456 OSLanguage=‘en-GB’
2025-12-12 08:25:51:456 OSEnvironment=‘64bit’
2025-12-12 08:25:51:456 Processors=12
2025-12-12 08:25:51:456 ThreadPool: minWorkerThreads=12 maxWorkerThreads=32767 minCompletionPortThreads=12 maxCompletionPortThreads=1000
2025-12-12 08:25:52:494 ProcessorSpeed=3.3 GHz
2025-12-12 08:25:52:494 PhysicalMemory=65536 MB
2025-12-12 08:25:52:529 DisplayAdapters=2/Microsoft Remote Display Adapter|NVIDIA GeForce GTX 1660 Ti
2025-12-12 08:25:52:529 Monitors=2/3840x2160|3840x2160
2025-12-12 08:25:52:529 .NET/CLR Version=‘4.8’/64bit
2025-12-12 08:25:52:530 SQLiteVersion=‘1.0.116.0’
2025-12-12 08:25:52:530 ApplicationTimezone=EST -3 hour(s)
2025-12-12 08:25:52:530 ApplicationTimezone=UTC -8 hour(s)
2025-12-12 08:25:52:530 LocalTimezone=EST -3 hour(s)
2025-12-12 08:25:52:530 LocalTimezone=UTC -8 hour(s)
2025-12-12 08:25:52:704 DirectXRenderingHW
2025-12-12 08:25:52:704 Copying custom assemblies…
2025-12-12 08:25:52:713 Loading custom assemblies…
2025-12-12 08:25:52:713 Loading C:\Users\w\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.dll…
2025-12-12 08:25:52:857 Loading C:\Users\w\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Vendor.dll…
2025-12-12 08:25:52:872 Deleting temporary files…
2025-12-12 08:25:53:072 Copying db and restoring templates…
2025-12-12 08:25:53:078 Loading third party assemblies…
2025-12-12 08:25:53:100 Initializing database…
2025-12-12 08:25:53:100 Loading master instruments…
2025-12-12 08:25:53:221 (Db) Cbi.DB.get_Current.CreateConnection.Start
2025-12-12 08:25:53:221 (Db) Cbi.DB: connectionString=‘Data Source=“C:\Users\w\Documents\NinjaTrader 8\db\NinjaTrader.sqlite”;Version=3;Synchronous=Full;Journal Mode=Off;Pooling=True;Max Pool Size=100;foreign keys=true;’
2025-12-12 08:25:53:611 (Db) Cbi.DB.get_Current.CreateConnection.End
2025-12-12 08:25:53:675 Loading instruments…
2025-12-12 08:25:53:932 Loading accounts…
2025-12-12 08:25:54:015 Loading users…
2025-12-12 08:25:54:016 Downloading server info…
2025-12-12 08:25:54:016 Starting instrument management…
2025-12-12 08:25:54:028 Server.HdsClient.Connect: type=IS server=‘is-us-nt-005.ninjatrader.com’ port=31658 system=‘NT’ useSsl=True
2025-12-12 08:25:54:031 Starting timer…
2025-12-12 08:25:54:031 Creating file type watcher…
2025-12-12 08:25:54:032 Setting ATI…
2025-12-12 08:25:54:051 Connecting ATI server…
2025-12-12 08:25:54:051 Server.AtiServer.Connect0
2025-12-12 08:25:54:052 Starting adapter server…
2025-12-12 08:25:54:052 Server.AtiServer.Connect1: Port=‘36973’
2025-12-12 08:25:54:052 Server.AtiServer.Connect2
2025-12-12 08:25:54:060 Starting bars dictionary…
2025-12-12 08:25:54:060 Starting recorder…
2025-12-12 08:25:54:061 Starting server(s)…
2025-12-12 08:25:54:076 Core.Globals.ApplicationStart.Commission: minVersion=1 maxVersion=3138
2025-12-12 08:25:54:076 Core.Globals.ApplicationStart.InstrumentList: minVersion=1 maxVersion=475
2025-12-12 08:25:54:076 Core.Globals.ApplicationStart.MasterInstrument: minVersion=1 maxVersion=9897
2025-12-12 08:25:54:076 Core.Globals.ApplicationStart.Risk: minVersion=1 maxVersion=13971
2025-12-12 08:25:54:076 Core.Globals.ApplicationStart.TradingHours: minVersion=-4859 maxVersion=5111
2025-12-12 08:25:54:254 ChartHotKeys: Alerts=’’ DisableAllAlerts=‘’ EnableAllAlerts=‘’ DataSeries=‘Ctrl+F’ Indicators=‘Ctrl+I’ Strategies=‘Ctrl+S’ Properties=‘Ctrl+T’ CrosshairPointer=‘Ctrl+R’ CrosshairLocal=‘Ctrl+Q’ CrosshairGlobal=‘Ctrl+G’ CrosshairGlobal2=‘Ctrl+N’ CrosshairLock=‘Ctrl+L’ AutoScaleAndReturn=‘’ CyclePlotExecutions=‘Ctrl+E’ ReloadHistoricalData=‘Ctrl+Shift+R’ ReloadNinjaScript=‘F5’ SaveChartImage=‘Alt+S’ ShowDataBox=‘Ctrl+D’ ShowChartTrader=‘’ ShowChartTraderHidden=‘’ ShowIndicators=‘’ ShowScrollBar=‘’ SnapModeBar=‘Ctrl+Shift+F3’ SnapModeBarTick=‘Ctrl+Shift+F4’ SnapModeBarObject=‘’ SnapModeDisabled=‘Ctrl+Shift+F5’ SnapModeTick=‘Ctrl+Shift+F6’ StayInDrawMode=‘Ctrl+Shift+F2’ ZoomIn=‘Ctrl+Alt+Z’ ZoomOut=‘Ctrl+Alt+O’ BarSpacingPlus=‘Ctrl+Down’ BarSpacingMinus=‘Ctrl+Up’ BarWidthPlus=‘Alt+Down’ BarWidthMinus=‘Alt+Up’ Arc=‘Ctrl+F7’ AndrewsPitchfork=‘Ctrl+F8’ ArrowDown=‘Alt+F3’ ArrowLine=‘Ctrl+F2’ ArrowUp=‘Alt+F2’ Diamond=‘Alt+F5’ Dot=‘Alt+F6’ Ellipse=‘Ctrl+F11’ ExtendedLine=‘F4’ FibonacciCircle=‘F11’ FibonacciExtension=‘F9’ FibonacciRetracement=‘F8’ FibonacciTimeExtension=‘F10’ GannFan=‘Ctrl+F9’ HorizontalLine=‘F6’ Line=‘F2’ Path=‘’ Polygon=‘’ VolumeProfile=‘’ VWAP=‘’ Ray=‘F3’ Rectangle=‘Ctrl+F12’ RegressionChannel=‘Ctrl+F9’ HideDrawingObjects=‘’ RemoveDrawingObjects=‘Ctrl+Shift+F7’ RegionHighlightX=‘Shift+F1’ RegionHighlightY=‘Shift+F2’ RiskReward=‘Ctrl+F4’ Ruler=‘Ctrl+F3’ Square=‘Alt+F7’ Text=‘F12’ TimeCycles=‘’ TrendChannel=‘Ctrl+2’ Triangle=‘Ctrl+F6’ TriangleDown=‘Alt+F9’ TriangleUp=‘Alt+F8’ VerticalLine=‘F7’
2025-12-12 08:25:54:259 GlobalHotKeys: CloseWorkspace=‘’ NextWorkspace=‘Shift+F3’ PreviousWorkspace=‘’ SaveWorkspace=‘’ SaveAllWorkspaces=‘’ NewAccountData=‘’ NewTradePerformance=‘’ NewAlertsLog=‘’ NewBasicEntry=‘’ NewChart=‘’ NewFxBoard=‘’ NewFxPro=‘’ NewHotListAnalyzer=‘’ NewLevel2=‘’ NewMarketAnalyzer=‘’ NewMarketWatch=‘’ NewNews=‘’ NewNinjaScriptEditor=‘’ NewNinjaScriptOutput=‘’ NewOrderTicket=‘’ NewStrategyAnalyzer=‘’ NewDynamicDom=‘’ NewStaticDom=‘’ NewTimeAndSales=‘’ CancelAllOrders=‘’ FlattenEverything=‘’ OpenInstrumentManager=‘’ OpenInstrumentList=‘’ OpenDatabase=‘’ OpenHotKeyManager=‘’ OpenHistoricalData=‘’ OpenCommission=‘’ OpenRisk=‘’ OpenTradingHoursManager=‘’ OpenRemoveNinjaScript=‘’ CloseOtherTabs=‘’ CloseTab=‘’ DuplicateInNewTab=‘’ DuplicateInNewWindow=‘’ Export=‘’ Find=‘Ctrl+F’ MoveToNewWindow=‘’ Print=‘Ctrl+P’ Replace=‘Ctrl+H’ Share=‘Ctrl+Shift+S’ LoadTemplate=‘’ SaveTemplate=‘’ SaveTemplateAsDefault=‘’
2025-12-12 08:25:54:260 MarketAnalyzerHotKeys: AddBlankRow=‘’ AddLabelRow=‘’ Columns=‘’ Alerts=‘’ EnableAllAlerts=‘’ DisableAllAlerts=‘’ AutoSort=‘’ RowFilter=‘’ ReloadHistorical=‘Ctrl+Shift+R’ ReloadNinjaScript=‘F5’
2025-12-12 08:25:54:269 NinjaScriptEditorHotKeys: InsertCodeSnippet=‘F2’ FindNext=‘F3’ Compile=‘F5’ GoToLine=‘Ctrl+G’ CommentSelection=‘Ctrl+K’ InlineSyntaxChecking=‘Ctrl+Alt+S’ CollapseToDefinitions=‘’ ExpandAllOutlining=‘’ StartOutlining=‘’ StopOutlining=‘’ HideSelection=‘’ StopHidingSelection=‘’ ToggleAllOutlining=‘’ ToggleOutlining=‘’ Save=‘Ctrl+S’ Undo=‘Ctrl+Z’ Redo=‘Ctrl+Y’
2025-12-12 08:25:54:272 OrderEntryHotKeys: BuyAsk=‘’ BuyBid=‘’ BuyMarket=‘’ SellAsk=‘’ SellBid=‘’ SellMarket=‘’ BreakevenAtmStrategy=‘’ BreakevenPosition=‘’ CancelLastOrder=‘’ CloseAtmStrategy=‘’ ClosePosition=‘’ DecreaseLastOrderPrice=‘’ IncreaseLastOrderPrice=‘’ ModifyLastOrder2Fill=‘’ Reverse=‘’ OcoOrder=‘’ SimulatedOrder=‘’
2025-12-12 08:25:54:272 SuperDomHotKeys: Center=‘’ Columns=‘’ Indicators=‘’ ReloadAllHistoricalData=‘Ctrl+Shift+R’ ReloadNinjaScript=‘F5’
2025-12-12 08:25:54:272 OrderEntryHotKeys=disabled
2025-12-12 08:25:54:274 AutoClose=disabled
2025-12-12 08:25:54:744 Core.Instrumentation.LogActivity: activityType=Application errorCode=NoError errorMessage=‘’
2025-12-12 08:25:54:840 Server.HdsClient.ProcessStartupInfo.Info0: Commissions=0 InstrumentLists=9 MasterInstruments=0 Messages=4 Risks=0 RolloverCollection=263 TradingHours=0
2025-12-12 08:25:56:298 Server.HdsClient.ProcessStartupInfo.Info1: Commissions=0.01ms InstrumentLists=0.95ms MasterInstruments=0.11ms Messages=3.98ms Risks=0.14ms RolloverCollection=1452.40ms TradingHours=0.11ms
2025-12-12 08:25:56:312 Starting server message polling timer with interval 3600 seconds…
2025-12-12 08:25:59:140 Core.Instrumentation.LogActivity: activityType=ChartPerformance errorCode=NoError errorMessage=‘’
2025-12-12 08:26:01:671 Core.Instrumentation.LogActivity: activityType=ChartPerformance errorCode=NoError errorMessage=‘’
2025-12-12 08:26:03:200 Core.Instrumentation.LogActivity: activityType=NinjaScript errorCode=NoError errorMessage=‘’
2025-12-12 08:26:03:291 1 Chart Chart1Tab1 1 Ser 1 Ind 0 DrawObj

