Trying to Use System.Diagnostics.Process v4.3 Encounters a v4.1 Not Found Error - nuget-package

I have the "System.Diagnostics.Process" v4.3 NuGet installed but when trying to use one of its functions I encounter a "can't find v4.1" error.
I needed the Nuget. I initially installed v4.1 because I am working on software supporting older OS's, but it was not compatible so I install v4.3 which was compatible with my solution.
I have searched for code/files referencing the library, but none seem to specify it other than the csproject which references the v4.3 version. I have reinstalled the NuGet. I have clean the solution and deleted the bin/obj directories. I have clean the NuGet caches and force a reload. The v4.3 DLL is present in a number of paths/folders, but not v4.1 DLL.
Is there somewhere else that I should look for the specification/path of the lib being used?
Error:
{System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.Process, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Diagnostics.Process, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Sentry.CognitiveServices.GetPathWithGetMappedFileName(SafeMemoryMappedViewHandle memoryMappedViewHandle)
at Sentry.CognitiveServices.<SpeakNarrative>d__13.MoveNext()}
Expect V4.3 to be referenced, not v4.1.

Related

Azure Notification Hub Client run time error

Downloaded latest Microsoft.Azure.NotificationHubs NuGet package used the NotificationHubClient to create an installation this.HubClient.CreateOrUpdateInstallation(installation);
All the default dependent packages were used when adding the NuGet. When testing I am receiving the following error:
Could not load file or assembly 'Microsoft.Extensions.Options, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I assume this is widely used. How do I get past this?
This is version conflict issue. Remove all your old version package and reinstall Microsoft.Extensions.Options, it will work 👍

CS0012 The type 'XtraReport' is defined in an assembly that is not referenced

I recently updated my visual studio to 2017 Enterprise.
I used to use DevExpress v15.1
Today, I upgraded my DevExpress to version 18.1 and when I build my .Net MVC5 Application Solution, I got the following error
The type 'XtraReport' is defined in an assembly that is not
referenced. You must add a reference to assembly
'DevExpress.XtraReports.v15.1, Version=15.1.8.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a'.
The above Error is located in ReportController.cs
I checked my references Folder under the project to find that the DevExpress.XtraReports.v18.1 is there.
What might be the cause of this error?.
Thank you for your help.
Based from the message, the XtraReport still references the older version of its DLL assembly:
'DevExpress.XtraReports.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'
Usually this problem occurred because Project Converter failed to update XtraReport related references after upgrade. In this case, you can manually remove all references to older assemblies (version 15.1) and then add references to new assemblies (version 18.1).
Also make sure that web.config file has these assembly information like below example (X indicates revision number):
<add assembly="DevExpress.XtraReports.v18.1, Version=18.1.X.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<add assembly="DevExpress.XtraReports.v18.1.Web, Version=18.1.X.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
If the solution above failed, try install the assemblies to the Global Assembly Cache (GAC) by navigating to X:\Windows\assembly (X stands for the system drive letter) and copy all new DevExpress assemblies to that folder (including DevExpress.XtraReports.v18.1), as mentioned in this issue.
Related issues:
Errors after upgrading DevExpress version
DevExpress.XtraReports.UI.XtraReport is not defined after upgrade
The type 'DevExpress.XtraReports.UI.XtraReport' is defined in an assembly that is not referenced

Microsoft.SharePoint.Client.Runtime.Portable is missing

I upgraded my site from Kentico 10.0 to 11.0. When I load site then I am getting the following error
Reference.svcmap: Could not load file or assembly
'Microsoft.SharePoint.Client.Runtime.Portable, Version=16.1.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its
dependencies. The system cannot find the file specified.
I installed an SDK package and also tried Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.7414.1200 but not getting 'Microsoft.SharePoint.Client.Runtime.Portable' dll.
Could you please suggest a solution for me?
Open the NuGet package manager in VS and make sure all projects reference the same version of the Microsoft.SharePointOnline.CSOM package, which should be 16.1.6621.1200 according to the documentation.

How to fix Newtonsoft.Json assembly loading error?

I'm attempting to load a pre-existing Umbraco CMS site into a Visual Studio project and am caught up in a bit of DLL hell.
Here is the error message I get when attempting to compile the site:
Could not load types from assembly Umbraco.Core, Version=1.0.5462.37503, Culture=neutral, PublicKeyToken=null, errors:
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
I've attempted to re-install Newtonsoft from NuGet, re-install Umbraco from NuGet, delete all DLLs and re-install, removed the Newtonsoft dependentAssembly, every possible solution I've been able to find and this error continues to come up.
Any suggestions?
I'm guessing the binding redirect isn't set up correctly in the web.config file. Try running this in the nuget package manager console:
PM> Get-Project –All | Add-BindingRedirect
This ended up being a bit of a misunderstanding on my part from following the Umbraco videos. I was attempting to set up a new Visual Studio project, import all the DLLs needed, and then move the site content into the project.
All I really needed to do was create a blank project, then move the site content, with all of its DLLs, into the project. This let me immediately start editing the project.
The best solution was to install an earlier version of the package and then upgrade.

How to resolve the c# build warning Found conflicts between different versions of the same dependent assembly

There are multiple warnings for multiple versions of same assembly are getting download at the time of build like mentioned below. Also one more point, most of these assemblies are getting downloaded because of dependencies in the Nuget.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Found conflicts between different versions of the same dependent assembly.
2> There was a conflict between "Ionic.Zip, Version=1.9.1.5, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c" and "Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c".
2> "Ionic.Zip, Version=1.9.1.5, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c" was chosen because it was primary and "Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c" was not.
2> References which depend on "Ionic.Zip, Version=1.9.1.5, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c" [C:\TFS\DSCNC\Dev\CatalogServices\Background\packages\DotNetZip.1.9\lib\Ionic.Zip.dll].
One of the way to resolve this issue would be to check in the latest assembly in Packages folder.
Is there any way or configuration setting that we can prevent downloading of multiple versions of same assembly?
As multiple nuget packages could have dependency on different versions of nuget packages. So along with referencing the latest nuget package, you should also add binding redirect to the latest version added for the nuget package, so that other nugets referring to old version of nuget will redirect to latest version & there won't be build warning.

Resources