Windows error 0x80131047, -2146234297

Detailed Error Information

FUSION_E_INVALID_NAME[1]

Message"The given assembly name or codebase was invalid."
Comment The given assembly name or codebase was invalid.

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code4167 (0x1047)

Questions

25votes
8answers

Exception from HRESULT: 0x80131047

I am having this problem whenever I try to debug my project: Visual Studio error dialog [https://i.stack.imgur.com/ndN0W.png] It's in French, here is my translation: > "Error while trying to run project: Failed Loading assembly "DBZ buu's Fury > Text Editor" or one of it's dependencies. The given assembly name or [...] read more
c#
c
hresult
24votes
6answers

Could not load file or assembly System, Version=2.0.5.0 in .NET 4 MVC 4 application

Been searching for ages, can't find anything helpful. Here is the exception I'm getting: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) Exception Details: System.IO.FileLoadException: Could not load file or [...] read more
c#
asp.net-mvc
23votes
5answers

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65675

I have to work on an existing application, comprises of many projects including a database project. In the statup project, which is a windows app., when making a call to a Adapter.Fill(dataTable);a scary error appears saying that: An error occurred in the Microsoft .NET Framework while trying to load assembly [...] read more
c#
.net
winforms
dll
23votes
3answers

Loading/Unloading assembly in different AppDomain

I need to execute a method in an assembly loaded during runtime. Now I want to unload those loaded assemblies after the method call. I know that I need a new AppDomain so I can unload the libraries. But here, the problem arises. The assemblies going to load are plugins [...] read more
c#
reflection
appdomain
mmc
21votes
4answers

How do I correctly profile Entity Framework?

What is the minimal amount of code I can write to get a single callback from EF 4.1 that provides the following: * OnSQLExecuted(DbCommand cmd, DateTime start, double durationMS, string stacktrace) At the moment we use a nasty hack that seems to be leaking performance, I am curious at how [...] read more
c#
.net
entity-framework
entity-framework-4
16votes
5answers

Could not load file or assembly

When I am trying to debug in Visual Studio 2008, I'm getting the following error. I have cleaned the ASP.NET temp folder and restarted VS. I also removed the supposedly breaking reference and added it back. But nothing seems to work. Has anyone faced similar situations and is there a [...] read more
asp.net
visual-studio
15votes
3answers

Configuration error while using Areas in ASP.NET MVC 4

After upgrading to ASP.NET MVC 4, application is breaking on accessing any webpage defined inside an Area Error screen shot [https://i.stack.imgur.com/Qiyi0.png] Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. [...] read more
asp.net
asp.net-mvc-4
14votes
7answers

Unity application block 2.0 - The given assembly name or codebase was invalid

Interfaces (In the assembly named "Interfaces". In project :- Interfaces) namespace Interfaces { public interface IDoSomeWork1 { string DoSomeWork1(); } } namespace Interfaces { public interface IDoSomeWork2 { string DoSomeWork2(); } } Dependencies (In the assembly named "Entities". In project :- Entities) namespace Entities { public class ClassB : IDoSomeWork1 [...] read more
c#
unity-container
enterprise-library
13votes
1answer

Native Assembly Binding fails for ASP.NET solution

NOTE: This main purpose of the question to UNDERSTAND/EXPLAIN the assembly binding behavior of the CLR. The solution should be evident once the reason is pinned down. Please, know that I understand my setup is not optimal (nativedll not signed and versioned etc) but again I just want to investigate [...] read more
c#
asp.net
clr
12votes
2answers

Getting Migrate.exe to work

I have been struggling on executing EF Migrate.exe to work. My Solution has couple of projects. The migrations and the entities live in the project Data. The controllers and views live in Web. I tried using the migrate.exe - however I am struggling getting the first argument (assembly) to be [...] read more
asp.net-mvc
entity-framework-4
migration
9votes
3answers

Debugging Nunit Tests inside VS2010 Express

I have written a bunch of unit tests inside VS2010 Express and tests being tests they sometimes fail. Since the express editions of VS don't allow plugins to run I can't simply spin up TestDriven.Net or an equivalent and debug the tests. To try and work around this I've converted [...] read more
visual-studio
unit-testing
nunit
7votes
3answers

VS2017 cannot discover MSTest tests

I've been having this recurring problem with some of my .Net framework 4.5 and 4.6 and 4.7 projects not having their tests discovered by test explorer. The "tests" log output is showing: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) That's all the info I have. [...] read more
c#
visual-studio-2017
mstest
6votes
1answer

CreateInstanceAndUnwrap fails to load assembly

I am trying to load an assembly A in a new AppDomain in my console application with same base directory and RelativePath as the default domain. When I create a type from A using CreateInstanceFrom it succeeds but when I use CreateInstanceAndUnwrap it fails to find assembly file with FileLoadException. [...] read more
c#
reflection
appdomain
5votes
2answers

MiniProfilerEF.Initialize() could not be initialized properly

I just started trying out the mvc-mini-profiler in my MVC3 project with EF4.1 and after changing MiniProfilerEF.Initialize(); to MiniProfilerEF.Initialize_EF42(); I'm getting : > A null was returned after calling the 'GetService' method on a store provider > instance of type 'MvcMiniProfiler.Data.EFProfiledOdbcProviderFactory'. The > store provider might not be functioning correctly. [...] read more
asp.net-mvc-3
entity-framework
mvc-mini-profiler
5votes
2answers

Word VSTO 4.0 Addin fails to load: Could not load file or assembly

The issue in short is that I created a Word VSTO addin that works perfectly fine on a number of machines, but fails to load on one machine only. I don't know if the problem is in the assembly name, or there is a missing DLL. The details of how [...] read more
.net
visual-studio-2012
vsto
fileloadexception
word-addins
5votes
0answers

PowerShell : Import-Module : assembly name or codebase was invalid (HRESULT: 0x80131047)

I just installed the new ISE Module Browser, wanted to try the first module, I've chosen the Bing module (which require another module called BetterCredentials, but that was handled well, so no problem). So as mentioned in the beginning of the script of the Bing module, I had to do [...] read more
powershell
nuget
bing
powershell-ise
powershell-5.0
4votes
1answer

Unable to load the WITDataStore64 dll

I'm trying to run a PowerShell script, and I have to load several assemblies to accomplish my task. Most assemblies are loading fine, but there's one I'm having trouble getting to work: > Microsoft.VisualStudio.Services.Common.dll I've tried a few different approaches. I've tried the LoadFrom, ReflectionOnlyLoadFrom, and Add-Type -Path Methods, but [...] read more
powershell
4votes
2answers

Trying to run EF Code first Migrate.exe tool on production environment failed

I'm using EntityFramework version 6.1.3. I copied migrate.exe from EntityFramework version 6.1.3 package tool folder to bin folder of my website. My web site is compiled and published to production environment with x86 CPU and target framework 4.5.1 I run the following command: > D:\Sites\MatrixPortal\bin>migrate.exe > d:\sites\MatrixPortal\bin\MatrixPortal.BL.dll > /startUpDirectory="d:\Sites\MatrixPortal\bin" > [...] read more
entity-framework
entity-framework-migrations
4votes
3answers

How to attach Event Receiver to SPList programmatically?

I'm working on a project i SharePoint 2010 where I have several under sites. each under site contain a list with news and I want to attach an Event Receiver to those lists. The under sites and lists are created programmatically but I cannot attach the Event Receiver I have [...] read more
c#
sharepoint
events
splist
4votes
3answers

XSD.EXE to generate F# Classes off of XSD

I am trying to use the tool XSD.EXE to generate some class files from an XSD. Whether there is anything to be gained from the resulting files is another question, but I would like to see what is generated. I found this reference, which notes: > Which, thanks to Luke [...] read more
f#
xsd.exe
4votes
1answer

Loading assembly via reflection succeeds, Add-Type does not

I'm using a .net assembly in Powershell. This code works successfully: [Reflection.Assembly]::LoadFile("E:\Workspaces\RTE\dh.PSP.Common\Mainline\Source\dh.Common.MetaData\bin\dh.Common.Metadata.dll") $marketMetadataRepository = New-Object dh.Common.Metadata.MarketMetadataRepository Result: > GAC Version Location > > --- ------- -------- False v4.0.30319 > E:\Workspaces\RTE\dh.PSP.Common\Mainline\Source\dh.Common.MetaData\bin\dh.Common.Metadata.dll So one would think this would work successfully also: Add-Type -AssemblyName "E:\Workspaces\RTE\dh.PSP.Common\Mainline\Source\dh.Common.MetaData\bin\dh.Common.Metadata.dll" but no: > Add-Type : Could not load [...] read more
.net
powershell
4votes
0answers

The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception

I'm trying to run an ASP MVC 4 application on IIS. When I publish MVC 4 application from Basic template - without any dependencies apart from these made by the wizard - application works. But when I publish other application, that is using WebActivator and many other libs, I see [...] read more
asp.net-mvc
asp.net-mvc-4
iis
iis-6
webactivator
4votes
3answers

Unity Error: The given assembly name or codebase was invalid

I am using the microsoft unity frame work and getting this error: ********** 4/15/2012 9:46:08 AM ********** Inner Exception Type: System.IO.FileLoadException Inner Exception: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) Inner Source: mscorlib Inner Stack Trace: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, [...] read more
unity-container
mstest
2votes
0answers

Powershell script with standard cmdlets crashes with System.IO.FileLoadException on some machines

We have a script that issues web requests using Invoke-WebRequest and Invoke-RestMethod. It also uses ConvertFrom-Json, ConvertTo-Json, and [System.Net.ServicePointManager]::CertificatePolicy to handle secure connections. Apart from that, there is one function and one class. The script works fine on several machines, but crashes with the following message right at the start: [...] read more
powershell
2votes
2answers

FileLoadException during activation of WCF service

After deploying my WCF service in IIS, I get this error when accessing the service: > SERVER ERROR IN '/MYSERVICE' APPLICATION. > > The given assembly name or codebase was invalid. (Exception from HRESULT: > 0x80131047) Description: An unhandled exception occurred during the execution > of the current web request. [...] read more
wcf
iis
activation
fileloadexception
2votes
1answer

Finding the generator 'identity'... The given assembly name or codebase was invalid

My App builds and runs just fine. But when I try to run dotnet aspnet-codegenerator identity --useDefaultUI, it errors: > Building project ... > > Finding the generator 'identity'... > > The given assembly name or codebase was invalid. (Exception from HRESULT: > 0x80131047) > > at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean [...] read more
.net-core
asp.net-identity
dotnet-cli
asp.net-core-scaffolding
2votes
0answers

VS2017 MSTEST Discovery Fails due to System.Runtime Binding in App.config

Whenever my MSTEST projects have a System.Runtime binding under the runtime element in app.config, test discovery in the Test Explorer fails. The Tests output in the Output Window looks like this: [9/28/2017 12:37:17 PM Informational] ------ Discover test started ------ [9/28/2017 12:37:18 PM Warning] The given assembly name or codebase [...] read more
visual-studio
nuget
mstest
2votes
1answer

Could not load file or assembly 'Oracle.ManagedDataAccess.EntityFramework

I'm getting this error when i want to start my asp.net web app The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) ... Line 22: { Line 23: public ApplicationDbContext() Line 24: : base("DefaultConnection", throwIfV1Schema: false) Line 25: { Line 26: } Its MVC web app connected [...] read more
c#
asp.net
.net
oracle
entity-framework
2votes
0answers

ReflectionTypeLoadException when async methods are present

I am currently getting all of my class types in my .NET desktop application using: Type[] types = Assembly.GetExecutingAssembly().GetTypes(); The problem is that on certain machines this line actually throws a ReflectionTypeLoadException. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [...] read more
c#
system.reflection
2votes
0answers

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

All my xaml's in WPF are giving me the following error: System.IO.FileLoadException The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent) at System.Reflection.AssemblyName..ctor(String assemblyName) at MS.Internal.Design.Metadata.ReflectionProjectNode.FindAssembly(String assembly) at MS.Internal.Design.Metadata.ReflectionProjectNode.ParseClrNamespaceUri(Identifier namespaceId, Identifier name, String clrNamespaceUri, IParseContext context, Node offendingNode) at MS.Internal.Design.Metadata.ReflectionProjectNode.EnsureExists(Identifier [...] read more
c#
wpf
exception
.net-assembly
2votes
1answer

Microsoft.Bcl.Async is not working in Windows XP

I am developing desktop application in WPF on .NET Framework 4.0, because of Windows XP on some client computers. I need async/await in .NET 4.0 so I added references to Microsoft.Bcl.Async (latest NuGet release). Anytime I use Async/Await keyword, program crashes with following exception when started in Windows XP (works [...] read more
.net-4.0
async-await
windows-xp
2votes
0answers

Powershell load dlls without reflection

Is it possible to load an dlls in "Powershell" with out the use of reflection. I have loaded a .Net dll using Add-Type -AssemblyName System.Web | Out-Null I have my "Powershell" script in the same folder as the dlls. So I presumed the following would work . Add-Type -AssemblyName Common.dll [...] read more
powershell
2votes
0answers

Boxstarter won't install on Windows 10

I'm running Windows 10 (PowerShell v5.0.10240.16384, Chocolatey latest, and Boxstarter latest). I can't seem to get parts of boxstarter to install: * boxstarter.winconfig * boxstarter.bootstrapper * boxstarter.chocolatey It fails with messages similar to the following (the log reports the same): Exception : System.IO.FileLoadException: The given assembly name or codebase was [...] read more
powershell
chocolatey
boxstarter
2votes
1answer

Build Error : LC : error LC0000: 'The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)'

I was getting this rather cryptic message on the build output in Visual Studio. There are no other errors but the build fails. LC : error LC0000: 'The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)' read more
visual-studio
2votes
1answer

System.IO.FileLoadException while using Google Calendar 3

I am using the following code to connect to Google Calendar 3. Dim datafolder As String = Server.MapPath("App_Data/CalendarService.api.auth.store") Dim scopes As IList(Of String) = New List(Of String)() Dim UserId As String = "101935195xxxxxx-jm6o24ifgbixxxxxxxxxxxx@developer.gserviceaccount.com".Trim() scopes.Add("https://www.googleapis.com/auth/calendar") Dim myclientsecret As New ClientSecrets() With { _ .ClientId = myClientID, _ ' It is saved [...] read more
vb.net
google-api
google-calendar-api
2votes
1answer

Visual Studio variables not being transformed when generating code via TDS

When referencing an assembly inside a .tt T4 template, I should be able to use the following declaration: <#@ assembly name="$(SolutionDir)\..\..\Build\lib\HedgehogDevelopment.CodeGeneration.Extensions.dll" #> From what I can see, the SolutionDir is not being transformed, and I get an error message (below) Note: The HedgehogDevelopment.CodeGeneration.Extensions.dll cannot be added to the GAC or [...] read more
sitecore
t4
tds
2votes
5answers

SQLite with VS 2010

I'm working on a project and i need to use some database.I chose SQLite because of its easiness to use.But im having some trouble to get it work.I'm using System.Data.SQLite from http://sqlite.phxsoftware.com/ but when i try to run the program i get the following exception message.I'm coding C# with Visual [...] read more
c#
database
visual-studio
visual-studio-2010
sqlite
2votes
1answer

How to resolve generic type in Unity

I'm trying to resolve generic type trough Unity, but I'm getting error: {"The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)":null}. My code and configuration is as follow: namespace Prj.Common.Workflow { public class ServiceActivityBase<I, O> : CodeActivity, IServiceActivityBase { } } namespace Prj.Services { public sealed class [...] read more
c#
unity-container
2votes
0answers

Excel Add-In could not load (xx.dll) during VB.NET Debug in VS2010

VS2010, VB.NET. Creating Excel Add-In with Ribbon. When I start debugging (F5), Excel launches find but my Add-In does not load. I am getting this error message after Excel 2010 opens: Could not load file or assembly 'SatelliteRibbon, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The given assembly name or [...] read more
.net
visual-studio-2010
excel
dll
add-in
2votes
1answer

MVC 4 website on IIS7 - broken by minor changes (AutoMapper?)

I have a website built on ASP.NET MVC4, .NET 4.0 It is deployed on a server running IIS7. I have done minor changes * Added AutoMapper (using nuget package) and used it in one of controllers * Added a new controller derived from ApiController (other ones were derived from Controller) [...] read more
asp.net-mvc
asp.net-mvc-4
iis
automapper
2votes
2answers

Loading a CRL assembly in SQL Server 2005: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

I've written a C# DLL which I need to call from a stored procedure. I've got errors through ALL the steps I did, and managed to solve them. But now I'm so tired of errors that I had to resort here and ask. I can't solve this one. Every little [...] read more
c#
sql
sql-server-2005
clr
.net-assembly
2votes
1answer

How to Create a new instance of class under an AppDomain

I am trying to invoke a class to run under a separate AppDomain but I am getting an exception about noting being able to load the class or one of its dependencies. Here is an example of what I am doing. AppDomain ad = AppDomain.CreateDomain("New domain"); IIdentity identity = new [...] read more
c#
reflection
dll
appdomain
1vote
1answer

Bug in PowerShell classes when script is in a folder containing a single-quote?

My client's PowerShell scripts aren't working for a new user who happens to have a single-quote in their name - which means their profile path is called "C:\Users\Liam'OReilly". It appears to be a bug in the PowerShell class system. Create a folder called "C:\Temp'Test" and add Test.ps1: Write-Host "Test" Class [...] read more
windows-10
powershell
powershell-5.0
1vote
0answers

How can I run a powershell 7 script as a main entry point for docker?

My goal is to build a docker container that will run a powershell file as its main entry point. I need the latest 7.x version of powershell rather than the standard out-of-the-box 5.1 version. So far, nothing I've tried is able to make this work. This is my dockerfile # [...] read more
windows
docker
powershell
1vote
0answers

Registration-free COM Interop between 32-bit client and 64-bit server

I need to use 64-bit dlls in 32-bit application. First, I created a separate 64-bit executable and used Microsoft RPC to call 64-bit code from 32-bit application (originally binaries were native, but it doesn't matter here - we can always write .NET wrappers). Everything worked, but I didn't really like [...] read more
c#
com
interop
32bit-64bit
com-interop
1vote
0answers

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) - Visual Studio 2017

I have ordinary ASP.NET project with .NET Framework 4.5.2, It work great as Web Site Projects (WSP), but I try to change this project to Web Application Projects (WAP). I don't change anything in body of project code, I only add designer with definition of control and add default namespace [...] read more
asp.net
.net
vb.net
aspnet-compiler
visual-studio-2017-build-tools
1vote
0answers

EntityFramework 6.2.0 Code-First Migrate.exe throwing "The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)"

When migrating the database by running "Update-Database" inside the VS2017's Package Manager Console, everything is OK. But running it using the "Migrate.exe" throws "The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)". The command is as follows: Migrate.exe "D:\TestEFMigration\TestEFMigration.dll" /startUpDirectory=D:\TestEFMigration\ /startupConfigurationFile="D:\TestEFMigration\TestEFMigration.dll.config" -verbose -force Please help. read more
entity-framework-6
ef-code-first
1vote
1answer

System.IO.FileLoadException : The given assembly name or codebase was invalid

Hi has anyone had their actorsystem crash with a bad config string? I was given System.IO.FileLoadException : The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) so it seems that it cannot resolve a typename using my config string. here it is: akka { loglevel=WARNING, loggers=["" Akka.Logger.Serilog.SerilogLogger, [...] read more
.net
akka.net
1vote
1answer

Can't load a specific 32-bit assembly through Reflection

I'm using the library SharpShell to develop a simple shell extension (a property sheet) to display some information for .NET assemblies, see: enter image description here [https://i.stack.imgur.com/3koub.png] This shell extension and SharpShell itself is not relevant to this question, but to explain my scenario so you can understand better my [...] read more
c#
.net
reflection
.net-assembly
anycpu
1vote
5answers

ASP.net LoadAssembly dynamically

I'm trying to load an assembly at runtime. For that I'm using the following line: System.Reflection.Assembly.Load(file.FullName); file is a FileInfo object, so file.FullName returns the full path to the file on the filesystem, e.g.: c:\mywebsite\dlls\myassembly.dll When I try to execute the line above I get the following error: > Could [...] read more
c#
asp.net
reflection
1vote
2answers

Error 0x80131047 loading MySQL Connector DLL

PowerShell has just been opened sourced (v6.0.0-alpha.10), and I'm trying to get it to connect to a MySQL instance from OS X. Oracle seems to suggest (if I'm reading it correctly) that they have a .Net Core connector here. I ran the install like this: Install-Package MySql.ConnectorNET.Entity -Destination /MySQL and [...] read more
mysql
macos
powershell
.net-core
powershell-core
1vote
0answers

Could not load file or assembly exception C# .NET

I'm working on this program for a friend, but I'm having an issue. The program keeps throwing "The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)" It's trying to load Microsoft.ExtendedReflection.dll for the ProvinceCopier.dll plugin. The full exception that my program outputed to a log is as [...] read more
c#
.net
1vote
0answers

replaced a dll in GAC_MSIL how do I rebuild that cache?

Just a bit of a background im a sysadmin attempting to build a few C# library's for Powershell DSC. As a result i've replaced a few dll files with a more up to date version in the GAC_MSIL folder. This did fix the errors with my custom library however now [...] read more
c#
powershell
dll
.net-assembly
dsc
1vote
0answers

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)?

I am trying to sort this annoying bug and I cant figure out the root cause of this exception. I went through the stack trace and still wasnt able to figure out the problem. I checked for he required dlls and everything looks fine to me. Any suggestions or advise [...] read more
c#
asp.net
oracle
model-view-controller
1vote
1answer

x86/x64 The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Good morning, I am developping a C# add-on to word, the first edition was compiled to run under office word x64, but now I have to run it under x86 version and I get this error when loadin the project in debug mode : The given assembly name or codebase [...] read more
c#
x86
64-bit
gac
1vote
0answers

Error loading assembly after renaming path

I have a solution with severals projects i use for learning purpose. Recently i added a new class library project. I somehow accidently named it NinjaDomain,Classes instead of the intended NinjaDomain.Classes (dot instead of comma) Before i realised it i had done som coding in this project and referenced it [...] read more
asp.net
.net
visual-studio
visual-studio-2015
1vote
2answers

Type initializer for Tweetinvi

I am trying to use a twitter API TweetInvi but unfortunately facing following error i searched about it alot but couldnt found anything :/ any help will be appriciated This is the error i am getting, well its an inner error the outer ambigous error is (Outer Error) The type [...] read more
c#
.net
api
twitter
1vote
0answers

Could not load file or assembly 'System.Core , Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'

I've a vimeo API dll's for uplaoding video's to Vimeo server, it works good in dev server but after moving to Live servers it doesn't work.it throws this error {"Message":"An error has occurred.","ExceptionMessage":"Could not load file or assembly 'System.Core , Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The [...] read more
c#
windows
reflection
vimeo-api
1vote
1answer

SQL CLR - Cannot run SQL CLR from assembly

I have a SQL CLR database project in VS 2013. I am deploying to SQL Server 2008 R2. I have done the below steps: USE master GO sp_configure 'clr enabled', 1 GO RECONFIGURE GO USE [MyDb] GO ALTER DATABASE [MyDb] SET TRUSTWORTHY ON use master; grant external access assembly to [...] read more
sql-server
sqlclr
1vote
1answer

How to set up IIS6 to host ASP .NET 4 MVC4 application

I'm having a hard time configuring my server to host MVC4 application. Here's my situation: * I have Windows 2003 server SP2 * Until now, all my hosted applications are targeted to .NET Framework 3.5, thus using ASP .NET 2. I use single web site to host web application * [...] read more
asp.net
.net
asp.net-mvc-4
razor
iis-6
1vote
1answer

Load and Unload Assembly in own AppDomain

I do web. service that load assembly file by input parameter. Then in assembly will try to find a specific type (inherited from specific interface), create an instance and returns the result of the method. I need to make the call to the assembly was again released. From the input [...] read more
c#
web-services
1vote
1answer

Is it possible to use build Windows Phone projects using Team Foundation Service's hosted build agents?

I'm trying to get a solution containing a Windows Phone app to build on check-in to Team foundation Service (i.e. the hosted service), however it is failing with errors like: > C:\Program Files (x86)\MSBuild\Microsoft\Silverlight for > Phone\v4.0\Microsoft.Silverlight.Common.targets (200): The "CompileXaml" task > failed unexpectedly. System.IO.FileLoadException: Could not load file or [...] read more
continuous-integration
windows-phone
azure-devops
0votes
0answers

call C# dll file from python

my C# file Calculator.c using System; namespace DynamicCS { public class Calculator { public double add(double argA, double argB) { return argA + argB; } public double sub(double argA, double argB) { return argA - argB; } } } DynamicCalc.cs file using System; using System.Dynamic; namespace DynamicCS { public class [...] read more
python
c#
ctypes
python.net
0votes
0answers

How to pass folder path as run parameter in Docker

This is my docker file ENV filePath = "C:\newfiles\Prepayment_DB.accdb" sourcePath = "C:\srcPath\" destPath = "C:\destPath\" FROM mcr.microsoft.com/dotnet/framework/sdk:3.5 COPY bin/ MbrRst/ WORKDIR MbrRst/Release ENTRYPOINT ["RunApplication.exe", "oradbserv1", "krish", "one", $filePath, $sourcePath, $destPath] When I try to run the above code, it gives me error > Details: The given assembly name or codebase [...] read more
c#
docker
containers
0votes
0answers

Error while installing npgsql for .net Application with Ibatis

Below error is populated when the .net application is configured for Npgsql (Postgresql) along with Ibatis. > Could not load file or assembly 'Npgsql\, Version\=v4.0.30319\, > Culture\=neutral\, PublicKeyToken\=5d8b90d52f46fda7' or one of its > dependencies. The given assembly name or codebase was invalid. (Exception from > HRESULT: 0x80131047)"} System.Exception > {IBatisNet.Common.Exceptions.ConfigurationException} [...] read more
.net
visual-studio
npgsql
ibatis
0votes
1answer

Create and execute a LINQPad class/method in separate AppDomain

I'm trying to prototype some code in everyone's favorite prototyping IDE (LINQPad). I want to run a class I've created in the script in a separate AppDomain. For example: void Main() { AppDomain domain = AppDomain.CreateDomain("MyDomain"); var qry = (AdHocQuery)domain.CreateInstanceAndUnwrap( typeof( AdHocQuery ).Assembly.Location, typeof( AdHocQuery ).FullName ); qry.Run(); AppDomain.Unload(domain); } [...] read more
appdomain
linqpad
0votes
1answer

Azure Functions - The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

The Problem I am trying to create an Azure function leveraging .NET Core 2.2 that accesses a Google Sheet via the Google Sheets API, calls the data, and inserts it into a SQL DB also hosted in Azure. Here's the error I'm: ErrorImg [https://i.stack.imgur.com/SiGXW.png] This after following this guide. Note [...] read more
c#
azure
.net-core
google-api
azure-functions
0votes
1answer

The given assembly name was invalid Type.GetType() not working

> Unhandled Exception: System.IO.FileLoadException: The given assembly name or > codebase was invalid. (Exception from HRESULT: 0x80131047) I am getting an exception from C# in a simple program consisting of two classes, Program.cs and AnotherClass.cs. I want to use the static Type.GetType method in Program.cs to get AnotherClass as a [...] read more
c#
.net-assembly
0votes
2answers

Why is this newly created MVC application throwing this error?

All I did was make a new MVC project in Visual Studio called Fadi's Project. I didn't touch any code but it threw this error when I ran the application. I tried debugging but no breakpoints where being hit. I tried to find a solution to my specific problem and [...] read more
c#
asp.net-mvc
0votes
0answers

Assembly.LoadFile is non-compliant?

I recently followed an example for pre-loading several DLLs from the bin folder as described here: https://stackoverflow.com/a/5599581/1099519 This actually did work as expected, but I am using SonarLint for VisualStudio and in the following line of code is underlinded and marked as a "Code Smell": Assembly.LoadFile(dll); Stating the following S3885 [...] read more
c#
.net-assembly
sonarlint
sonarlint-vs
0votes
1answer

Cannot get Type declared in a .NET Framework assembly from a .NET Core 2 assembly

I have a .NET Core 2 console app which is performing some maintenance/upgrade work on the DB underlying a ASP.NET website running on .NET Framework 4.7.1. The console app needs to read in the assembly-qualified type names of classes which are declared in the .NET Framework assemblies. It does this [...] read more
c#
types
.net-core
0votes
1answer

missing a section declaration

I've done the following in the Web.config <configuration> <configSections> <section name="secureAppSettings" type="System.Configuration.NameValueSectionHandler, System, Version=4.0.0.0, Culture=neutral PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" allowLocation="true" /> <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> </sectionGroup> </configSections> ... etc And [...] read more
.net
asp.net-mvc
web-config
configsection
0votes
1answer

Can I install MVC 3 into a windows container during the Docker build?

I am attempting to "Lift and Shift" a legacy web service (and the website used to administer it) that was written using MVC 3. I have used the visual studio "add -> docker support" feature and I am getting my website in a container and the website will run properly [...] read more
docker
asp.net-mvc-3
dockerfile
windows-container
0votes
1answer

Troubleshooting Unity IoC container exception ("The given assembly name or codebase was invalid")

In my codebase, I have created a container sucessfully, but then run into an exception when trying to configure it: _container = new UnityContainer(); var unityConfigurationSection = (UnityConfigurationSection)ConfigurationManager.GetSection("unity"); if (unityConfigurationSection != null) { try { unityConfigurationSection.Configure(_container); } catch (Exception ex) { Console.WriteLine(ex); } } the unityConfigurationSection.Configure(_container); line is what does [...] read more
c#
.net
inversion-of-control
unity-container
0votes
0answers

Why is my unit testing is not working?

I'm using vs17, Whenever I run any of the tests I get this > [4/5/2018 12:10:19 PM Informational] ------ Run test started ------ [4/5/2018 > 12:10:19 PM Warning] > [MSTest][Discovery][C:*path*\bin\Debug\FeatureFlags.API.Tests.dll] The given > assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) > [4/5/2018 12:10:19 PM Warning] No test [...] read more
c#
visual-studio
unit-testing
0votes
2answers

Key File, GAC, DLL... Feature could not be installed because the loading of event receiver assembly failed

I'm doing my first DLL, a simple HelloWorld SharePoint Feature. The Feature has an event handler, therefore code beside a feature.xml and elements.xml file. I can build the solution fine, and I have a post build script that calls gacutil.exe. Then I added a key file, I chose a random [...] read more
sharepoint-2007
0votes
1answer

Dynamic load assembly in WinRT

I have created a program to load dynamic assemblies using the following code: using System; using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; namespace BarcodeReader { public class Parsing { private static string _FolderName = "BarcodeReaders"; private static bool _Initialized = false; private static IEnumerable<IBarcodeReader> _Objs; /// Parse the picture /// <returns>The [...] read more
c#
windows-runtime
0votes
1answer

Not able to debug Outlook 2013 add-in project using outlook 2016

I have created outlook 2013 add-in project using visual studio 2013. I was able debug it on outlook 2013. During upgrade of office products my outlook 2013 upgraded to outlook 2016. Now I am not able to debug my project. I tried giving path of new outlook in "Start external [...] read more
c#
outlook
outlook-addin
0votes
0answers

C# dll in powershell

I want to do something to C # code executed from a script powershell. The question arose as to add a third-party library in the project?I am doing so $path = @("C:\Users\name\Desktop\ch\packages\System.Data.SQLite.1.0.97.0") $cSharp = @"my C# code"@ Add-Type -TypeDefinition $cSharp -ReferencedAssemblies $path But when i start having problems running the [...] read more
c#
powershell
dll
0votes
1answer

CLR DLL Deploys Fine in VS but not through MSBuild

I am trying to put together some build scripts with a .NET project, and deploy some CLR code to SQL Server. I have signed the assembly and can deploy it as a stored procedure if I build the DLL in Visual Studio by choosing "Build." Running the stored procedure works [...] read more
c#
.net
sql-server
visual-studio
msbuild
0votes
1answer

C# WPF program runs in debug but not release without debugging

Trying to test a small program in release mode without debugging. Program runs fine in debug mode, and fine in release mode with debugging. When I try to run in release with no debugging the following happens. *Note: I've tried multiple configuration modes. For configurations other than x86 and platform [...] read more
c#
mysql
.net
wpf
0votes
1answer

The type initializer for 'Tweetinvi.TwitterCredentials' threw an exception while Autofac is 3.3+

i want to retrieve tweets from twitter using specific hashtags. i am using tweetinvi for this purpose.but i am getting an error outer exception: The type initializer for 'Tweetinvi.TwitterCredentials' threw an exception. Inner exception: {"Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. [...] read more
exception
credentials
hashtag
tweets
tweetinvi
0votes
1answer

AppFabric: Cache host cannot load provider assembly for read-through and write-behind

I want to try out the new read-through/write-behind feature of AppFabric 1.1. I implemented a provider that references some other own assemblies, according to http://msdn.microsoft.com/en-us/library/hh361698%28v=azure.10%29.aspx. All are signed and compiled for AnyCPU. I put the provider and all referenced assemblies in the GAC (see http://msdn.microsoft.com/en-us/library/hh361703(v=azure.10).aspx). Then I stopped the cache [...] read more
caching
appfabric-cache
0votes
1answer

throwing error while creating UserCredential ;

I am getting the error as : > Could not load file or assembly 'System.Core, Version=2.0.5.0, > Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of > its dependencies. The given assembly name or codebase was invalid. (Exception > from HRESULT: 0x80131047) while executing the code for integrating google calendar in my web [...] read more
c#
asp.net
.net
google-api
0votes
1answer

Google.Apis.Http.ConfigurableMessageHandler exception at runtime

I have problem with Google Analytics API .NET. While connecting to GA via api at line var certificate = new X509Certificate2(pathToPrivateKey, passToPrivateKey, X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential(new ServiceAccountCredential.Initializer(serviceAccountEmailAddress) { Scopes = scopes }.FromCertificate(certificate)); It give below error Message=The type initializer for 'Google.Apis.Http.ConfigurableMessageHandler' threw an exception. Source=Google.Apis.Core TypeName=Google.Apis.Http.ConfigurableMessageHandler StackTrace: at [...] read more
google-analytics-api
windows-server-2003
google-api-dotnet-client
system.net
service-accounts
0votes
0answers

Upgrade Nuget Gallery - EF AutomiaticMigration issue

I self-host nuget gallery inside my company. I am trying to upgrade it but I have following error: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic [...] read more
entity-framework
powershell
nuget
0votes
1answer

How to debug a HRESULT: 0x80131047 compile error

So I have this web project that I downloaded and for some reason it wont let me compile. Gives the error: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) I know all the common reasons for that. Special characters in the path, etc. I check that, [...] read more
c#
debugging
visual-studio-2013
.net-assembly
asp.net-3.5
0votes
0answers

Unable to load modules using Unity Framework

I am trying to configure the unity framework in a app.config, can you please give an example of how to set this up please as when I am trying to do so using below app.config file I am getting below error: > The given assembly name or codebase was invalid. [...] read more
c#
unity-container
prism
0votes
1answer

Create assembly in SQL Server

I keep getting the following error: Msg 10314, Level 16, State 11, Line 1 An error occurred in the Microsoft .NET Framework while trying to load assembly id 66079. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. [...] read more
sql
sql-server
sql-server-2005
.net-assembly
0votes
2answers

SQL Assembly Errors with Unsafe

I have the following error message: Msg 10314, Level 16, State 11, Line 1 An error occurred in the Microsoft .NET Framework while trying to load assembly id 66007. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. [...] read more
sql
sql-server
sql-server-2005
0votes
1answer

StructureMap for IoC works with 4.5 .net framework, not with 4.0 framework in MVC 3 application

I have a mvc 3 project in which I have used Structure map for IoC. Structure map gives error:- structureMap Exception Code: 207 on Framework 4.0. But when I installed .net framework 4.5 it works fine. Here in this case I have been told to use only 4.0. Only I [...] read more
c#
asp.net-mvc-3
inversion-of-control
automapper
0votes
0answers

SQL Server 2008 External Assemblies

I have an external assembly I'm trying to load in to SQL server 2008 and I keep getting the same error as this previous post. SQL Server stops loading assembly Msg 10314, Level 16, State 11, Line 3 An error occurred in the Microsoft .NET Framework while trying to load [...] read more
c#
sql-server-2008
0votes
1answer

C# Load a native dll dynamic simple

So I dont know how to do that... I have a program "Prg.cs" and a dll "Test.dll". I have try: Assembly asm=Assembly.Load(@"C:\Users\Me\documents\visual studio 2013\Projects\Prg\Prg\bin\Debug\Test.dll"); Type runApp = asm.GetType(); dynamic thisApp = Activator.CreateInstance(runApp, this); But gives me error: An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll Additional information: Could not [...] read more
c#
class
oop
dynamic
dll
0votes
1answer

The server may be running out of resources in aggregate functiond

I try to copy this code and to deploy this function to my server. When I try to create the function I get the message below. It's very strange to me because I don't use any unsafe resource. I tried to run this with execute as 'dbo', and it's not [...] read more
c#
sql-server-2012
sqlclr
0votes
4answers

Failure Loading Of Event Receiver Assembly

I have the following code snippet in my feature.xml <Feature Id="0c272f81-49c0-440a-a544-677d51a8ffe4" ReceiverAssembly="FeaturedMasterPage, Version 1.0.0.0, Culture=Neutral, PublicKeyToken=9f4da00116c38ec5" ReceiverClass="FeaturedMasterPage.FeatureEventReciever" Title="Branding202" Scope="Web" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/"> <ElementManifests> <ElementManifest Location="Branding202\Module.xml" /> <ElementFile Location="Branding202\Branding202.Master" /> </ElementManifests> </Feature> My FeatureEventReciever.cs says:- using System; using System.Collections.Generic; using Microsoft.SharePoint; using System.Text; using System.Diagnostics; namespace FeaturedMasterPage { class FeatureEventReciever:SPFeatureReceiver [...] read more
sharepoint
0votes
1answer

File Not Found ,Could not load or find Assembly System.Net 2.0.5.0

I have made the MVC4 application. In the application , I am getting the data from GoogleAPI so I am using DotNetOpenAuth for Authentication and I have added the System.Net 2.1.10.0 assembly. Its working fine when we deployed into IIS 7, but when I deployed to IIS 6 it gives [...] read more
vb.net
asp.net-mvc-4
dotnetopenauth
system.net
0votes
3answers

Activator.CreateInstance throws an exception

I have this class: public class PlaceLogicEventListener : ILogicEventListener { } I have this code trying to create an instance by reflection: public ILogicEventListener GetOne(){ Type type = typeof (PlaceLogicEventListener); return (ILogicEventListener)Activator.CreateInstance(type.Assembly.Location, type.Name); } I am getting the following exception: System.TypeInitializationException : The type initializer for 'CrudApp.Tests.Database.DatabaseTestHelper' threw an exception. [...] read more
c#
reflection
activator
0votes
1answer

ReportViewer, Scriptmanager and .NET 4.0 Crash

I have a weird one. I'm working with an ASP.NET 4.0, mostly MVC 4, but with one Webforms page that holds a report viewer. It works fine on my local machine, however I get a strange behavior on the staging server. On the first load it crashes with: Could not [...] read more
asp.net
.net
asp.net-mvc
report-viewer2010
-1votes
1answer

Serialize a class using XML

After watching more than 3 hours of tutoring I can't find an answer: I'm trying to serialize a class here: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; using System.Xml.Serialization; namespace Gestionnaire_d_Établissement_Scolaire { public class Resources { public List<Student> Students { get; set; } public List<Teacher> [...] read more
c#
-1votes
1answer

Use Reflection to only get specific methods inside a DLL

I'm trying to use reflection to get specific methods in a DLL so I can execute them but am getting an error: Could not load file or assembly 'MyDLL.dll' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) Not sure what I [...] read more
c#
reflection
-1votes
1answer

Is it possible to run the QuickBooks SDK in Excel?

This is a bit of an abstract question but I hope someone can share some insight into this because Google isn't getting me any clear answers. I've been tasked with importing and exporting data between an Excel app and QuickBooks with a few requirements: 1. It can't use the awful [...] read more
c#
excel
visual-studio
wcf
quickbooks

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0