在dnx5.0 / aspnext的Open XML [英] Open XML in dnx5.0 / aspnext

查看:165
本文介绍了在dnx5.0 / aspnext的Open XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图构建一个使用的OpenXML在DNX / ASPNET下一个环境的应用程序。

I'm trying to build an app that uses OpenXML in a dnx/aspnet next environment.

我添加了添加了OpenXML的依赖,以我的package.json

I've added added the OpenXML dependency to my package.json

  "dependencies": {
    ....
    "DocumentFormat.OpenXml": "2.5.0"
  }

然而,当我尝试运行,我得到这个错误:

However, when i try to run, i get this error:

The type 'Package' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=4.0.0.0

这似乎处理OpenXML取决于WindowsBase。我很担心,这会不会在Linux / MAC的环境中工作,因为我无法找到这个名字的NuGet包或依赖关系。

It seems OpenXML depends on WindowsBase. I'm fearful that this won't work in linux/mac environment, as I can't find a nuget package or a dependency by this name.

有没有办法这个WindowsBase .dll文件添加到UNIX DNX项目?有另一种方式通过DNX利用UNIX中的OpenXML或其他字处理文档库?

Is there a way to add this WindowsBase .dll to a unix dnx project? Is there another way to utilize OpenXML or another word document library in unix via dnx?

感谢

推荐答案

看来的单有WindowsBase.dll中

尝试添加就像这个例子的框架参考吧:<一href=\"https://github.com/aspnet/dnx/blob/7ac7929aa575e17b3c271e4a7a0c164418de0395/misc/XreTestApps/FrameworkReferences/project.json#L2\" rel=\"nofollow\">https://github.com/aspnet/dnx/blob/7ac7929aa575e17b3c271e4a7a0c164418de0395/misc/XreTestApps/FrameworkReferences/project.json#L2但使用 WindowBase 而不是 System.IO

Try adding a framework reference to it like in this example: https://github.com/aspnet/dnx/blob/7ac7929aa575e17b3c271e4a7a0c164418de0395/misc/XreTestApps/FrameworkReferences/project.json#L2 but use WindowBase instead of System.IO

这篇关于在dnx5.0 / aspnext的Open XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆