Vs 2022 Build fail

Sushil Agarwal 381 Reputation points
2021-11-08T22:03:06.507+00:00

Dear experts
I am unable to build project in vs2022 and getting following error, how can i resolve it ?

Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of "Microsoft.SqlServer.Types" that could not be resolved.
There was a conflict between "Microsoft.SqlServer.Types, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.SqlServer.Types, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91".
"Microsoft.SqlServer.Types, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" was chosen because it was primary and "Microsoft.SqlServer.Types, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" was not.
References which depend on "Microsoft.SqlServer.Types, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" [e:\22vs\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll].
e:\22vs\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll
Project file item includes which caused reference "e:\22vs\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll".
Microsoft.SqlServer.Types, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
References which depend on "Microsoft.SqlServer.Types, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.Types\v4.0_15.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll].
e:\22vs\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1484.0\lib\net40\Microsoft.ReportViewer.Common.dll
Project file item includes which caused reference "e:\22vs\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1484.0\lib\net40\Microsoft.ReportViewer.Common.dll".
Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
KIToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cb07204e9076e915, processorArchitecture=MSIL
Microsoft.ReportViewer.Design, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
e:\22vs\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1484.0\lib\net40\Microsoft.ReportViewer.DataVisualization.dll
Project file item includes which caused reference "e:\22vs\packages\Microsoft.ReportingServices.ReportViewerControl.Winforms.150.1484.0\lib\net40\Microsoft.ReportViewer.DataVisualization.dll".
Microsoft.ReportViewer.DataVisualization, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
Microsoft.ReportViewer.WinForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
KIToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cb07204e9076e915, processorArchitecture=MSIL
Microsoft.ReportViewer.Design, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VSDesigner\v4.0_14.0.0.0__b03f5f7f11d50a3a\Microsoft.VSDesigner.dll
Project file item includes which caused reference "C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VSDesigner\v4.0_14.0.0.0__b03f5f7f11d50a3a\Microsoft.VSDesigner.dll".
Microsoft.ReportViewer.Design, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL Kings ERP

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,319 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,296 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 57,241 Reputation points
    2021-11-08T23:45:42.547+00:00

    this is a pretty typical msbuild error. your project references two versions if the same library. it is best to resolve by using the same library with with nuget package manager

    if you can not upgrade the older version, then you will need to do binding redirect:

    https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions

    0 comments No comments

  2. Sushil Agarwal 381 Reputation points
    2021-11-09T10:56:47.847+00:00

    after reading the suggetions it instited me to upgrade nuget packages in other aseemblies

    now at last i am getting following error while building the project, can some body guide how to fix it

    Severity Code Description Project File Line Suppression State
    Error The "ResolveManifestFiles" task failed unexpectedly.
    System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: name
    v4.0_12.0.0.0_de_89845dcd8080cc91 is an invalid culture identifier.
    at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
    at Microsoft.Build.Tasks.ResolveManifestFiles.GetItemCulture(ITaskItem item)
    at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssemblies(List1 publishInfos, List1 assemblyList)
    at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssembliesAndSatellites(List1 assemblyPublishInfos, List1 satellitePublishInfos)
    at Microsoft.Build.Tasks.ResolveManifestFiles.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Kings ERP


  3. Sushil Agarwal 381 Reputation points
    2021-11-16T19:17:00.2+00:00

    I build the project again mnually adding all refrences, forms etc.

    it was a overkill excersize

    still few of the forms are excluded due to unsolvable error on XSD, windows management related forms

    its surprissing since last week no body helped on the build issue


  4. Julius Ski 1 Reputation point
    2022-03-25T12:49:13.357+00:00

    It is still broken, does not allow to Publish application (.NET Framework 4.8):

    Severity    Code    Description Project Path    File    Line    Suppression State
    Error       The "ResolveManifestFiles" task failed unexpectedly.
    System.Globalization.CultureNotFoundException: Culture is not supported.
    Parameter name: name
    References is an invalid culture identifier.
       at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
       at Microsoft.Build.Tasks.ResolveManifestFiles.GetItemCulture(ITaskItem item)
       at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssemblies(List`1 publishInfos, List`1 assemblyList)
       at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssembliesAndSatellites(List`1 assemblyPublishInfos, List`1 satellitePublishInfos)
       at Microsoft.Build.Tasks.ResolveManifestFiles.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()   
    

    Turning off ClickOnce solves this issue, but I cannot Publish an app without ClickOnce security enabled.