Linq2Acad icon indicating copy to clipboard operation
Linq2Acad copied to clipboard

Exclude Autocad .NET package from the target

Open sanzoghenzo opened this issue 4 months ago • 4 comments

Hi there! After a year, here I come back at you with another issue 😉

Expected Behavior

Building my project that uses Linq2Acad should not copy over the autocad libraries

Current Behavior

Compiling my code puts the Autocad libraries into my target directory:

  • AcCoreMgd.dll
  • ACbMgd.dll
  • acdbmgdrep.dll

Context

This applies to all the versions, but here's mine:

  • Linq2Acad Version: 2022 1.0.0
  • AutoCAD Version: Autocad 2022

I had the same problem for on of my project that uses the Autocad.NET package directly, and I had to add the following to the PackagereRerence:

<ExcludeAssets>runtime</ExcludeAssets>
<PrivateAssets>all</PrivateAssets>

The key is the ExcludeAssets, the PrivateAsset shouldn't matter.

Steps to Reproduce

  1. create a new Visual Studio c# library project
  2. add Linq2Acad from nuget
  3. build the solution
  4. the autocad dlls are in the output folder

Checklist

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [x] I have provided sufficient information for the team

sanzoghenzo avatar Feb 15 '24 09:02 sanzoghenzo