How to distribute processor-specific WindowsStore

2019-02-25 21:05发布

I've got an assembly which links to native Sqlite for Windows Store apps.

Because Sqlite is native, then this assembly cannot use the AnyCPU profile - instead it has to supply separate AnyCPU/x86/x64 assemblies.

I'd like to distribute this set of assemblies via nuget - so that when the package is imported then the nuget installer installs separate assemblies into each platform configuration within the csproj file.

Has anyone done this before or have an example of it being done? Does anyone have any suggestions for how it can be done?

Update With Nuget2.5 I have been told this is possible - see https://nuget.codeplex.com/discussions/396720 - but I can't work out how... does anyone have any samples of this working?

Thanks

Stuart

1条回答
爷的心禁止访问
2楼-- · 2019-02-25 21:48

It cannot be done with NuGet, as it does not support architecture specific deployments.

From Tim Heuer's blog page SQLite with Windows 8 Apps:

Why no NuGet? Well, the NuGet infrastructure right now doesn’t support some of these semantics around native components to deal with headers, linking and architecture-specific deployments. We’ll continue to work with them to see if we can drive these changes into that platform.

See also the work item in the Issue Tracker for Nuget: Add 1st class support for assembly platform

One way to do it is probably the same way as SQLite, via an extension package. I have personally not done that though, although googling does seem to bring up examples on how to create extensions.

查看更多
登录 后发表回答