The following specific projects are available, used to create corresponding NuGet packages for NuGet.org. Read their associated readme file for specific details.
| Library | Framework | NuGet Package and Specific Readme Information |
|---|---|---|
| .NET Standard 2.0 | ||
| .NET Standard 2.0 | ||
| .NET Framework 4.7.2 | ||
| .NET Standard 2.0 | ||
| .NET Standard 2.0 | ||
| .NET Standard 2.0 | ||
| .NET Standard 2.0 | ||
| .NET Framework 4.7.2 | ||
| .NET Standard 2.0 | ||
| .NET Framework 4.7.2 | ||
| .NET 5 | Daikin.DotNetLib.Core.Tests are .NET Core xUnit Tests, serves as coding samples |
This presumes a strong understanding of the following tools and technologies, and that they are installed.
- Visual Studio 2019 (Community, Professional, or Enterprise)
- C# development
- Web API (for specific projects)
- Graph API (for specific projects)
- Code Signing Certificate must be installed to digitally sign NuGet packages, PowerShell scripts, and DLLs.
- NuGet packages (nupkg) must be digitally signed before deploying to NuGet.org. See the PowerShell script .\PublishNuGet.ps1. This script can be run within the Package Manager Console in Visual Studio.
- Signtool.exe (see below)
Signtool.exe is installed as part of Visual Studio 2019 and 2017 via C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool. This tool is available via the Windows 10 SDK.
All of the projects use the following Post Build Event (e.g., Project Properties > Build Events > Post-built event command line):
codesign.bat "$(TargetPath)"
Create a batch file called codesign.bat.
In the codesign.bat file, include something like:
@ECHO OFF
REM Change the Subject to your own Code-Signing Certificate that is installed in your Local Machine Store
SET subject=Daikin Applied Americas Inc.
SET filespec=%~1
IF /I "%filespec:~-5%"=="nupkg" GOTO NuGetSign
:SignTool
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /sm /n "%subject%" /t "http://timestamp.verisign.com/scripts/timstamp.dll" "%filespec%"
GOTO Done
:NuGetSign
REM Get NuGet CommandLine from https://www.nuget.org/downloads
nuget sign "%filespec%" -CertificateStoreLocation "LocalMachine" -CertificateSubjectName "%subject" -TimeStamper "http://timestamp.comodoca.com?td=sha256"
GOTO Done
:Done
ECHO.
This solution handles executables (exe files), dynamic link libraries (dll files), PowerShell (ps1 files), and NuGet Packages (nupkg files), making it very versitile by calling codesign <yourfile>. As long as every developer has codesign.bat setup, they can all compile this project using a desired code signing certificate.
Add codesign.bat to your Windows System PATH:
- Open Control Panel (Start > type control panel)
- Open the System control panel item
- Select Advanced system settings on the left pane
- Click on Environmental Variables button in the Advanced tab (open by default)
- In the System variable section, locate the PATH environment variable. Add to the front the full path to codesign.bat.
After updating the PATH, it is recommended you restart your computer or restart all PowerShell, Command Prompt, and applications so they are able to access the updated path.
While primarily (at this point) done by the Daikin Applied Web Development Team, all .NET developers are welcome to strengthen these libraries.
Original development contribution by Hans Dickel as a way to give back to the development community and share his geekiness and passion for the Microsoft development stack.
This project is licensed under the MIT License.
~ End ~