The breakpoint cannot currently be hit after oracle dll change - vb.net

I have a solution with several projects in vb, Visual Studio 2012. I just completed an upgrade task from System.Data.OracleClient to Oracle.DataAccess. When I build and run the solution it works fine but failed once I try to enter login info. When I put a breakpoint and build it in debug mode and try to step through each step, it only hits the first instance for page load and after that throws an error. It never reach the targeted breakpoint.
When I check my dll module, I noticed both the older version of the oracle data access and the newest one. And they both say “Binary was not built with debug information”
Any idea how I can resolve this issue?
Edit
I was able to run the command again, in the Developer Command Prompt for VS2015 this time. I am getting:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0>gacutil /l | find "Oracle."
Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=x86
Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=x86
Oracle.Web, Version=2.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=x86
Policy.2.102.Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=x86
Policy.2.111.Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=x86
Policy.2.111.Oracle.Web, Version=2.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxx, processorArchitecture=x86
Oracle.DataAccess, Version=1.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxx
Policy.1.102.Oracle.DataAccess, Version=1.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxx
Policy.1.111.Oracle.DataAccess, Version=1.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxx
Policy.10.1.Oracle.DataAccess, Version=1.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxxx
Policy.10.2.Oracle.DataAccess, Version=1.111.7.0, Culture=neutral, PublicKeyToken=xxxxxxxxxx
Policy.9.2.Oracle

You don't have to conceal the PublicKeyToken, they are public to everybody.
Anyway, I assume you messed up your Oracle installation. Most likely you had a working Oracle Client 11.1 (include ODP.NET) but then you installed ODP.NET (i.e. Oracle.DataAccess.dll) version 11.2 but without underlying Oracle Client 11.2.
Remove all your Oracle client installation (consult How to uninstall / completely remove Oracle 11g (client)?) and make a fresh installation of either Oracle 11.1 or 11.2 - or even the latest version 12.2.

Related

Getting an Unexpected Error in dotnet core Project

In my solution Explorer(Visual Studio) there are 5 projects
DigiIdentity(webapi)
Core(class library)
Data(class library)
Services(class library)
DigiPigmyApi(webapi)
DigiSyncApi(webapi)
I am getting following error while running the project(solution)
Error CS1705 Assembly 'Microsoft.AspNetCore.Hosting' with identity 'Microsoft.AspNetCore.Hosting, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' uses 'Microsoft.AspNetCore.Hosting.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.AspNetCore.Hosting.Abstractions' with identity 'Microsoft.AspNetCore.Hosting.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
Actually I am not finding the Microsoft.AspNetCore.Hosting.Abstractions, Version=1.1.1.0 package anywhere, can any one tell me the exact course of the error.

SQL Server 2012 - facing installation error

I was trying to install SQL Server 2012 but I get an error
Could not load file or assembly ‘Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. Error code 0x84B10001.
Any idea how to solve this?

Loading a DLL in the GAC

currently I have a problem with getting a DLL into the Windows GAC. I tried to follow the steps of creating a DLL and loading it as described in this blog post:
http://blogs.technet.com/b/cloudpfe/archive/2014/02/01/how-to-create-a-custom-authentication-provider-for-active-directory-federation-services-3-0-part-2.aspx
At the point where I try calling the following command:
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7514a164b89fa979")
I get an error which tells me that System.EnterpriseServices could not be found:
Exception calling "Load" with "1" argument(s): "Could not load file or
assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7514a164b89fa979' or one of its dependencies. The
system cannot find the file specified."
The specified DLL (System.EnterpriseServices) does exist* on the machine.
So now my question is, why can't this method find the DLL and what do I have to do/change to get this command to work?
NOTE: I Tried this on a vanilla Windows Server 2012 R2 with just ADFS parts installed; And I've called the command from the Powershell.
*UPDATE: The System.EnterpriseServices DLL resides in
C:\Windows\Microsoft.NET\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a
and
C:\Windows\WinSxS\amd64_system.enterpriseservices_b03f5f7f11d50a3a_4.0.9600.1638‌​4_none_53a3f9b13fac0ba5\
So it should be available from the GAC.
I think your public Key token is incorrect, you found your own answer with your update :) .
It should be
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
Give this a try.

Running SSIS package on SQL 2014

I created a new sql job in SQL2014 with an SSIS package created in SQL 2005.
The job is failing with this error:
Source: Ready data to zip Ready data to zip Description: There was an exception while loading Script Task from XML: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.SqlServer.IntegrationServices.VSTA.VstaHelper.b__1a() at Microsoft.SqlServer.VSTAHosting.VSTAScriptingEngine.DisposeVstaHelper() at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.MigrateVSAScriptTask(XmlElement elemProj, IDTSInfoEvents events) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)
Can you please explain the error? I think I'm missing some files.
This is a longshot, but you may be attempting to run the 32-bit version of DTExec. By default, it's not installed on a 64-bit machine unless you install the client components - which may mean you have an incomplete installation.

SQLite throws exception with NH 3.2

Running Nh 3.2 using SQLite throws the following exception:
---> NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
I use the latest (net 4 compatible) version of SQlite: version 1.0.74.0. I have added the following to my config:
.Database(SQLiteConfiguration.Standard.InMemory().Raw("hbm2ddl.keywords", "none").ShowSql())
I, also added in the config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
The weird thing is that first it worked. And now I get the above error.
I fixed the issue using the solution provide above (thanks), but also figured out that by using nuget you can simply install System.data.sqlite straight to your project via the package manager, and you dont need any of the web.config settings.
Install-Package System.Data.Sqlite.x86
You probably know this, but just in case. Latest version of SQLite for .NET is distributed as 2 dlls.
System.Data.SQLite.dll
SQLite.Interop.dll
Both dlls need to be present in the same folder as your EXE. Interop dll is platform specific so you have to manually (or Post-build) copy x86 or x64 version. One thing to keep in mind is that SQLite.Interop.dll depends on MSVCR100.DLL. This is part of Visual C++ 2010 SP1 Redistributable Package, you need to make sure that you have it. Please see this answer.
Also in the web environment you might need this configuration:
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite"/>
<add
name="SQLite Data Provider"
invariant="System.Data.SQLite"
description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
</DbProviderFactories>
</system.data>
use the version that came with fluentnhibernate binaries 1.0.60.0