VS2015 Universal APP - Could not load assembley (badimageformatexception)

2

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) 
win-universal-app
badimageformatexception
visual-studio-2015
asked on Stack Overflow Jun 10, 2015 by Marcelo Sabaris Carballo Pinto • edited Jun 13, 2015 by Horizon_Net

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0