Results 1 to 3 of 3

Thread: Visual studio and Npgsql

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    15

    Visual studio and Npgsql

    I am tryng to retrieve data from an online postgresql database.
    i can see table data on "preview"

    Name:  1.jpg
Views: 384
Size:  30.2 KB

    but when i try to build my exe i recieve these errors:
    Gravità Codice Descrizione Progetto File Riga Stato eliminazione
    Avviso sono stati rilevati conflitti non risolvibili tra versioni diverse di "System.Threading.Tasks.Extensions".
    Conflitto tra "System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" e "System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
    È stato scelto "System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" perché era primario, mentre "System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" non lo era.
    Riferimenti che dipendono da "System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\System.Threading.Tasks.Extensions.dll].
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\System.Threading.Tasks.Extensions.dll
    Elementi include del file di progetto che hanno causato il riferimento "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\System.Threading.Tasks.Extensions.dll".
    System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL
    Riferimenti che dipendono da "System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [C:\Users\carto\appdata\local\microsoft\visualstudio\16.0_575a767d\extensions\bxc0hgfi.tj1\System.Thr eading.Tasks.Extensions.dll].
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Bcl.AsyncInterfaces.dll
    Elementi include del file di progetto che hanno causato il riferimento "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Bcl.AsyncInterfaces.dll".
    Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
    Npgsql
    System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL
    C:\Users\mypath\appdata\local\microsoft\visualstudio\16.0_575a767d\extensions\bxc0hgfi.tj1\Npgsql.dl l
    Elementi include del file di progetto che hanno causato il riferimento "C:\Users\mypath\appdata\local\microsoft\visualstudio\16.0_575a767d\extensions\bxc0hgfi.tj1\Npgsql.d ll".
    Npgsql
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\System.Text.Json.dll
    Elementi include del file di progetto che hanno causato il riferimento "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\System.Text.Json.dll".
    System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL
    Npgsql WindowsApp4

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Visual studio and Npgsql

    The error message that you kindly didn't bother to translate for us is telling you that there is a conflict between two different versions of the specified assembly. It appears that versions 4.2.0.0 and 4.2.0.1 are being referenced in different places. You need to make sure that only one version is being referenced. Obviously you would prefer it to be the later version but if there is an indirect reference to the older version somewhere that you cannot change, you'll need to change any other references to the older version too.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2021
    Posts
    15

    Re: Visual studio and Npgsql

    Quote Originally Posted by jmcilhinney View Post
    The error message that you kindly didn't bother to translate for us is telling you that there is a conflict between two different versions of the specified assembly. It appears that versions 4.2.0.0 and 4.2.0.1 are being referenced in different places. You need to make sure that only one version is being referenced. Obviously you would prefer it to be the later version but if there is an indirect reference to the older version somewhere that you cannot change, you'll need to change any other references to the older version too.
    sorry if i didn't translate the error.. but were really few words..

    so i have to check references in project and try to choice only the 4.2.0.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width