I have a web project build on .net framework 4.5.1. We are trying to added PostgreSQL support for the project. Using Nuget, I have installed 4.0.4 npgsql to the project. Under references, I see the following being added to the project. 1. Npgsql - 4.0.4.0 - Runtime version v4.0.30319 2. [...] read more
I have some legacy .NET code that I would like to wrap with an API. The code is a mixture of ASP.NET Webforms and .NET Framework 4.0 I'm hoping to use the new ASP.NET Core Web API and have created a new solution based on this framework and added the [...] read more
I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine. After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging. Running dotnet run [...] read more
I am about to start development of a software project that should run on Linux and Windows if possible. As I already have some experience with C# I am eager to use it for this project. I assumed that with .NET Core 3 and GTK# 3.22 this shouldn't be a [...] read more
Bug Report System.TypeInitializationException HResult = 0x80131534 Message = Initializer type "AngleSharp.Configuration" threw an exception. Source = AngleSharp Stack trace: in AngleSharp.Configuration.get_Default () in AngleSharp.BrowsingContext.NewFrom [TService] (TService instance) in AngleSharp.Html.Parser.HtmlParser..ctor () in rsh.Parser_test..ctor () in Z: \ vs \ csharp \ prb \ rsh \ rsh \ Parser_test.cs: line 19 in [...] read more
Integrating Stanford-NLP into ASP.Net Core C# application getting the following error message: System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'edu.stanford.nlp.util.Timing' threw an exception. Source=stanford-corenlp-3.9.1 StackTrace: at edu.stanford.nlp.util.Timing..ctor() at edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(Properties , Boolean , AnnotatorImplementations ) at edu.stanford.nlp.pipeline.StanfordCoreNLP..ctor(Properties props, Boolean enforceRequirements, AnnotatorPool annotatorPool) at edu.stanford.nlp.pipeline.StanfordCoreNLP..ctor(Properties props, Boolean enforceRequirements) at edu.stanford.nlp.pipeline.StanfordCoreNLP..ctor(Properties props) at _3x32018.Utility.SearchNLP.ParseNLG(String [...] read more
I'm developing a TDD test with C#, .NET Framework 4.7, Nunit 3.8.0 and JustMock Lite 2017.2.821.1. When I do this: IGenericRepository<ProductionOrder> _proOrdRepository = Mock.Create<IGenericRepository<ProductionOrder>>(); I get the following exception: System.TypeInitializationException occurred HResult=0x80131534 Message=An exception occurred in the type initializer of 'Telerik.JustMock.Core.Context.MockingContext'. Source=Telerik.JustMock StackTrace: at Telerik.JustMock.Core.Context.MockingContext.get_CurrentRepository() at Telerik.JustMock.Mock.<>c__44`1.<Create>b__44_0() at Telerik.JustMock.Core.ProfilerInterceptor.GuardInternal[T](Func`1 guardedAction) [...] read more
We have a Visual Studio C# solution with several projects including .NET Standard class libraries, .NET Framework applications (because they use 3rd party references that are written on Framework), and .NET Core applications. Previously these projects used: * .NET Standard 2.0 * .NET Core 2.0 * .NET Framework 4.6.1 * [...] read more
I am attempting to retrieve config values with a static class: public static class Configurator { public static string HashesConnectionString { get; } = Environment.GetEnvironmentVariable("HashesConnectionString"); public static string SftpUser { get; } = Environment.GetEnvironmentVariable("SftpUser");} When attempting to retrieve these from a separate class, I am getting a very embarrassing error: [...] read more
Error System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'System.IO.Compression.ZipStorer' threw an exception. Source=WebDriver StackTrace: at System.IO.Compression.ZipStorer.WriteLocalHeader(ZipFileEntry& zipFileEntry) at System.IO.Compression.ZipStorer.AddStream(CompressionMethod compressionMethod, Stream sourceStream, String fileNameInZip, DateTime modificationTimeStamp, String fileEntryComment) at System.IO.Compression.ZipStorer.AddFile(CompressionMethod compressionMethod, String sourceFile, String fileNameInZip, String fileEntryComment) at OpenQA.Selenium.Firefox.FirefoxProfile.ToBase64String() at OpenQA.Selenium.Firefox.FirefoxOptions.GenerateFirefoxOptionsDictionary() at OpenQA.Selenium.Firefox.FirefoxOptions.ToCapabilities() at OpenQA.Selenium.Firefox.FirefoxDriver.ConvertOptionsToCapabilities(FirefoxOptions options) at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxDriverService service, FirefoxOptions options, [...] read more
I have a service layer with the target framework set to .NET Standard 2.0. Some of the services uses DbContext from EntityFrameWorkCore. There are two web projects which uses this service layer: * ASP.NET Core 3.0 (Blazor) * ASP.NET MVC 4.6.2 The Core project uses dependency injection like this (shortened): [...] read more
I'm trying to make a script that compares a list of images to one comparison image and writes the filename of an image that is different. I made it a console application since I didn't need to display any images. I added the System.Drawing reference, however when I run my [...] read more
I'm writing a console application that requires data to be pulled from a database. When I use the following line to create the connection object, it throws a FileNotFoundException. OracleConnection con = new OracleConnection(); I've installed and included the Oracle Managed Data Access Client, and I've attempted to rewrite the [...] read more
I need to convert speech from a wav file into text. So I downloaded the sample C# code project from the Quickstart: Recognize speech using Speech service C# SDK page, and followed the instructions on the page. It works in Windows 10, but I need the project to work on [...] read more
I'm a sitecore developer and I want to use Sitecore.FakeDb in my unit testing. I have the following code: [TestClass] public class UnitTest1 { [TestMethod] public void Test_ArticleController_With_SitecoreItem() { Sitecore.Data.ID about_us_itemId = Sitecore.Data.ID.NewID; Sitecore.Data.ID careers_itemId = Sitecore.Data.ID.NewID; using (var db = new Sitecore.FakeDb.Db { new Sitecore.FakeDb.DbItem("about-us", about_us_itemId) { new Sitecore.FakeDb.DbField(SitecoreFieldIds.WTW_REDIRECT_TO) [...] read more
I have been attempting to use the SqlProvider type provider on several different databases where I work. In Visual Studio, intellisense for these different DBs (of types MS Access, SQL Server, and an ODBC connection) all work as shown below: Intellisense working [https://i.stack.imgur.com/hbq7W.png] I've even tried it on the Northwind [...] read more
I am currently trying to call Java Code in C#. One possibility is IKVM, whereupon I looked at a tutorial for this tool. I have to say, and that's really curious: the tool seems to work in part. But now to my problem: So I took the following tutorial (https://www.codeproject.com/Articles/594632/IKVM-NET-in-Details). [...] read more
once again im not really getting any further by just using google and searching through the forum, so here we go: Im trying to establish a connection with C# and a MySQL Database (which is running on phpmyadmin). This is the Code I got so far: using System; using System.Data; [...] read more
Is it possible to use ZeroMQ (version 4.1.0.31) in a .NET core project? It seems that is targeted only for .NET framework. If I download the package from nuget and try to initialise a ZContext it throws an exception. System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'ZeroMQ.lib.zmq' threw an exception. Source=ZeroMQ [...] read more
I have the following fluent NHibernate settings: public class NHibernateHelper : INHibernateHelper { private readonly string _connectionString; private readonly object _lockObject = new object(); private ISessionFactory _sessionFactory; public NHibernateHelper(IConfiguration configuration) { _connectionString = configuration["ConnectionString"]; } public ISessionFactory SessionFactory { get { if (_sessionFactory == null) CreateSessionFactory(); return _sessionFactory; } } [...] read more
I am currently trying to port a Mediatr Pipeline (Mediatr 7.0.0) implementation to use a DryIoc Container (v. 4.0.5). I Used the following implementation I had from DryIoC version 3.0.2: private static void ConfigureMediatr(this Container container) { container.RegisterDelegate<ServiceFactory>(r => r.Resolve); container.RegisterMany(new[] { typeof(IMediator).GetAssembly()}, Registrator.Interfaces); container.RegisterMany(typeof(CopyManualsHandler).GetAssembly().GetTypes().Where(t => t.IsMediatorHandler())); //Use this to [...] read more
I am unable to use the NLog MessageBox target in a WinForm application. The config file indicates the xsi:type is invalid. When I run the program I get this error: > System.TypeInitializationException HResult=0x80131534 Message=The type > initializer for 'Catalog.Form2' threw an exception. Source=Catalog StackTrace: > at Catalog.Form2..ctor() in L:\SourceCode\Catalog\Catalog\Form2.cs:line 29 [...] read more
I ran the following batch file on our SQL Server "9". It is an SSIS 2012 package with no connections, no tasks, no code. It's an empty package. ECHO before dtexe! REM "DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx" "D:\SQL2012\110\DTS\Binn\DTExec.exe" /FILE "E:\SSIS\MyAppName\Packages\Empty2012Package.dtsx" SET RESULT=%errorlevel% ECHO RESULT AFTER DTEXEC=%RESULT% exit /B %RESULT% Here's my output: [...] read more
I am trying to generate authcontext with below code with the latest version of ADAL package (3.13.9) I am getting exception. However, I downgrade the ADAL version to v2.22.302111727 it works without an issue. I am using visual studio 2017. What is wrong with 3.13.9? authContext = new AuthenticationContext(authority, true); [...] read more
I have C# portable class library for Windows 8.1 and Windows Phone 8.1. I want to write a native (unmanaged) C++ Windows application which uses this library. As far as I seen, the best practise is to expose my library as COM interface. This seems like a simple solution but [...] read more
I am having a problem when trying to instantiate a C# .NET class that's been exposed to COM in a classic ASP application. I've used tlbexp to generate a typelib and registered it in Component Services; now when trying to create the object as such: Server.CreateObject("The.Class.Name") I am getting the [...] read more
Problem: I'm trying to develop an ASP.NET MVC (.Net Framework 4.7.2) web app in which I want to use Microsoft.Data.Sqlite version (5.0.2), but when I run it my web app crashes (both in debug IIS Express, and in app.publish on local IIS on Windows 10) at following code line: SqliteConnection [...] read more
System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'MySql.Data.MySqlClient.MySqlConnectAttrs' threw an exception. Source=MySql.Data StackTrace: at MySql.Data.MySqlClient.NativeDriver.SetConnectAttrs() at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset) at MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset) at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at db4.Form1.button1_Click(Object sender, EventArgs e) in D:\C# GUI\db4\db4\Form1.cs:line 27 at System.Windows.Forms.Control.OnClick(EventArgs [...] read more
ConsumeAPISync Class>System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'CricApiConsoleDemo.ConsumeAPISync' threw an exception. Source=CricApiConsoleDemo StackTrace: at CricApiConsoleDemo.ConsumeAPISync..ctor() at CricApiConsoleDemo.Program.Main(String[] args) in C:\Users\ADMIN\Desktop\CricAPIDemo_CSharp-master\Program.cs:line 13 Inner Exception 1: NullReferenceException: Object reference not set to an instance of an object. Visual Studio Error.Visual Studio Error read more
I have an application (console) which targets .NET 4.7 using MSVC 2019 and which references a lot of NuGet packages. When I build, those packages end up in the bin/Debug (or bin/Release) folder -- so the application can use them at run-time, which is good/expected. Then I want to unit-test [...] read more
I am trying to debug a program I created in Visual Studio when I receive the error: > System.TypeInitializationException HResult=0x80131534 Message=The type > initializer for '' threw an exception. > Source=MaterialFileManagerSQLNet StackTrace: at > MaterialFileManagerSQLNet.frmMaterialManager.getAPILookupMaterial() in D:\Ctes > Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\frmMaterialManager.cs:line > 397 at MaterialFileManagerSQLNet.frmMaterialManager.populateDatagrid(String > item) in D:\Ctes > Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\frmMaterialManager.cs:line > [...] read more
I've been using this tutorial many times before and had never a issue. Since I updated my visual studio i get this. error example [https://i.stack.imgur.com/a1DL3.png] I get the follow error after following this tutorial: https://devblogs.microsoft.com/dotnet/porting-desktop-apps-to-net-core/ I'm using the Guna.dll for my text and buttons. Can anyone help me, give me [...] read more
My App.Config (removing other stuff) looks like this: <configuration> <configSections> <section name="Settings" type="System.Configuration.AppSettingsSection, System.Configuration" /> </configSections> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> </startup> <connectionStrings> ... </connectionStrings> <appSettings> ... </appSettings> <Settings> <add key="something" value="5"/> </Settings> </Configuration I have a custom config section using System.Configuration.AppSettingsSection as key-value pairs is all I require. However [...] read more
I am currently trying to create an ASP.NET Core API to an application called "Application". It contains customers and products. When I make a request to get all customers through my CustomerController I get the following error: System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. Source=EntityFramework StackTrace: at [...] read more
Visual studio won't me download the sdk so I decided to download it manually with the setup. when I run the setup it just crashes after some seconds. this is the log called Windows_Software_Development_Kit___Windows_10.0.17763.132_20200409225019: [1F88:397C][2020-04-09T22:50:19]i001: Burn v3.14.0.1703, Windows v10.0 (Build 17763: Service Pack 0), path: C:\Users\horro\AppData\Local\Temp\{293B2422-4760-4341-95C6-512E5EA06660}\.cr\WinSDKSetup.exe [1F88:397C][2020-04-09T22:50:19]i009: Command Line: '-burn.clean.room=D:\notworking\WinSDKSetup.exe [...] read more
I have developed a program for a user to search a database. I did this on my local PC and it worked fine. I move the app to the server where it would used, changed the Data Source and I get an error (below). I used the name of the [...] read more
How can I execute a Dexterity procedure programmatically? Goal: I want to reset a user password within Great Plains 2018 programmatically. For our purposes, programmatically does NOT refer to the following: * Clicking buttons in a user interface manually, particularly after launching Dynamics.exe * Running a Great Plains 2018 macro [...] read more
I have the following static method for selecting between filter options as per a blog post by Pashov. public static class ExpressionRetriever { private static MethodInfo containsMethod = typeof(string).GetMethod("Contains"); private static MethodInfo startsWithMethod = typeof(string).GetMethod("StartsWith", new Type[] { typeof(string) }); private static MethodInfo endsWithMethod = typeof(string).GetMethod("EndsWith", new Type[] { typeof(string) [...] read more
I am extending the VideoCaptureExample for Hololens in Unity 2017.4.21f from this project: https://github.com/VulcanTechnologies/HoloLensCameraStream Now I have to control the ScrollView and Buttons from my Canvas so I need the Gaze-Function from the MRTK. As soon as I try to implement the unitypackage from this page: https://github.com/Microsoft/MixedRealityToolkit-Unity/releases for 2017.4.2.0 it [...] read more
I get this error trying to initialize SqlConnection instance. First I tried with ConnectionString parameter, now I see it occurs even without it in the constructor. The code used to work, but fails after I changed my PC, so I suppose it has something to do with windows settings (windows [...] read more
I created a simple application to get data from a SQL database. During the debugmode everything works fine. After the deployment or during release mode a TypeInitializationException appears for the SQLConnection object. Before I start the SQLConnection I change the user with the ImpersonatedUser technique. The whole application is based [...] read more
Ive been playing around with some server/client stuff and though id try using terminal.gui, and for some reason that i dont understand its acting up. i have 2 scripts; one to handle the backend stuff and one to handle the user interface/interraction. script1: using UI; namespace ServerTest { public class [...] read more
I know this has been asked many times before but I haven't found a solution to my specific problem. My setup is a newly installed Windows 10 Enterprise fully updated with SQL Server 2017 incl Integration Service and Analysis Service. I've installed latest SSDT as well. I've also installed client [...] read more
I'm trying to add vuforia to an existing hololens project in unity. I get this exception when building the app: System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'WinRTBridge.TypeInformation' threw an exception. Source=WinRTBridge StackTrace: at WinRTBridge.TypeInformation..ctor() Inner Exception 1: FileNotFoundException: Could not load file or assembly 'Vuforia.UnityExtensions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. The system [...] read more
I am trying to upgrade the app version for one our SF solutions. But failed multiple times as one of the services is reporting an issue during start with the new version. Here is what I see as 2 exceptions happening almost at the same time: OnApply Unexpected service exception. [...] read more
I have a Xamarin/Realm app that I created using Visual Studio 2017 on Win10. It targets iOS, Android and UWP. I'm trying to build this solution on Windows and macOS. I added Realm in macOS and successfully tested my app on Android and iOS. Then when I moved back to [...] read more
I started a new VS2017 c# console app project and installed Alea and Alea.Fody from package manager. Running a piece of sample code from the website gave me the following exception. System.TypeInitializationException occurred HResult=0x80131534 Message=The type initializer for 'Alea.GlobalImplicitMemoryTracker' threw an exception. Source=Alea StackTrace: at Alea.GlobalImplicitMemoryTracker.GetInManagedFlag() at gputest.Program.DelegateWithClosureGpu() at gputest.Program.Main(String[] [...] read more
I'm currently developing a website that uses a SQL Server 2014 Express database on my machine. This has always worked in the past, but today I got the following error: > Failed to initialize the Common Language Runtime (CLR) v4.0.30319 with HRESULT > 0x80131534. You need to restart SQL Server [...] read more
I'm trying to run a ssis package on a remote integration server using dtutil which is being called within a stored procedure using cmdshell. I now this isn't the best way to run a ssis package but its what I have inherited. So doing a new deployment to a fresh [...] read more
I've been working on a simple dll library that is com-accessible so that other softwares can use our library (from any managed or unmanaged language). Creating a com-accessible dll is fairy easy: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms; namespace MyNamespace { //This interface defines [...] read more
I have a static connection factory class and need to initialize the connection parameters from configuration namespace MyApp.Common.LinqToDB { public static class MyConnectionFactory { public static string Authority { get; set; } public static string Target { get; set; } public static string ConnectionString { get; set; } public static [...] read more