You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception thrown: 'System.BadImageFormatException' in System.Windows.Forms.dll
An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll
Could not load file or assembly 'Python.Runtime, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
stack trace :
System.BadImageFormatException
HResult=0x8007000B
Message=Could not load file or assembly 'Python.Runtime, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=WindowsFormsAppJTTH
StackTrace:
at WindowsFormsAppJTTH.Form1.button1_Click(Object sender, EventArgs e) in C:\Users\Administrator\source\repos\WindowsFormsAppJTTH\WindowsFormsAppJTTH\Form1.cs:line 219
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at WindowsFormsAppJTTH.Program.Main() in C:\Users\Administrator\source\repos\WindowsFormsAppJTTH\WindowsFormsAppJTTH\Program.cs:line 19
Would like to know how to solve this, thank you.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Environment
i downloaded this from "Manage Nuget-Package" in Visual Studio 2017 Community
Already
pip install pythonnet
in the environment.Operating System: Window 7, 64 bit
Software Used : Microsoft Visual Studio Community 2017
4.1) .net framework : 4
M:\Anaconda3;M:\Anaconda3\Library\mingww64\bin;M:\Anaconda3\Library\usr\bin;M:\Anaconda3\Library\bin;M:\Anaconda3\Scripts
Details
To do : Trying to implement Python in c# form
Progress :
running this code.
when debug,
from program.cs
Application.Run(new Form1()); // crashes here
error message :
stack trace :
Would like to know how to solve this, thank you.
The text was updated successfully, but these errors were encountered: