Replies: 1 comment
-
I found an issue for this: #98616 & it looks like this is by design and the solution would be to use a custom marshaller. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to use LibraryImport and have found an issue where if my structure is in a different project I will get SYSLIB1501. I am using net8.
This code works:
But if I move the Test1 struct into a separate project that is referenced by the one with the libraryimport I will get an error:
Severity Code Description Project File Line Suppression State
Error SYSLIB1051 Runtime marshalling must be disabled in this project by applying the 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' to the assembly to enable marshalling this type. The generated source will not handle marshalling of parameter 'x'. (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1051) LibraryImportIssue
Am I missing something? I would like to keep the layout the same and keep my objects in a services library to prevent some circular dependencies issues.
Beta Was this translation helpful? Give feedback.
All reactions