Some updates to the COM lib to attempt to get it to work on .net 8. Unfinished, porting all Access functions over to vs instead

This commit is contained in:
2025-05-01 18:39:08 +01:00
parent 7465940d48
commit 8e7cd00b74
9 changed files with 147 additions and 59 deletions

View File

@@ -4,8 +4,17 @@
<OutputType>Library</OutputType>
<AssemblyName>bnhtradeCOM</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!--Added the line below to copy all dll from .nuget folder to build output folder-->
<!--CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies-->
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<!--https://learn.microsoft.com/en-us/dotnet/core/native-interop/expose-components-to-com#register-the-com-host-for-com-->
<EnableComHosting>true</EnableComHosting>
</PropertyGroup>
<ItemGroup>
<ComHostTypeLibrary Include="bnhtradeCOM.tlb" />
</ItemGroup>
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -24,15 +33,11 @@
<ProjectReference Include="..\bnhtrade.Core\bnhtrade.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.31" />
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<PropertyGroup />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)_RegAsmInstall.bat" "$(TargetDir)"
copy "$(ProjectDir)_RegAsmRefresh.bat" "$(TargetDir)"
copy "$(ProjectDir)_RegAsmUninstall.bat" "$(TargetDir)"</PostBuildEvent>
<AssemblyTitle>bnhtrade COM Type Library</AssemblyTitle>
<Company>bnhtrade</Company>
<Product>bnhtradeCOMAsm</Product>
@@ -40,4 +45,7 @@ copy "$(ProjectDir)_RegAsmUninstall.bat" "$(TargetDir)"</PostBuildEvent>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy &quot;$(ProjectDir)_RegAsmInstall.bat&quot; &quot;$(TargetDir)&quot;&#xD;&#xA;copy &quot;$(ProjectDir)_RegAsmRefresh.bat&quot; &quot;$(TargetDir)&quot;&#xD;&#xA;copy &quot;$(ProjectDir)_RegAsmUninstall.bat&quot; &quot;$(TargetDir)&quot;" />
</Target>
</Project>