是否无法在Metro应用程序中使用VisualStudio 2010项目dll? [英] Is it not possible to use VisualStudio 2010 project dll's in a Metro application?
问题描述
嗨!
我有一个使用C ++城域组件的metro javascript metro应用程序。 C ++组件使用的是使用我已导入Visual Studio 2012解决方案的Visual Studio 2010项目构建的dll。但是从我所经历的
,这是因为不可能在metro应用程序中使用dll。这是真的?是否不可能在地铁项目中使用非城市项目dll?
I have a metro javascript metro application which are using C++ metro components. The C++ components are using dll's that are built by using Visual Studio 2010 projects which I have imported into my Visual Studio 2012 solution. But from what I have experienced from this is that it is not possible to use the dll's in the metro application. Is this true? Is it not possible to use non-metro-projects dll's in a metro project?
我尝试过:
1。只需编译并启动应用程序。编译进行得很顺利,但是在启动应用程序时,找不到模块(这是所需的dll)。如果我将dll复制到应用程序文件夹,一切正常。
1. Simply compile and launch the application. The compilation went well, but when starting the application the module (which is the needed dll) is not found. If I copy the dll to the application folder everything works.
2。将dll项目作为对需要dll的metro组件项目的引用。 Visual Studio显示对话框说
"添加对'Logger'的引用不是推荐,因为它与Metro风格的应用程序不兼容"。
2. Ad the dll project as a reference to the metro component project that needs the dll. Visual studio displayed a dialogue saying "Adding reference to ’Logger’ is not recommended because it is not compatible with Metro style apps".
因此,根据我从方法2收到的警告,我认为不建议按照方法1进行操作(复制应用程序文件夹中的dll)。所以我需要将我所有的2010项目转换为Metro组件才能使用它们,或者我错过了
的东西?
So from the warning I received from approach 2, I assume that doing as in approach 1 is not recommended (copying the dll to the application folder). So I need to convert all my 2010 projects into metro components in order to be able to use them or am I missing something?
推荐答案
1。您需要将该dll设置为包内容
2.您的dll _must_使用WinRT API,否则您的应用程序认证将失败
1. you need to set that dll as a package content
2. your dll _must_ use WinRT API, otherwise your application certification will fail
这篇关于是否无法在Metro应用程序中使用VisualStudio 2010项目dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!