mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-05-18 19:48:23 +00:00
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:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ClearOutputDirectory>True</ClearOutputDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- ILRepack -->
|
||||
<Target Name="ILRepacker" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
<InputAssemblies Include="$(OutputPath)\*.dll" />
|
||||
<InputAssemblies Include="$(OutputPath)*.dll" />
|
||||
<!--ILRepack started complaining it can't resolve CSVHelper when building the project, hence the line below-->
|
||||
<!--It's a hack, and will need updating when CSVHelper is updated, but I can't figure it out-->
|
||||
<!--InputAssemblies Include="C:\Users\Bobbie\.nuget\packages\csvhelper\33.0.1\lib\net8.0\CsvHelper.dll"/-->
|
||||
</ItemGroup>
|
||||
|
||||
<ILRepack
|
||||
@@ -14,6 +18,8 @@
|
||||
OutputFile="$(TargetPath)"
|
||||
Parallel="true"
|
||||
TargetKind="Dll"
|
||||
LibraryPath="$(OutputPath)" />
|
||||
LibraryPath="$(OutputPath)"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
<!-- /ILRepack -->
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
To setup on new computer:
|
||||
|
||||
1. Add the app.local.config to the users ..\AppData\Local\bnhtrade\ folder (create the bnhtrade folder)
|
||||
|
||||
2. CLone bnhtrade solution from the repo
|
||||
|
||||
3. Build bnhtradeCOM project
|
||||
|
||||
4. Register the COM host for COM. With an elevated prompt, navigate to the build directory and run "regsvr32 bnhtradeCOM.comhost.dll"
|
||||
|
||||
5.
|
||||
@@ -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 "$(ProjectDir)_RegAsmInstall.bat" "$(TargetDir)"
copy "$(ProjectDir)_RegAsmRefresh.bat" "$(TargetDir)"
copy "$(ProjectDir)_RegAsmUninstall.bat" "$(TargetDir)"" />
|
||||
</Target>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user