【发布时间】:2021-01-03 12:22:33
【问题描述】:
我有一个 Visual Studio C++ 项目,它在调试和发布模式下为 x86 和 x64 架构创建 DLL。关于这些规范,我应该将此包发布为 nuget 包。所以我的包中应该有 4 个 DLL。我的问题是如何在我的 nuspec 文件中指定 x86、x64。我在考虑是否应该在每个 file 的 target 字段中指定它,但我找不到任何关于如何准确指定这些规范的文档。 我的 nuspec 文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- Required elements-->
<id>counterpartylookup</id>
<version>0.0.0</version>
<description>counterpartylookup/v140/win32/x86/x64</description>
<authors>***</authors>
<!-- Optional elements -->
<!-- ... -->
<owners>...</owners>
<licenseUrl>***</licenseUrl>
<projectUrl>***</projectUrl>
<dependencies>
***
</dependencies>
<tags> {vc140, win32, x64, x86, dynamic, C++, native}</tags>
</metadata>
<files>
<file src="..\shared\v140\bin\x64\Release\CounterPartyLookup.dll" target="lib" />
<file src="..\shared\v140\bin\x64\Debug\CounterPartyLookup.dll" target="lib" />
<file src="..\shared\v140\bin\x86\Release\CounterPartyLookup.dll" target="lib" />
<file src="..\shared\v140\bin\x86\Debug\CounterPartyLookup.dll" target="lib" />
</files>
<!-- Optional 'files' node -->
</package>
【问题讨论】:
-
net项目上是否要根据具体平台引用这个c++ nuget包?
标签: c++ dll visual-studio-2015 nuget nuspec