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
get an error of "Failed to load language 'IronPython 2.7.11': Value cannot be null. (Parameter 'path1')" when publishing a .net5.0 project with the "Produce Single File" option setting as True.
Steps to Reproduce
create a c# project using .NET 5 which targets net5.0
run the published exe Expected behavior: The above prints "World" succeessfully.
Actual behavior: I get an error as below
...\bin\Release\net5.0\win-x64\publish> .\TestIronPython.exe
Unhandled exception. System.Reflection.TargetInvocationException: Failed to load language 'IronPython 2.7.11': Value cannot be null. (Parameter 'path1')
---> System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.IO.Path.Combine(String path1, String path2)
at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)
--- End of inner exception stack trace ---
at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)
at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)
at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName& providerName, LanguageContext& language) at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)
at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)
at IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime)
at IronPython.Hosting.Python.CreateEngine()
at TestIronPython.Program.RunScript()
at TestIronPython.Program.Main(String[] args)
Versions
You can get this information from executing ipy -V.
I'm not sure how to execute this command. I'm not invoking C# from python but instead invoking Python Script within a C# project.
Prerequisites
Description
get an error of "Failed to load language 'IronPython 2.7.11': Value cannot be null. (Parameter 'path1')" when publishing a
.net5.0
project with the "Produce Single File" option setting asTrue
.Steps to Reproduce
net5.0
run the published exe
Expected behavior: The above prints "World" succeessfully.
Actual behavior: I get an error as below
Versions
I'm not sure how to execute this command. I'm not invoking C# from python but instead invoking Python Script within a C# project.
5.0.101
I'm using
IronPython
of2.7.11
The text was updated successfully, but these errors were encountered: