operating system: windows 10
Framework: .Net 6
IDE: Visual Studio 2022
Docker: Linux Container
I am trying to use Oracle.ManagedDataAccess (21.6.1) client.
as soon as I new up the OracleConnection I get an exception
System.TypeInitializationException: The type initializer for 'OracleInternal.Common.ProviderConfig' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Microsoft.Win32.Registry' threw an exception.
---> System.PlatformNotSupportedException: Registry is not supported on this platform.
at Microsoft.Win32.RegistryKey.OpenBaseKeyCore(RegistryHive hKey, RegistryView view)
at Microsoft.Win32.Registry..cctor()
--- End of inner exception stack trace ---
at OracleInternal.Common.CustomConfigFileReader..ctor(Boolean bIsManaged)
at OracleInternal.Common.ConfigBaseClass.GetInstance(Boolean bIsManaged)
at OracleInternal.Common.ProviderConfig..cctor()
--- End of inner exception stack trace ---
at Oracle.ManagedDataAccess.Client.OracleConnection..ctor(String connectionString)
at oracle_test.Controllers.WeatherForecastController.Get() in C:\Src\oracle-test\Controllers\WeatherForecastController.cs:line 43
I have been looking for a docker linux container example using an oracle provider client and I have not been able to find any article or information that can help me with this.
Related
I have an app made with Xamarin Forms, that uses Akavache to cache data.
The app works well on iOS and Android in debug mode when I make a build with VS2019
But when I installed VS2022 and decided to make a build for android, an error occurred.
This error only occurs after I build and deploy the app with VS 2022. Nothing else was changed in the project.
Here is the error:
[AppCenterCrashes] Unhandled Exception from source=AndroidEnvironment
[AppCenterCrashes] System.MissingMethodException: Method not found: System.ReadOnlySpan1<byte> SQLitePCL.raw.sqlite3_column_blob(SQLitePCL.sqlite3_stmt,int) [AppCenterCrashes] at Akavache.Sqlite3.SqliteOperationQueue.MarshalCompletion[T] (System.Object completion, System.Func1[TResult] block, System.IObservable`1[T] commitResult) [0x00012] in D:\a\Akavache\Akavache\src\Akavache.Sqlite3\Queues\OperationQueue.cs:488
[AppCenterCrashes] --- End of stack trace from previous location where exception was thrown ---
While Installing the Oracle Development Tools for VS 2017, I came upon this error message and I have not been able solve it so far.
Error Message pointing me to a log file
The error Message points me to a log file in which the following stacktrace is found:
1/9/2020 3:39:09 PM - System.AggregateException: One or more errors occurred. ---> System.OperationCanceledException: Pre-check verification failed with warning(s) : AnotherInstallationRunning. ---> Microsoft.VisualStudio.Setup.CanceledByPrecheckException: Pre-check verification failed with warning(s) : AnotherInstallationRunning.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Setup.PrecheckManager.RunPrechecks(PrecheckParameters precheckParameters, VariableCollection properties)
at Microsoft.VisualStudio.Setup.Engine.RunPrecheck(String destination, Product product, ExecuteAction action, IWindowsRestartManager rmService, ITelemetryOperation installOperation, InstallOperation install)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.<Install>b__14_0()
at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.Install()
at Microsoft.VisualStudio.ExtensionManager.ExtensionBatchEngine.Execute(List1 installableExtensions, Version targetVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BatchEngineInstall(List1 installableExtensions, InstallFlags installFlags, Version targetVsVersion)
at VSIXInstaller.BatchSetupEngineInstaller.Install(SupportedVSSKU sku, List1 extensionsToInstall, InstallFlags installFlags)
at VSIXInstaller.BatchSetupEngineInstaller.BatchInstall(IReadOnlyList1 targetSkus, IEnumerable1 extensionsToInstall)
at VSIXInstaller.SilentEngine.Execute(ExtensionData data)
at VSIXInstaller.App.OnStartup(StartupEventArgs e)
---> (Inner Exception #0) System.OperationCanceledException: Pre-check verification failed with warning(s) : AnotherInstallationRunning. ---> Microsoft.VisualStudio.Setup.CanceledByPrecheckException: Pre-check verification failed with warning(s) : AnotherInstallationRunning.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Setup.PrecheckManager.RunPrechecks(PrecheckParameters precheckParameters, VariableCollection properties)
at Microsoft.VisualStudio.Setup.Engine.RunPrecheck(String destination, Product product, ExecuteAction action, IWindowsRestartManager rmService, ITelemetryOperation installOperation, InstallOperation install)
at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)
at Microsoft.VisualStudio.ExtensionManager.SetupEngineService.<Install>b__14_0()
at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---
The gist of it in my understanding is that there is another installation running while it tries to install the Visual Studio extension. I didn't of course install something myself during the process, but I also checked the task manager if there is ein msiexec process running. Sometimes there was one running but I got the same error message while there was no msiexec process running.
The only way I can imagine two installers running is that the Oracle Development Tools installer starts the Visual Studio extension installer. Then there are two installers running. However I do not quite believe in that conclusion as this should have been occurred somewhere else before but I haven't found my error message anywhere.
The things I have tried:
Multiple Reinstall with restarts and running as admin.
I have tried to manuelly install the extension after the error occurs, which ends successfully, however when I try to use the custom tools in visual studio I get an error message.
Visual Studio 2017 Verison: 15.9.18
Oracle Development Tools Version: 18.3.0.0.0
In my case the execution of the following file solved this issue:
Oracle.VsDevTools.15.0.vsix
Here you can find this file: C:\Program Files (x86)\Oracle Developer Tools for VS2017\odt
I have a bot using Bot Framework v4 in Visual Studio 2017, and a clean Azure subscription with no resources and resource groups.
I followed this tutorial to deploy the bot to Azure.
The first time it worked, but in the browser the page displayed an Internal Server Error message.
So I removed all resources and their groups, undid all changes that the Publish did to any files in Visual Studio. Then I tried again, and again, with the same result.
The Publish fails, after the project builds in Release mode. I checked on Azure and the App Service and App Service plan are created.
Do you have any ideas?
The output window:
Error : Web deployment task failed. (Could not connect to the remote computer ("mybot.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
The requested resource does not exist, or the requested URL is incorrect.
Error details:
Could not connect to the remote computer ("mybot.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
The remote server returned an error: (404) Not Found.
Publish failed to deploy.
Visual Studio generated a .tmp file with the stack trace:
11-Nov-18 13:19:02
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__2()
at System.Threading.Tasks.Task``1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
tl;dr Q. "how do we successfully deploy [unmanaged library] libzmq to load dynamically to support 'ZeroMQ CLR namespace' being used in a C# program?"
C# code with NuGet pkg ZeroMQ 4.1.0.17 (Runtime version v4.0.30319; Version 4.1.0.42169) installed. Works just fine running in the Visual Studio workspace but when deployed with the .exe in the same directory as the ZeroMQ.dll and with an amd64 subdirectory containing both libzmq.dll and libsodium.dll -- and even with copies of both those copied up into the same exec directory as program and ZeroMQ.dll -- we get:
Connect System.TypeInitializationException: The type initializer for 'ZeroMQ.lib.zmq' threw an exception. ---> System.IO.FileNotFoundException: UnmanagedLibrary[libzmq] Unable to load library "libzmq" from "C:\Windows\TEMP\libzmq.dll". Inspect Trace output for details. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
--- End of inner exception stack trace ---
at ZeroMQ.lib.Platform.Win32.LoadUnmanagedLibrary(String libraryName)
at ZeroMQ.lib.zmq..cctor()
--- End of inner exception stack trace ---
at ZeroMQ.ZContext..ctor()
at Core.Adapter.ZeroMQ.ZeroMQMessagingService.Connect(String connection_string) in \ZeroMQMessagingService.cs:line 201
Note that is says it is looking in C:\Windows\TEMP but maybe that is only the last place in a chain.
We're getting this after upgrading to ZeroMQ 4.1.0.21 and failing to load the libzmq.dll as an "embedded resource", so we removed .21 completely and returned to .17. It had been working fine in .17 before we upgraded to .21.
Copy If Newer is checked on the amd64\libzmq.dll and libsodium.dll and, yes, this is an x64 build attempting to run on an x64 machine. The failing host is 2012 Server running .NET 4.5.
This turned out to be very simple. We are moving to a new machine still being configured and installing the C++ 2010 redistributable solved the problem for us.
I'm working on a project that requires curve-fitting. To get best results I opted to use MATLAB toolkit. I created a dll of this code and tried to use it in C# .NET framework. The dll works successfully on one system but not on any other system.
I get the following exception:
Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'curve.cfit' threw an exception. ---> System.TypeInitializationException: The
type initializer for 'MathWorks.MATLAB.NET.Utility.MWMCR' threw an exception. --
-> System.TypeInitializationException: The type initializer for 'MathWorks.MATLA
B.NET.Arrays.MWArray' threw an exception. ---> System.DllNotFoundException: Unab
le to load DLL 'mclmcrrt7_17.dll': The specified module could not be found. (Exc
eption from HRESULT: 0x8007007E)
at MathWorks.MATLAB.NET.Arrays.MWArray.mclmcrInitialize2(Int32 primaryMode)
at MathWorks.MATLAB.NET.Arrays.MWArray..cctor()
--- End of inner exception stack trace ---
at MathWorks.MATLAB.NET.Utility.MWMCR..cctor()
--- End of inner exception stack trace ---
at curve.cfit..cctor()
--- End of inner exception stack trace ---
at curve.cfit..ctor()
I wanted to know why this is happening and how I can solve this issue? I need to deploy my project on multiple machines. What should I do?
thank you in advance :)
The error tells you that the program could not find mclmcrrt7_17.dll. This is part of the MATLAB compiler runtime that you need to deploy on each target machine. It looks like you have not deployed the MATLAB compiler runtime.
The runtime redistributable file is available here: http://www.mathworks.co.uk/products/compiler/mcr/index.html