System.Data.OracleClient Missing From .NET 4.0? - .net-4.0

I'm having trouble building my .NET 4.0 application. Getting this warning:
The primary reference "Microsoft.Practices.EnterpriseLibrary.Data,
Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" could not be resolved because it has an
indirect dependency on the framework assembly
"System.Data.OracleClient, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" which could not be resolved in the
currently targeted framework. ".NETFramework,Version=v4.0". To resolve
this problem, either remove the reference
"Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" or retarget your application to a
framework version which contains "System.Data.OracleClient,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089". EBRX
The solution has three projects in it, all of which are pointing at the 4.0 framework (not client). Still getting the error. Can anyone help?
Thanks in advance,
Brandon

Please make sure that you have a reference to System.Data.OracleClient:
Just for your notice:
The Types in System.Data.OracleClient (.NET Framework 4) namespace are deprecated and will be removed in a future version of the .NET Framework.
As you can see on https://msdn.microsoft.com or http://blogs.msdn.com.

Related

How to resolve warning messages of type: No way to resolve conflict between DLLs

I have a Windows service application made with VB.NET under Visual Studio 2013 and using NET Framework 4.5. I am using Nuget in this project.
Once I build the solution (it builds successfully) I get below warning messages in the results window:
No way to resolve conflict between "Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.DataVisualization, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
No way to resolve conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from version "9.0.0.0" [] to version "11.0.0.0" [C:\MyProjects\WindowsServices\MyService\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3276: Microsoft.Common.CurrentVersion.targets Found conflicts between different versions of the same dependent assembly.
Please set the "AutoGenerateBindingRedirects" property to true in the project file. For further information, see http://go.microsoft.com/fwlink/?LinkId=294190.
I have been searching for information about this, and I have found some posts and blogs talking about that:
No Way to Resolve Conflict Between dlls
No Way to Resolve Conflict Between dlls
I have tried to clean up all the references in the VB.NET project that were not being used but above warning messages continue appearing.
Also I have gone into Manage NuGet Packages but I have not seen any duplicate packages in the list.
I don't see the duplicates anywhere (vbproj project file, app.config, etc.). Where can I find those duplicates? Where are the duplicates? How to search for the duplicates?
Finally, I know there is another way to resolve those conflicts (I have not tried yet) and it consists on adding binding redirects for all the assemblies that are conflicted in the app.config file. For example, in case of ClosedXML DLL:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ClosedXML" publicKeyToken="fd1eb21b62ae805b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.85.0.0" newVersion="0.85.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Instead of adding manually confliting assemblies in the app.config file, I know it can be done automatically by Visual Studio by adding the property entry below in the vbproj project file:
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
as explained here.
Anyway, I would like to resolve those conflicts without binding redirects for all the conflicted assemblies in the app.config file. So Is that possible? If so, how?
Also I have some other questions in mind:
Binding redirects for conflicted assemblies in the app.config file
is a good practice?
Why those conflicts between assemblies happen? I do not understand it at all, so please could you explain me this?
What happens if I not resolve those conflicts and I ignore them (since solution is build successfully without errors)? Is it mandatory or highly recomended to resolve them for any kind of reason that I currently do not know?

Unable to store quartz .net job

+$exception {Quartz.JobPersistenceException: Couldn't store job: Type
'System.Collections.Specialized.NameValueCollection' in Assembly
'System.Collections.Specialized, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable. --->
System.Runtime.Serialization.SerializationException: Type
'System.Collections.Specialized.NameValueCollection' in Assembly
'System.Collections.Specialized, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
This is caused by .NET Core incompatibility for serialization, please switch to using JSON serialization as described in this issue. - #lahma.
Hope this helps others.

EF6 Version error

I am using EF6 but got this error Assembly 'TBLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' which has a higher version than referenced assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
You have to uninstall related packages and re-install them by using package manager console

When I am adding MvcSiteMapProvider.MVC4 System.Web.Mvc version difference error is coming

I am adding MvcSiteMapProvider in my sample site using Package Manager console like
PM> Install-Package MvcSiteMapProvider.MVC4
but after installation completion facing below Error.
i.e.
uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral
Error is like below :
Error 18 Assembly 'MvcApplication1121097jhgf7621jhg9999, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Offline\MvcApplication1121097jhgf7621jhg9999\MvcApplication1121097jhgf7621jhg9999\bin\MvcApplication1121097jhgf7621jhg9999.dll MvcApplication1121097jhgf7621jhg9999.Tests
I have changed all references form config files, which are referencing to version 4.0.0.0 to 4.0.0.1, but even after that above error is coming. Please help me.

Why NServiceBus.NHibernate causes CodeAnalysis warning regarding Common.Logging reference?

I have an NServiceBus endpoint configured to UseNHibernateTimeoutPersister.
I use EL 5 for logging:
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
I also added a reference in the project to the NServiceBus.Core.
Why do I get the following CodeAnalysis warning:
Warning 36 CA0060 : The indirectly-referenced assembly 'Common.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: c:\NServicebus3.3.2\NServiceBus.NHibernate.dll.
You need to add a reference to Common.Logging v2, you can get that from nuget using the following:
PM> Install-Package Common.Logging -Version 2.0