I developed an application using IronPython 2.7 with WPF using VS2017 that works fine using the ipy command. I want to create an exe file from the project so I used the following command in cmd:
ipy pyc.py /main:IronPython5.py /target:winexe
which XAML file of project including all related DLLs are located in deploy folder but, I get the following error that I can't understand what is means:
Traceback (most recent call last):
File "pyc.py", line 332, in <module>
File "pyc.py", line 327, in Main
File "pyc.py", line 181, in GenerateExe
SystemError: Ambiguous match found.
The Ironpython5.py contains:
import wpf
from System.Windows import MessageBox
from System.Windows import Application, Window
class MyWindow(Window):
def __init__(self):
self.str1 = ""
wpf.LoadComponent(self, 'IronPython5.xaml')
def Button_Click(self, sender, e):
if self.str1 == "":
MessageBox.Show("msg1")
else:
MessageBox.Show("msg2")
pass
if __name__ == '__main__':
Application().Run(MyWindow())
and also the IronPython5.py contains:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="IronPython5" Height="300" Width="300">
<Grid>
<Button Content="Button" HorizontalAlignment="Left" Margin="159,238,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
</Grid>
</Window>
the dll files are:
- IronPython.dll
- IronPython.Modules.dll
- Microsoft.Dynamic.dll
- Microsoft.Scripting.dll
- Microsoft.Scripting.Metadata.dll
please help me how to fix this error to generate the exe file.