Error "Failed to upload file" but I did not ask for it
Update: I recompiled for x86 and it works now. but I still need to know what happened here and why I need to recompile all my .net applications to x86 ... I have never used oracle and I have no plans to do so in the future. why does this create problems?
Since this morning, I cannot run all my .net programs that use entityframework-v5 file to connect to msSqlServer, I have inserted the stack error below.
I tried the same files from another computer on the network, it works correctly. so I suspected it was a windows update that caused the problem overnight, so I restored the system, still the same problem.
Now I'm out of ideas. I do not use oracle and I have no mention of it. and as I said, the same files in the same folder worked on my computer yesterday and they also work from other computers on the network today.
System.BadImageFormatException: Could not load file or assembly 'System.Data.OracleClient.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName)
at System.Data.Common.DbProviderFactories.IncludeFrameworkFactoryClasses(DataTable configDataTable)
at System.Data.Common.DbProviderFactories.Initialize()
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.Entity.Internal.LazyInternalConnection.Initialize()
at System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel()
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
source to share
This question indicates that you have 32-bit Oracle Client Components installed on your machine.
Your stack trace shows the following:
- You are starting an Entity Framework activity.
- Entity Framework wants to read your connection string.
- All database providers installed on your system must be initialized.
- He finds Oracle and tries to download it.
- It fails because the dependencies don't support 64 bit.
You must either uninstall the Oracle Client completely, making sure no other software depends on it, or additionally install the 64-bit version as mentioned in the answer above.
source to share