Giter VIP home page Giter VIP logo

hms-networks / ixxat-vci4-dotnet-wrapper Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 7.94 MB

This project contains the source of the VCI4 .NET Wrapper (VCI4 = Virtual Communication Interface Version 4), a component that provides access to the VCI4 C++-API. VCI4 is a driver/application framework to access HMS CAN or LIN interfaces on the Windows OS.

License: MIT License

PowerShell 0.73% Batchfile 0.09% C# 56.39% C++ 42.65% C 0.14%

ixxat-vci4-dotnet-wrapper's People

Contributors

hms-klob avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ixxat-vci4-dotnet-wrapper's Issues

Targets file contains actions for build target, but not for publish

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:

<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>

  <Target Name="CopyNativeLibs_x86" AfterTargets="Publish">
    <ItemGroup>
      <NativeLibs_x86    Include="$(MSBuildThisFileDirectory)\x86\vcinet.x86.dll" />
      <DotNetHostLib_x86 Include="$(MSBuildThisFileDirectory)\x86\Ijwhost.dll" />
    </ItemGroup>
    <Copy SourceFiles="@(NativeLibs_x86)"    DestinationFolder="$(PublishDir)\vcinet\x86" />
    <Copy SourceFiles="@(DotNetHostLib_x86)" DestinationFolder="$(PublishDir)\vcinet\x86" />
  </Target>
  <Target Name="CopyNativeLibs_x64" AfterTargets="Publish">
    <ItemGroup>
      <NativeLibs_x64    Include="$(MSBuildThisFileDirectory)\x64\vcinet.x64.dll" />
      <DotNetHostLib_x64 Include="$(MSBuildThisFileDirectory)\x64\Ijwhost.dll" />
    </ItemGroup>
    <Copy SourceFiles="@(NativeLibs_x64)"    DestinationFolder="$(PublishDir)\vcinet\x64" />
    <Copy SourceFiles="@(DotNetHostLib_x64)" DestinationFolder="$(PublishDir)\vcinet\x64" />
  </Target>
</Project>

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.