是否可以在针对Windows RT的应用程序中使用protobuf-net库?我尝试通过NuGet将其添加到我的项目中,但收到以下错误:
Successfully installed 'protobuf-net 2.0.0.480'.
Successfully uninstalled 'protobuf-net 2.0.0.480'.
Install failed. Rolling back...
Could not install package 'protobuf-net 2.0.0.480'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.发布于 2012-11-02 10:11:17
你需要一个更新的版本。版本594支持4.5。在包管理器控制台(工具->库包管理器->包管理器控制台)中运行:
PM> Install-Package protobuf-net -Version 2.0.0.594
或从项目网站下载。
发布于 2012-11-02 14:54:25
是的,最近的版本完全支持.NETCore (又名"WinRT“、"Windows Store应用程序”、"Metro“、”现代UI",或者他们今天想叫它的任何东西)。正如Eli所指出的,您可以通过特定的版本获得它,也可以从google-code下载中获得它。
请注意,为了获得最佳性能,建议使用"precompile", the new precompiler,因为.NETCore不支持元编程:如果没有元编程,它将在运行时使用反射,并且不会像它所能达到的那样快。这包含在google-code下载中。
https://stackoverflow.com/questions/13188142
复制相似问题