@@ -33,6 +33,12 @@ target .NET frameworks (net8.0, net9.0, and net10.0) to ensure compatibility:
3333root
3434|- tool.nuspec Nuspec file
3535|- README.md README file
36+ |- win-x64
37+ | |- my-tool.exe Windows x64 executable
38+ |- linux-x64
39+ | |- my-tool Linux x64 executable
40+ |- osx-x64
41+ | |- my-tool macOS x64 executable
3642|- tools
3743 |- net8.0
3844 | |- any
4147 | |- DemaConsulting.DotnetToolWrapper.deps.json DotnetToolWrapper dependencies
4248 | |- DemaConsulting.DotnetToolWrapper.dll DotnetToolWrapper application
4349 | |- DemaConsulting.DotnetToolWrapper.runtimeconfig.json DotnetToolWrapper runtime
44- | |- win-x64
45- | | |- my-tool.exe Windows x64 executable
46- | |- linux-x64
47- | | |- my-tool Linux x64 executable
48- | |- osx-x64
49- | |- my-tool macOS x64 executable
5050 |- net9.0
5151 | |- any
5252 | |- DotnetToolSettings.xml Dotnet tool settings
5353 | |- DotnetToolWrapper.json DotnetToolWrapper application settings
5454 | |- DemaConsulting.DotnetToolWrapper.deps.json DotnetToolWrapper dependencies
5555 | |- DemaConsulting.DotnetToolWrapper.dll DotnetToolWrapper application
5656 | |- DemaConsulting.DotnetToolWrapper.runtimeconfig.json DotnetToolWrapper runtime
57- | |- win-x64
58- | | |- my-tool.exe Windows x64 executable
59- | |- linux-x64
60- | | |- my-tool Linux x64 executable
61- | |- osx-x64
62- | |- my-tool macOS x64 executable
6357 |- net10.0
6458 |- any
6559 |- DotnetToolSettings.xml Dotnet tool settings
6660 |- DotnetToolWrapper.json DotnetToolWrapper application settings
6761 |- DemaConsulting.DotnetToolWrapper.deps.json DotnetToolWrapper dependencies
6862 |- DemaConsulting.DotnetToolWrapper.dll DotnetToolWrapper application
6963 |- DemaConsulting.DotnetToolWrapper.runtimeconfig.json DotnetToolWrapper runtime
70- |- win-x64
71- | |- my-tool.exe Windows x64 executable
72- |- linux-x64
73- | |- my-tool Linux x64 executable
74- |- osx-x64
75- |- my-tool macOS x64 executable
7664```
7765
7866** Note** : While the example above shows net8.0, net9.0, and net10.0 folders, you can choose to include only
@@ -117,7 +105,7 @@ Create a `.nuspec` file that defines your package metadata:
117105- Include ` <packageType name="DotnetTool" /> ` to mark this as a .NET tool
118106- Adjust file paths in the ` <files> ` section to match your structure
119107
120- Refer to the [ .nuspec File Reference] ( https://learn.microsoft.com/en-us/nuget/reference/nuspec ) for more details.
108+ Refer to the [ .nuspec File Reference] [ link1 ] for more details.
121109
122110### 2. Create DotnetToolSettings.xml
123111
@@ -145,22 +133,22 @@ Create a `DotnetToolWrapper.json` file in each framework folder that maps platfo
145133``` json
146134{
147135 "win-x64" : {
148- "program" : " win-x64/my-tool.exe"
136+ "program" : " ../../../ win-x64/my-tool.exe"
149137 },
150138 "win-x86" : {
151- "program" : " win-x86/my-tool.exe"
139+ "program" : " ../../../ win-x86/my-tool.exe"
152140 },
153141 "linux-x64" : {
154- "program" : " linux-x64/my-tool"
142+ "program" : " ../../../ linux-x64/my-tool"
155143 },
156144 "linux-arm64" : {
157- "program" : " linux-arm64/my-tool"
145+ "program" : " ../../../ linux-arm64/my-tool"
158146 },
159147 "osx-x64" : {
160- "program" : " osx-x64/my-tool"
148+ "program" : " ../../../ osx-x64/my-tool"
161149 },
162150 "osx-arm64" : {
163- "program" : " osx-arm64/my-tool"
151+ "program" : " ../../../ osx-arm64/my-tool"
164152 }
165153}
166154```
@@ -203,15 +191,15 @@ into your `tools/{framework}/any/` folder:
203191
204192You can obtain these files by:
205193
206- 1 . Downloading from the [ releases page] ( https://github.com/demaconsulting/DotnetToolWrapper/releases )
207- 2 . Building from source (see [ Building from Source] ( #building-from-source ) )
194+ 1 . Downloading from the [ releases page] [ link2 ]
195+ 2 . Building from source (see [ Building from Source] [ link3 ] )
208196
209197### 5. Add Your Native Executables
210198
211- Place your native executables in subdirectories matching the platform identifiers. For example:
199+ Place your native executables at the root of the package in subdirectories matching the platform identifiers. For example:
212200
213201``` text
214- tools/net8.0/any /
202+ root /
215203├── win-x64/
216204│ └── my-tool.exe
217205├── linux-x64/
@@ -298,7 +286,7 @@ If you want to support multiple .NET framework versions:
298286
2992871 . Create separate folders for each framework: ` net8.0 ` , ` net9.0 ` , ` net10.0 `
3002882 . Copy the appropriate DotnetToolWrapper binaries for each framework
301- 3 . Copy your native executables to each framework folder (they can be the same binaries )
289+ 3 . Place your native executables at the root of the package (they are shared across all frameworks )
3022904 . Update your .nuspec to include all framework folders
303291
304292Users with different .NET SDK versions will automatically use the appropriate framework version.
@@ -404,20 +392,30 @@ dotnet build --configuration Release
404392
405393For real-world examples of tools using DotnetToolWrapper:
406394
407- - Browse repositories on GitHub with the [ dotnettoolwrapper topic] ( https://github.com/topics/dotnettoolwrapper )
395+ - Browse repositories on GitHub with the [ dotnettoolwrapper topic] [ link4 ]
408396- Check the examples in the DotnetToolWrapper repository (if available)
409397
410398## Support
411399
412- - ** Issues** : Report bugs or request features via [ GitHub Issues] ( https://github.com/demaconsulting/DotnetToolWrapper/issues )
413- - ** Discussions** : Ask questions via [ GitHub Discussions] ( https://github.com/demaconsulting/DotnetToolWrapper/discussions )
400+ - ** Issues** : Report bugs or request features via [ GitHub Issues] [ link5 ]
401+ - ** Discussions** : Ask questions via [ GitHub Discussions] [ link6 ]
414402- ** Documentation** : See [ README.md] ( ../README.md ) for project overview
415403- ** Architecture** : See [ ARCHITECTURE.md] ( ../ARCHITECTURE.md ) for design details
416404- ** Contributing** : See [ CONTRIBUTING.md] ( ../CONTRIBUTING.md ) for contribution guidelines
417405
418406## Additional Resources
419407
420- - [ .NET Tool Documentation] ( https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools )
421- - [ .nuspec File Reference] ( https://learn.microsoft.com/en-us/nuget/reference/nuspec )
422- - [ NuGet Package Creation] ( https://learn.microsoft.com/en-us/nuget/create-packages/creating-a-package )
423- - [ NuGet CLI Reference] ( https://learn.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference )
408+ - [ .NET Tool Documentation] [ link7 ]
409+ - [ .nuspec File Reference] [ link1 ]
410+ - [ NuGet Package Creation] [ link8 ]
411+ - [ NuGet CLI Reference] [ link9 ]
412+
413+ [ link1 ] : https://learn.microsoft.com/en-us/nuget/reference/nuspec
414+ [ link2 ] : https://github.com/demaconsulting/DotnetToolWrapper/releases
415+ [ link3 ] : #building-from-source
416+ [ link4 ] : https://github.com/topics/dotnettoolwrapper
417+ [ link5 ] : https://github.com/demaconsulting/DotnetToolWrapper/issues
418+ [ link6 ] : https://github.com/demaconsulting/DotnetToolWrapper/discussions
419+ [ link7 ] : https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools
420+ [ link8 ] : https://learn.microsoft.com/en-us/nuget/create-packages/creating-a-package
421+ [ link9 ] : https://learn.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference
0 commit comments