Hello,
we are consuming the Ixxat nuget package from nuget.org:
https://www.nuget.org/packages/Ixxat.Vci4
When we run our build pipeline with
dotnet build
the files vcinet.x86.dll and Ijwhost.dll are copied to the correct location in the build output folder ($OutDir).
When we run our build pipeline with
dotnet publish
we notice, that the files are missing in the publish folder ($PublishDir). That is because in the targets file Ixxat.Vci4.targets, only the build target is declared:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="CopyNativeLibs_x86" AfterTargets="Build"> <ItemGroup> <NativeLibs_x86 Include="$(MSBuildThisFileDirectory)\x86\vcinet.x86.dll" /> <DotNetHostLib_x86 Include="$(MSBuildThisFileDirectory)\x86\Ijwhost.dll" /> </ItemGroup> <Copy SourceFiles="@(NativeLibs_x86)" DestinationFolder="$(OutDir)\vcinet\x86" /> <Copy SourceFiles="@(DotNetHostLib_x86)" DestinationFolder="$(OutDir)\vcinet\x86" /> </Target> <Target Name="CopyNativeLibs_x64" AfterTargets="Build"> <ItemGroup> <NativeLibs_x64 Include="$(MSBuildThisFileDirectory)\x64\vcinet.x64.dll" /> <DotNetHostLib_x64 Include="$(MSBuildThisFileDirectory)\x64\Ijwhost.dll" /> </ItemGroup> <Copy SourceFiles="@(NativeLibs_x64)" DestinationFolder="$(OutDir)\vcinet\x64" /> <Copy SourceFiles="@(DotNetHostLib_x64)" DestinationFolder="$(OutDir)\vcinet\x64" /> </Target> </Project>
It is possible though to add handling for the target publish. Notice that the whole target has to be declared new for the publish target, since, the output folder must be $PublishDir instead of $OutDir. For instance:
`
<NativeLibs_x86 Include="$(MSBuildThisFileDirectory)\x86\vcinet.x86.dll" />
<DotNetHostLib_x86 Include="$(MSBuildThisFileDirectory)\x86\Ijwhost.dll" />
<NativeLibs_x64 Include="$(MSBuildThisFileDirectory)\x64\vcinet.x64.dll" />
<DotNetHostLib_x64 Include="$(MSBuildThisFileDirectory)\x64\Ijwhost.dll" />
`
Do you think, you can incorporate this into the Ixxat nuget package? It would simplify the use of dotnet publish.
This concerns the packages:
https://www.nuget.org/packages/Ixxat.Vci4
https://www.nuget.org/packages/Ixxat.Vci4.StrongName
Best Regards,
Aleksandar
Hello,
we are consuming the Ixxat nuget package from nuget.org:
https://www.nuget.org/packages/Ixxat.Vci4
When we run our build pipeline with
dotnet build
the files vcinet.x86.dll and Ijwhost.dll are copied to the correct location in the build output folder ($OutDir).
When we run our build pipeline with
dotnet publish
we notice, that the files are missing in the publish folder ($PublishDir). That is because in the targets file Ixxat.Vci4.targets, only the
buildtarget is declared:<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="CopyNativeLibs_x86" AfterTargets="Build"> <ItemGroup> <NativeLibs_x86 Include="$(MSBuildThisFileDirectory)\x86\vcinet.x86.dll" /> <DotNetHostLib_x86 Include="$(MSBuildThisFileDirectory)\x86\Ijwhost.dll" /> </ItemGroup> <Copy SourceFiles="@(NativeLibs_x86)" DestinationFolder="$(OutDir)\vcinet\x86" /> <Copy SourceFiles="@(DotNetHostLib_x86)" DestinationFolder="$(OutDir)\vcinet\x86" /> </Target> <Target Name="CopyNativeLibs_x64" AfterTargets="Build"> <ItemGroup> <NativeLibs_x64 Include="$(MSBuildThisFileDirectory)\x64\vcinet.x64.dll" /> <DotNetHostLib_x64 Include="$(MSBuildThisFileDirectory)\x64\Ijwhost.dll" /> </ItemGroup> <Copy SourceFiles="@(NativeLibs_x64)" DestinationFolder="$(OutDir)\vcinet\x64" /> <Copy SourceFiles="@(DotNetHostLib_x64)" DestinationFolder="$(OutDir)\vcinet\x64" /> </Target> </Project>It is possible though to add handling for the target publish. Notice that the whole target has to be declared new for the publish target, since, the output folder must be
$PublishDirinstead of$OutDir. For instance:`
`<NativeLibs_x86 Include="$(MSBuildThisFileDirectory)\x86\vcinet.x86.dll" />
<DotNetHostLib_x86 Include="$(MSBuildThisFileDirectory)\x86\Ijwhost.dll" />
<NativeLibs_x64 Include="$(MSBuildThisFileDirectory)\x64\vcinet.x64.dll" />
<DotNetHostLib_x64 Include="$(MSBuildThisFileDirectory)\x64\Ijwhost.dll" />
Do you think, you can incorporate this into the Ixxat nuget package? It would simplify the use of dotnet publish.
This concerns the packages:
https://www.nuget.org/packages/Ixxat.Vci4
https://www.nuget.org/packages/Ixxat.Vci4.StrongName
Best Regards,
Aleksandar