-
I'm packaging a project which references several local assemblies directly from disk so that I can distribute it with Squirrel.Windows. Eg: <ItemGroup>
<Reference Include="Xceed.Wpf.Controls.v6.5">
<HintPath>..\..\..\..\..\Program Files\Xceed\Xceed DataGrid for WPF v6.5\Bin\Xceed.Wpf.Controls.v6.5.dll</HintPath>
<Private>true</Private>
</Reference>
</ItemGroup> Unfortunately, this assembly is not included in the generated So far, the only workaround I've found is to explicitly add <ItemGroup>
<PackageFile Include="C:\Program Files\Xceed\Xceed DataGrid for WPF v6.5\Bin\Xceed.Wpf.Controls.v6.5.dll" PackagePath="\lib\net472\Xceed.Wpf.Controls.v6.5.dll" />
<PackageFile Include="C:\Program Files\Xceed\Xceed DataGrid for WPF v6.5\Bin\Xceed.Wpf.Controls.v6.5.XmlSerializers.dll" PackagePath="\lib\net472\Xceed.Wpf.Controls.v6.5.XmlSerializers.dll" />
</ItemGroup> I have to specify the full path to the assembly, since the build process won't find it otherwise. Which then means I need to include the assembly filename in the Short of generating a NuGet package for each of these references and publishing it to our private Azure DevOps NuGet feed, is there an easier way to ensure these referenced assemblies are included in the package? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Since you're already specifying the full file path in the Reference, as well as its filename, I'm not sure I understand why that would be a problem for packaging. To avoid repetition, you could just transform the Reference item into a PackageFile, like <PackageFile Include="@(ReferencePath -> '%(HintPath)')" PackagePath="lib/.../%(Filename)%(Extension)" /> Or the like. That's plain MSBuild, though, not Nugetizer-specific. HTH |
Beta Was this translation helpful? Give feedback.
Since you're already specifying the full file path in the Reference, as well as its filename, I'm not sure I understand why that would be a problem for packaging. To avoid repetition, you could just transform the Reference item into a PackageFile, like
Or the like. That's plain MSBuild, though, not Nugetizer-specific.
HTH