Closed Mr-Pearce closed 1 year ago
@Mr-Pearce my best guess is that you have some sort of dependency conflict, where one dependency in your system is build against Npgsql 5.0.10, and the other against 5.0.12 - or some deployment mixup. It doesn't seem to have anything to do with Npgsql itself.
If you can isolate this in a code sample which you can share, I can take a look.
Cant really Isolate it or reproduce it.
First i thought it would be our installer but in about 10 new installers i tested, every time some test computer gets an error like above and every time its Npgsql.dll
(tried in different versions of it)
I Also thought of some version mismatch.
I could check the versions on a machine where the bug shows.
Its a self containing deployment so all dlls are in the bin folder.
The npgsql dll was 5.0.12, there was no 5.0.10 also error above says (translated)
"The process cannot access the file because it is being used by another process."
I checked the process Explorer but only the current version was open.
Could it be the Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10"
it Depends on Npgsql(>= 5.0.10)
When i check the versions with ([system.reflection.assembly]::loadfile("C:\pathtodll\Npgsql.dll")).FullName
i get
Npgsql, Version=5.0.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
Npgsql.EntityFrameworkCore.PostgreSQL, Version=5.0.10.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7
both not really match with my error
Closing for age, and since our logging implementation has substantially changed in more recent versions. If the error still occurs on newer versions, please open a new issue.
Steps to reproduce
Random csproj nugets
The issue
I Made an update to my Windows Service and since then some testers random gets this error. But its usually gone after i restart the service manually there. (but cant do it on hundreds of customers)
Note my Npgsql Version is
5.0.12.0
and not5.0.10.0
I Also tried removinglogging.AddEventLog();
from ConfigureLogging(last lines of error log indicates it) but it still happened.Further technical details
Npgsql version: Npgsql Version 5.0.12 Npgsql.EntityFrameworkCore.PostgreSQL Version 5.0.10 PostgreSQL version: PostgreSQL 10.4, compiled by Visual C++ build 1800, 64-bit Operating system: windows 10
Other details about my project setup: