Skip to content

SYSLIB1051: Runtime Marshalling must be disabled only shows up in command line builds, not in Visual Studio #84739

Closed

Description

@jtschuster

When using the ComInterfaceGenerator, SysLib1051 should appear when trying to generate interfaces with parameters that require marshalling. It appears during command line builds, but not in Visual Studio.

    [GeneratedComInterface]
    [Guid("B029E51B-4C55-4fe2-B993-9F7BC1F10DB4")]
    internal partial interface ISymNGenWriter2 : ISymNGenWriter
    {
...
        void QueryPDBNameExW(
            [MarshalUsing(CountElementName = nameof(cchMax))]
            char[] pdb, // VS should show an error here
            IntPtr cchMax);
    }

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 'pdb'

Activity

  1. ghost added
    untriaged
    on Apr 12, 2023
  2. removed
    untriaged
    on May 1, 2023
  3. added this to the 8.0.0 milestone on May 1, 2023
  4. added a commit that references this issue on Jun 13, 2023
    539a657
  5. ghost added
    in-pr
    on Jun 13, 2023
  6. ghost removed
    in-pr
    on Jun 14, 2023
  7. ghost locked as resolved and limited conversation to collaborators on Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions