第一步 新建类库,不选.netframework,框架用standard2.0
<PropertyGroup>
<TargetFramework>NET48</TargetFramework>
<LangVersion>preview</LangVersion>
<AssemblyVersion>0.1.0.*</AssemblyVersion>
<FileVersion>0.1.0</FileVersion>
<ImplicitiUsings>enable</ImplicitiUsings>
<Nullable>enable</Nullable>
<Deterministic>false</Deterministic>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<TargetFramework>NET48</TargetFramework>
<LangVersion>preview</LangVersion>
<AssemblyVersion>0.1.0.*</AssemblyVersion>
<FileVersion>0.1.0</FileVersion>
<ImplicitiUsings>enable</ImplicitiUsings>
<Nullable>enable</Nullable>
<Deterministic>false</Deterministic>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
nuget搜索ifox.cad.acad
命令行参数:
/nologo
新建一个globalusing类库
添加以下代码:
global using System;
global using IfoxDemo;
global using System.Collections.Generic;
global using System.Linq;
global using System.Text;
global using System.Threading.Tasks;
global using Autodesk.AutoCAD.ApplicationServices;
global using Autodesk.AutoCAD.EditorInput;
global using Autodesk.AutoCAD.Runtime;
global using Autodesk.AutoCAD.Geometry;
global using Autodesk.AutoCAD.DatabaseServices;
global using IFoxCAD.Cad;
内联提示设置: