[英]How can I embed / reference .NET references in a NuGet package?
I have a .net resource library which contains some nuget packages as well as some default .net references: 我有一个.net资源库,其中包含一些nuget包以及一些默认的.net引用:
NLog
(nuget) NLog
(nuget) Microsoft.Expression.Drawing
(.net reference) Microsoft.Expression.Drawing
(.net参考) System.Windows.Interactivity
(.net reference) System.Windows.Interactivity
(.net参考) If I build my nuget package 如果我构建我的nuget包
nuget pack -Prop Configuration=Release -OutputDirectory nuget %SOLUTION%\\%SOLUTION%\\%SOLUTION%.csproj
and install it afterwards in a wpf project, the two .net references where not installed. 然后将其安装在wpf项目中,这两个.net引用未安装。
Is there a solution to automatically install the .net references? 是否有解决方案来自动安装.net引用?
As bradbury mentioned, I haved created a *.nuspec file and added all framework assemblies
into it. 正如bradbury所述,我已经创建了一个* .nuspec文件并将所有framework assemblies
添加到其中。
To automatically add these items to the nuspec without thinking about it, I have extended my personal nugetLib
with a new function. 为了自动将这些项目添加到nuspec中,而无需考虑它,我使用新功能扩展了我的个人nugetLib
。
Now I have just a 1 liner in my ci script: 现在我的ci脚本中只有1个班轮:
# add framework assembly dependencies into the nuspec file
- nugetlib frameworkassemblies -c %SOLUTION%\%SOLUTION%\%SOLUTION%.csproj -n %SOLUTION%\%SOLUTION%\%SOLUTION%.nuspec -p %SOLUTION%\%SOLUTION%\packages.config
Source: https://github.com/dojo90/nugetLib 资料来源: https : //github.com/dojo90/nugetLib
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.