CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

IList property sourcegenerator error in C# authored component

Open angelazhangmsft opened this issue 2 years ago • 0 comments

Describe the bug

IList property causes source generator to fail for authored C# component

To Reproduce

  1. Create a C#/WinRT authored component (set CsWinRTComponent to true)
  2. Add this to the component: public IList<string> listProperty { get; set; }
  3. CSC : warning CS8785: Generator 'SourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'Win32Exception' with message 'Incorrect function'

In the logging output, seeing: error: 'Type 'Windows.Foundation.Collections.IVector1' could not be found' when processing AuthoringDemo.FolderEnumeration error: Type 'Windows.Foundation.Collections.IVector1' could not be found

Expected behavior

No error

Version Info

1.3.3

angelazhangmsft avatar Jul 29 '21 19:07 angelazhangmsft