Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Windows.System.RemoteSystems to an embedded project causes error 'CS0426: The type name 'Vftbl' does not exist in the type 'T?'' #1073

Closed
StephenMLucas opened this issue Jan 11, 2022 · 0 comments · Fixed by #1084
Assignees
Labels
bug Something isn't working fixed Issue has been fixed in an upcoming or existing release
Milestone

Comments

@StephenMLucas
Copy link

Describe the bug
When the Windows.System.RemoteSystems namespace, or a type within it, is added to an embedded project it starts outputting the compiler error; Nullable.cs(17,36,17,41): error CS0426: The type name 'Vftbl' does not exist in the type 'T?'

To Reproduce

  1. Open the sample 'TestEmbedded.sln' solution in VS2019 or CS2022
  2. Add namespace reference Windows.System.RemoteSystems; to the CsWinRTIncludes section of TestEmbeddedLibrary.csproj
  3. Build the project and see the error is introduced (along with other errors about missing types referenced by RemoteSystems.cs; fixing these errors by importing additional namespaces does not fix the error in Nullable).

The error appears consistently across all target frameworks in the multi-targeted sample (net6.0-windows target fails to build in VS2019 as expected).

Expected behavior
The precise repro case described above will still fail to compile with CS0234 errors in RemoteSystems.cs but the CS0426 error in Nullable.cs should not be present as it does not appear to be end user fixable.

Version Info
CSWinRT NuGet : 1.4.1
Windows SDK : Reproduced on 18362 and 19041
Visual Studio: 16.11.8, 17.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue has been fixed in an upcoming or existing release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants