Hi Chris,
thank you very much!
When you are ready, I'll need to find an alternative way to the .config file as I have to implement this functionality in a DLL library (that is loaded dynamically at runtime).
Wolfgang
X# Scripting question
X# Scripting question
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
X# Scripting question
Hi,
if someone is interested: Chris has sent me yesterday an old version of the scripting DLLs, and they work now.
This is the code:
and I had to add a .config file with the following content:
and a few DLLs more:
System.Collections.Immutable.dll
System.IO.FileSystem.dll
System.Reflection.Metadata.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Primitives.dll
System.Text.Encoding.CodePages.dll
System.ValueTuple.dll
System.Xml.ReaderWriter.dll
XSharp.CodeAnalysis.dll
XSharp.CodeAnalysis.dll.config
XSharp.Scripting.dll
Wolfgang
if someone is interested: Chris has sent me yesterday an old version of the scripting DLLs, and they work now.
This is the code:
Code: Select all
method Process( cScriptCode as string ) as string
local cReturn as string
local oReturn as object
cReturn := ""
try
oReturn := XSharpScript.EvaluateAsync( ;
cScriptCode, ScriptOptions.Default, _oParameters ):Result
cReturn := oReturn:ToString()
catch oEx as Exception
MessageBox.Show( _oOwner, oEx:Message, "Script error" )
end try
return cReturn
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
System.Collections.Immutable.dll
System.IO.FileSystem.dll
System.Reflection.Metadata.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Primitives.dll
System.Text.Encoding.CodePages.dll
System.ValueTuple.dll
System.Xml.ReaderWriter.dll
XSharp.CodeAnalysis.dll
XSharp.CodeAnalysis.dll.config
XSharp.Scripting.dll
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
X# Scripting question
To complete my message: attached to this message you will find a zip archive with the application source as XIDE export file and the needed DLLs.
Wolfgang
Wolfgang
- Attachments
-
- ScriptTest.zip
- (3.36 MiB) Downloaded 45 times
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
X# Scripting question
Wolfgang,
Would it help if we build the scripting DLL against the .Net Framework in stead of .Net Standard, so you it depends on less assemblies?
Robert
Would it help if we build the scripting DLL against the .Net Framework in stead of .Net Standard, so you it depends on less assemblies?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
X# Scripting question
Hi Robert,
yes, that would definitely help. Since .NET Standard has no GUI, there is no possibility to build GUI applications against .NET Standard.
For web server applications it would be better to have .NET Standard. Maybe you could deliver both versions?
Thank you for asking!
Wolfgang
yes, that would definitely help. Since .NET Standard has no GUI, there is no possibility to build GUI applications against .NET Standard.
For web server applications it would be better to have .NET Standard. Maybe you could deliver both versions?
Thank you for asking!
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it