Skip to content

How to author an out-of-process WinRT exe server with CsWinRT? #1064

Answered by hez2010
hez2010 asked this question in Q&A
Discussion options

You must be logged in to vote

I made a sample for this: https://github.com/hez2010/WinRTServer

Note here we need two workarounds:

  1. The winmd needs to be removed from _AppxWinmdFilesToHarvest, see the target RemoveOutOfProcWinMD in the wapproj. Otherwise an incorrect inProcessServer entry will be added to the manifest despite there's no inProcessServer at all, which will make the build fail.
  2. The server project also needs to include the winmd in the ItemGroup, otherwise the server implementation (WinRTServer.dll) will be removed from the package layout if you publish it to appx package, which can lead to failure while starting the server.

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@hez2010
Comment options

@hez2010
Comment options

@angelazhangmsft
Comment options

@hez
Comment options

Comment options

You must be logged in to vote
4 replies
@hez2010
Comment options

Answer selected by hez2010
@wherewhere
Comment options

@hez2010
Comment options

@wherewhere
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants