Methods exposed to Windows Runtime must return only Windows Runtime types.
See original GitHub issueI’m getting a
'AlarmClock.ParameterController.GetWithSimpleParameters(System.Int32, System.String)' returns 'Devkoes.Restup.WebServer.Models.Schemas.GetResponse', which is not a valid Windows Runtime type. Methods exposed to Windows Runtime must return only Windows Runtime types.
when following the REST tutorial in the wiki. I’m also using a headless app and getting the same results when trying the example provided in the repo.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (2 by maintainers)
Top Results From Across the Web
How can I overcome Windows Component limitation to ...
Method 'X' returns 'Y', which is not a valid Windows Runtime type. Methods exposed to Windows Runtime must return only Windows Runtime types...
Read more >The Windows Runtime (WinRT) type system
Describes the Windows Runtime (WinRT) type system, and defines parameterized types, versioning, and other factors.
Read more >Diagnose C#/WinRT component errors - Windows apps
Exporting types that aren't valid Windows Runtime types. The public interface of your component must expose only Windows Runtime types. However ...
Read more >Windows Runtime components with C# and Visual Basic
Externally, the members of your types can expose only Windows Runtime types for their parameters and return values.
Read more >Diagnosing Windows Runtime Component error conditions
Exporting types that aren't valid Universal Windows Platform types. The public interface of your component must expose only UWP types. However, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Closed due to #46
Hello Jan,
Thanks, that did help me with pinpointing what’s going on.
I think (don’t know for sure since I haven’t read up on the uwp compiler model) that all types exported in windows uwp “apps” have to be sealed.
Why the sample app works is because it has got the controllers in a separate library, and this library is referenced by the sample app. Once the sample app is compiled all the library’s types are made sealed (if you’re not overriding them).
What this means:
I want to apologise for suggesting that your setup was wrong, and thank you for following this through!
Cheers,
Jark