使用包引用创建NuGet包

时间:2022-12-27 17:40:05

I am creating a package that itself has package references:

我正在创建一个本身具有包引用的包:

使用包引用创建NuGet包

Also here Bootstrap4NHibernate

另外这里是Bootstrap4NHibernate

As you can see I have added the package references to the package OK. However, when I add this package to a project it doesn't add references to the downstream package dlls (FluentNHib, MPM.PDAG etc). I'm guessing I need to configure the package specifically to do this but I'm not sure how?

如您所见,我已将包引用添加到包中。但是,当我将此包添加到项目时,它不会添加对下游包dll(FluentNHib,MPM.PDAG等)的引用。我猜我需要专门为此配置包,但我不确定如何?

1 个解决方案

#1


0  

I got this working by adding the references without putting them in a group. The NuGet Package Explorer doesn't allow you to do this so I exported the package to a nuspec file, took the packages out of the group tag, reloaded the nuspec file and now I'm sorted.

我通过添加引用而不将它们放在一个组中来实现这一点。 NuGet包资源管理器不允许你这样做,所以我将包导出到一个nuspec文件,从包标签中取出包,重新加载nuspec文件,现在我已经排序了。

This clearly has something to do with groups/framework versions, so perhaps my fix isn't the best fix but it works in my use case.

这显然与组/框架版本有关,所以也许我的修复不是最好的修复,但它适用于我的用例。

#1


0  

I got this working by adding the references without putting them in a group. The NuGet Package Explorer doesn't allow you to do this so I exported the package to a nuspec file, took the packages out of the group tag, reloaded the nuspec file and now I'm sorted.

我通过添加引用而不将它们放在一个组中来实现这一点。 NuGet包资源管理器不允许你这样做,所以我将包导出到一个nuspec文件,从包标签中取出包,重新加载nuspec文件,现在我已经排序了。

This clearly has something to do with groups/framework versions, so perhaps my fix isn't the best fix but it works in my use case.

这显然与组/框架版本有关,所以也许我的修复不是最好的修复,但它适用于我的用例。