Hello there!
I’m trying to include SwiPlCs
in my net7.0
project.
When I put this in my .csproj
<Reference Include="SwiPlCs">
<HintPath>lib\SwiPlCs.dll</HintPath>
</Reference>
I get:
Unhandled exception. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Runtime.InteropServices.Marshal.WriteInt64(IntPtr ptr, Int32 ofs, Int64 val)
at SbsSW.SwiPlCs.libpl.SetStreamFunction(PlStreamType streamType, StreamsFunction functionType, Delegate function)
at SbsSW.SwiPlCs.PlEngine.SetStreamFunctionWrite(PlStreamType streamType, DelegateStreamWriteFunction function)
at SbsSW.SwiPlCs.PlEngine.Initialize(String[] argv)
at Program.<Main>$(String[] args) in \path\to\Program.cs:line 42
if I try this:
<Reference Include="SwiPlCs64">
<HintPath>lib\SwiPlCs64.dll</HintPath>
</Reference>
I get this:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'SwiPlCs, Version=1.1.60601.0, Culture=neutral, PublicKeyToken=03ea137181587c56'. The system cannot find the file
specified.
File name: 'SwiPlCs, Version=1.1.60601.0, Culture=neutral, PublicKeyToken=03ea137181587c56'
at Program.<Main>$(String[] args)
Is there any reason this shouldn’t work? Suggestions would be much appreciated!