Could not load Windows.winmd

家住魔仙堡 提交于 2019-12-04 19:02:33

It seems that the setting

<GenerateManifests>true</GenerateManifests>

in the project file (e.g. .csproj) is not compatible with winmd references.

This setting is added when enabling the ClickOnce security settings (Project Properties => Security => Enabling ClickOnce security settings checkbox).

So far I could not find a way to fix the concrete problem, but I found a workaround, which works for my case: I just created a separate Class Library project in my solution, which the main project references. In the class library project file I added the line

<TargetPlatformVersion>8.0</TargetPlatformVersion>

as described in the referenced article.

The library project compiles and also the main project can use the dll without problems.

eeadev

I solved a very similar problem following this stackoverflow solution which basically makes u publish excluding the winmd.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!