VS2015 Universal APP - Could not load assembley (badimageformatexception)
NickName:Marcelo Sabaris Carballo Pinto Ask DateTime:2015-06-11T06:22:15

VS2015 Universal APP - Could not load assembley (badimageformatexception)

Error to call any method of System.Threading , System.IO or System.ReflectionTypeExtensions that have been imported from nuguet in a universal app aplication, underneath have a exemple :

Call :

private void Button_Click(object sender, RoutedEventArgs e)
{
    var thread = Thread.CurrentThread; 
}

Error:

Could not load file or assembly 'System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
or one of its dependencies.
Reference assemblies should not be loaded for execution. 
They can only be loaded in the Reflection-only loader context. 
(Exception from HRESULT: 0x80131058) 

Copyright Notice:Content Author:「Marcelo Sabaris Carballo Pinto」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768322/vs2015-universal-app-could-not-load-assembley-badimageformatexception

More about “VS2015 Universal APP - Could not load assembley (badimageformatexception)” related questions

VS2015 Universal APP - Could not load assembley (badimageformatexception)

Error to call any method of System.Threading , System.IO or System.ReflectionTypeExtensions that have been imported from nuguet in a universal app aplication, underneath have a exemple : Call :

Show Detail

running windows universal app on emulator in vs2015 on win7

I have been using the following tutorial https://msdn.microsoft.com/en-us/windows/uwp/get-started/create-a-basic-windows-10-app-in-cpp in order to create some simple windows universal app. I have ...

Show Detail

Could not load file or assembly 'system.net, version=2.0.5.0' on VS2015 RC universal when using youtube api

With the code below, using Google.Apis.Services; using Google.Apis.YouTube.v3; var searchListResponse = await searchListRequest.ExecuteAsync(); I get error Could not load file or assembly 's...

Show Detail

System.BadImageFormatException: Could not load file or assembly (from installutil.exe)

I am trying to install a Windows service using InstallUtil.exe and am getting the error message System.BadImageFormatException: Could not load file or assembly '{xxx.exe}' or one of its dependen...

Show Detail

Portable class library and Universal Windows App with Kinect v2

Using Visual Studio 2015, I need to create a Universal Windows App and I want to add a Portable Class Library in the same solution. In this Portable Class Library I want to add a reference to Micro...

Show Detail

System.BadImageFormatException - Could not load file or assembly

Unable to resolve the exception. Already tried clean rebuild, also cleared Temporary cache. Nothing worked! Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework64\v4.0.30319\

Show Detail

Could not load -ipad images in Universal app

I am creating a universal ios 2D game using cocos2d. I have few images with naming convention as imageName-ipad.png but the app is not able to load this image when i try to load using following lin...

Show Detail

VS2015: Default Universal App template causes XAML designer crash

When I create a Universal App template project in VS2015, it throws an unhandled exception in the designer view (telling me that often times, 'excluding code' will cause less hiccups), then proceed...

Show Detail

BadImageFormatException: Could not load file or assembly 'System.Net.WebHeaderCollection'

I suddenly got this error while working on my umbraco website BadImageFormatException: Could not load file or assembly 'System.Net.WebHeaderCollection' Did anyone have the same issue? Tried searc...

Show Detail

Could not load file or assembly (BadImageFormatException and FileNotFoundException)

I have two class libraries core and plugins and a WPF application that uses these two libraries. In core I dynamically load the plugins as follows: try { Assembly assembly = As...

Show Detail