Skip to content

Commit

Permalink
docs: Add hints to readme for x86 based builds (#251)
Browse files Browse the repository at this point in the history
* chore: Removed file path in warning

* doc: Add hint for x86 based builds

---------

Co-authored-by: Carsten Igel <cigel@dspace.de>
  • Loading branch information
carstencodes and Carsten Igel committed Apr 30, 2024
1 parent ab38e85 commit 9307813
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The `dSPACE.Runtime.InteropServices.BuildTasks` library provides build tasks whi
- [Enforcing to stop the build, if an error occurs](#enforcing-to-stop-the-build-if-an-error-occurs)
- [Parameters](#parameters)
- [Example](#example)
- [Hints](#hints)
- [32Bit support](#32bit-support)
- [Migration notes (mscorelib vs System.Private.CoreLib)](#migration-notes-mscorelib-vs-systemprivatecorelib)
- [Why can I load a .NET Framework library into a .NET application?](#why-can-i-load-a-net-framework-library-into-a-net-application)
Expand Down Expand Up @@ -307,6 +308,12 @@ The build task consumes the following [items](https://learn.microsoft.com/en-us/
</Project>
```

### Hints

When using the build tasks to create an 32 bit version for your type libraries / projects: The tasks require the .NET runtime in their specific CPU architecture to be installed.

So, for building 32 bit TLBs, dscom32 will be executed, which **requires** .NET runtime in x86 flavor to be available.

## 32Bit support

`dscom` installed by `dotnet tool install` can only handle AnyCPU or 64Bit assemblies and can only generate a 64bit TLB.
Expand Down
24 changes: 12 additions & 12 deletions examples/32bit/scripts/msbuild-acceptance-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,62 +98,62 @@ SET EXITCODE=0

IF NOT "%ERRUNTIMEX64_NET48%" == "0" (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\comtestdotnet.csproj::Runtime specific acceptance test for platform x64 using .NET FullFramework 4.8 failed."
ECHO "::warning::Runtime specific acceptance test for platform x64 using .NET FullFramework 4.8 failed."
)

IF NOT "%ERRUNTIMEX64_NET60%" == "0" (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\comtestdotnet.csproj::Runtime specific acceptance test for platform x64 using .NET 6.0 failed."
ECHO "::warning::Runtime specific acceptance test for platform x64 using .NET 6.0 failed."
)

IF NOT "%ERRUNTIMEX64_NET80%" == "0" (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\comtestdotnet.csproj::Runtime specific acceptance test for platform x64 using .NET 8.0 failed."
ECHO "::warning::Runtime specific acceptance test for platform x64 using .NET 8.0 failed."
)

IF NOT "%ERRUNTIMEX86_NET48%" == "0" (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\comtestdotnet.csproj::Runtime specific acceptance test for platform x86 using .NET FullFramework 4.8 failed."
ECHO "::warning::Runtime specific acceptance test for platform x86 using .NET FullFramework 4.8 failed."
)

IF NOT "%ERRUNTIMEX86_NET80%" == "0" (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\comtestdotnet.csproj::Runtime specific acceptance test for platform x86 using .NET 8.0 failed."
ECHO "::warning::Runtime specific acceptance test for platform x86 using .NET 8.0 failed."
)

IF NOT "%ERRUNTIMEX86_NET60%" == "0" (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x64\Release\net6.0\comtestdotnet.tlb::Runtime specific acceptance test for platform x64 using .NET 6.0 failed."
ECHO "::warning::Runtime specific acceptance test for platform x64 using .NET 6.0 failed."
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x64\Release\net6.0\comtestdotnet.tlb (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x64\Release\net6.0\comtestdotnet.tlb::Could not find exported TLB file for .NET 6 (x64)"
ECHO "::warning::Could not find exported TLB file for .NET 6 (x64)"
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x86\Release\net6.0\comtestdotnet.tlb (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x86\Release\net6.0\comtestdotnet.tlb::Could not find exported TLB file for .NET 6 (x86)"
ECHO "::warning::Could not find exported TLB file for .NET 6 (x86)"
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x64\Release\net48\comtestdotnet.tlb (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x64\Release\net48\comtestdotnet.tlb::Could not find exported TLB file for .NET 4.8 (x64)"
ECHO "::warning::Could not find exported TLB file for .NET 4.8 (x64)"
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x86\Release\net48\comtestdotnet.tlb (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x86\Release\net48\comtestdotnet.tlb::Could not find exported TLB file for .NET 4.8 (x86)"
ECHO "::warning::Could not find exported TLB file for .NET 4.8 (x86)"
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x64\Release\net8.0\comtestdotnet.tlb (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x64\Release\net8.0\comtestdotnet.tlb::Could not find exported TLB file for .NET 8 (x64)"
ECHO "::warning::Could not find exported TLB file for .NET 8 (x64)"
)

IF NOT EXIST %~dp0\..\comtestdotnet\bin\x86\Release\net8.0\comtestdotnet.tlb (
::SET EXITCODE=1
ECHO "::warning file=%~dp0\..\comtestdotnet\bin\x86\Release\net8.0\comtestdotnet.tlb::Could not find exported TLB file for .NET 8 (x86)"
ECHO "::warning::Could not find exported TLB file for .NET 8 (x86)"
)

IF "%EXITCODE%" == "0" (
Expand Down
4 changes: 2 additions & 2 deletions examples/outproc/scripts/msbuild-acceptance-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ SET EXITCODE=0

IF NOT "%ERRUNTIME%" == "0" (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\server\common\contract.csproj::Runtime specific acceptance test failed."
ECHO "::warning::Runtime specific acceptance test failed."
)

IF NOT "%ERSTANDARD%" == "0" (
SET EXITCODE=1
ECHO "::warning file=%~dp0\..\server\common\contract.csproj::.NET Standard 2.0 specific acceptance test failed."
ECHO "::warning::.NET Standard 2.0 specific acceptance test failed."
)

IF "%EXITCODE%" == "0" (
Expand Down

0 comments on commit 9307813

Please sign in to comment.