Skip to content

Commit

Permalink
updated build instructions to reflect change to targeting .Net 6
Browse files Browse the repository at this point in the history
  • Loading branch information
RobHolme committed Mar 12, 2023
1 parent 186c578 commit b21c501
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ Follow these instructions if you plan on installing the module from a prebuilt r
3. Open a powershell console, the module will be imported when the console opens and the CmdLets available to use. Alternatively, if you don't wish to load the module with all new powershell sessions, run `import-module .\hl7tools\hl7tools.psd1` to use the module for the current session only.

## Build from source
The solution will build versions for .Net Standard 2.0 (Microsoft Powershell 6+) and .Net Framework 4.52 (Windows Powershell 5.1). The powershell module will load the relevant dll based on the Powershell environment it is run from. If you only wish to target .Net standard or .Net Framework alone, the .csproj file will need to be edited accordingly to specify a single TargetFramework.
1. Install the .Net Core 3.1 SDK and the .Net Framework 4.52 SDK. The build files expect v3.1.412 of the .Net Core SDK (and 4.52 for .Net Framework). If using a different version of the SDK, update the version reference in `\dotnetcore\global.json` accordingly. Install instructions for the SDK for each platform are available from:
The solution will build versions for .Net 6.0 (Microsoft Powershell 6+) and .Net Framework 4.52 (Windows Powershell 5.1). The powershell module will load the relevant dll based on the Powershell environment it is run from. If you only wish to target .Net standard or .Net Framework alone, the .csproj file will need to be edited accordingly to specify a single TargetFramework.
1. Install the .Net 6 SDK and the .Net Framework 4.5.2 SDK. Install instructions for the SDK for each platform are available from:
* Linux: https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x
* Windows: https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore2x
* MacOS: https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x
1. Open a command console, navigate to the root folder of this solution (containing hl7tools.csproj). Run the following commands to build the release and publish to the /module/lib folder:

`dotnet publish --configuration release --framework netstandard2.0 --output .\module\hl7tools\lib\netstandard2.0\`
`dotnet publish --configuration release --framework net6.0 --output .\module\hl7tools\lib\net6.0\`

`dotnet publish --configuration release --framework net48 --output .\module\hl7tools\lib\net48\`

(or run the .\publish.cmd batch file)

2. The build process will copy each version of hl7tools.dll to subfolders of `module\hl7tools\lib\`. The contents of the `\module\hl7tools` folder will contain the Powershell Module.
3. Move the `\module\hl7tools` folder to your Powershell Module Path (query the path from the environment variable by running `$env:PSModulePath` from a powershell console). Restart powershell. Alternatively, if you don't wish to load the module with all new powershell sessions, run `import-module .\hl7tools\hl7tools.psd1` to use the module for the current session only.
3. Move the `\hl7tools` folder to your Powershell Module Path (query the path from the environment variable by running `$env:PSModulePath` from a powershell console). Restart powershell. Alternatively, if you don't wish to load the module with all new powershell sessions, run `import-module .\hl7tools\hl7tools.psd1` to use the module for the current session only.

# CmdLet Usage
## Select-HL7Item
Expand Down

0 comments on commit b21c501

Please sign in to comment.