├── docs
├── apidoc
│ └── .gitkeep
├── articles
│ ├── toc.yml
│ └── intro.md
├── images
│ ├── logo.png
│ └── favicon.ico
├── doc
│ └── index.md
├── toc.yml
├── index.md
└── docfx.json
├── logo.png
├── global.json
├── src
└── dotnex
│ ├── .config
│ └── dotnet-tools.json
│ ├── Properties
│ └── launchSettings.json
│ ├── dotnex.csproj
│ ├── CacheManager.cs
│ ├── CliCommandLineWrapper.cs
│ ├── Program.cs
│ └── ToolHandler.cs
├── .github
├── dependabot.yml
├── workflows
│ ├── dotnet-test.yml
│ ├── docs.yml
│ ├── dotnet-release.yml
│ ├── codeql-analysis.yml
│ └── sonarcloud.yml
└── FUNDING.yml
├── Directory.Build.targets
├── Directory.Build.props
├── SECURITY.md
├── tests
└── dotnex.IntegrationTests
│ ├── CliCommandWrapperTests.cs
│ ├── dotnex.IntegrationTests.csproj
│ ├── ProgramTests.cs
│ ├── CacheManagerTests.cs
│ └── ToolHandlerTests.cs
├── LICENSE
├── dotnex.sln
├── README.md
└── .gitignore
/docs/apidoc/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/articles/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Introduction
2 | href: intro.md
3 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/piraces/dotnex/main/logo.png
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "6.0.101"
4 | }
5 | }
--------------------------------------------------------------------------------
/docs/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/piraces/dotnex/main/docs/images/logo.png
--------------------------------------------------------------------------------
/docs/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/piraces/dotnex/main/docs/images/favicon.ico
--------------------------------------------------------------------------------
/src/dotnex/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {}
5 | }
--------------------------------------------------------------------------------
/docs/doc/index.md:
--------------------------------------------------------------------------------
1 | # Explore the source code documentation
2 |
3 | Click around and find how **dotnex** works!
--------------------------------------------------------------------------------
/docs/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Articles
2 | href: articles/
3 | - name: Documentation
4 | href: doc/
5 | homepage: doc/index.md
6 |
--------------------------------------------------------------------------------
/docs/articles/intro.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This simple tool provides the minimum necessary to run dotnet tools without the need of installing them globally or in a project, since this is not yet supported in dotnet cli.
4 |
5 | It is a similar approach to [npx](https://www.npmjs.com/package/npx) from [npm](https://www.npmjs.com/).
6 |
7 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 |
4 | # Maintain dependencies for GitHub Actions
5 | - package-ecosystem: "github-actions"
6 | directory: "/"
7 | schedule:
8 | interval: "daily"
9 |
10 | # Maintain dependencies for npm
11 | - package-ecosystem: "nuget"
12 | directory: "/"
13 | schedule:
14 | interval: "daily"
15 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/workflows/dotnet-test.yml:
--------------------------------------------------------------------------------
1 | name: .NET CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Setup .NET
15 | uses: actions/setup-dotnet@v1
16 | with:
17 | dotnet-version: |
18 | 3.1.x
19 | 5.0.x
20 | 6.0.x
21 | - name: Restore dependencies
22 | run: dotnet restore
23 | - name: Build
24 | run: dotnet build --no-restore
25 | # - name: Test
26 | # run: dotnet test --no-build --verbosity normal
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | embedded
5 | true
6 |
7 |
8 |
9 | release
10 | true
11 | portable
12 |
13 |
14 |
15 | true
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: .NET Docs publish
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 |
7 | jobs:
8 | publish:
9 | runs-on: windows-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Setup .NET
13 | uses: actions/setup-dotnet@v1
14 | - name: Install docfx via Chocolatey
15 | run: choco install docfx -y
16 | - name: Install docfx via Chocolatey
17 | run: choco install docfx -y
18 | - name: Generate documentation
19 | run: cd docs; docfx .\docfx.json --build
20 | - name: Deploy to Github Pages
21 | uses: crazy-max/ghaction-github-pages@v2
22 | with:
23 | build_dir: docs/_site
24 | env:
25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | The currently supported versions of the `dotnex`, with active support and security updates project are the following ones:
6 |
7 | | Version | Supported |
8 | | ------- | ------------------ |
9 | | 1.0.0 | :white_check_mark: |
10 | | < 1.0.0 | :x: |
11 |
12 | ## Reporting a Vulnerability
13 |
14 | If you detect a vulnerability in the project, please reach me by email at raul[at]piraces.dev.
15 |
16 | I will prioritize the solving of the vulnerability, expect updates in some days.
17 |
18 | This is an Open Source Project, if the vulnerability is accepted it will be fixed and I will appreciate it very much, but I can't do nothing more than that :cry:
19 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: piraces
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Main site for **dotnex**
2 |
3 | A simple .NET tool to execute other dotnet tools without installing them globally or in a project (a similar approach to [npx](https://www.npmjs.com/package/npx) from [npm](https://www.npmjs.com/)).
4 |
5 | [**View in Nuget.org**](https://www.nuget.org/packages/dotnex/)
6 |
7 | This simple tool provides the minimum necessary to run dotnet tools without the need of installing them globally or in a project, since this is not yet supported in dotnet cli.
8 |
9 | ## Quick Start
10 |
11 | Install the [dotnet cli](https://dotnet.microsoft.com/download) (included in the .NET SDK) and then run the following command:
12 |
13 | ```shell
14 | dotnet tool install -g dotnex
15 | ```
16 |
17 | Execute your dotnet tool:
18 |
19 | ```shell
20 | dotnex dotnetsay Easy!!
21 | ```
--------------------------------------------------------------------------------
/tests/dotnex.IntegrationTests/CliCommandWrapperTests.cs:
--------------------------------------------------------------------------------
1 | using FluentAssertions;
2 | using Xunit;
3 |
4 | namespace dotnex.IntegrationTests
5 | {
6 | public class CliCommandWrapperTests
7 | {
8 | [Fact]
9 | public async void CliCommandWrapperShouldReturnCorrectExitCodeOnSuccess()
10 | {
11 | var cliCommandWrapper = new CliCommandLineWrapper(new string[] { "help" });
12 | var result = await cliCommandWrapper.StartCliCommand();
13 | result.Should().Be(0);
14 | }
15 |
16 | [Fact]
17 | public async void CliCommandWrapperShouldReturnCorrectExitCodeOnFail()
18 | {
19 | var cliCommandWrapper = new CliCommandLineWrapper(new string[] { "error" });
20 | var result = await cliCommandWrapper.StartCliCommand();
21 | result.Should().Be(1);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.github/workflows/dotnet-release.yml:
--------------------------------------------------------------------------------
1 | name: .NET Tool Release
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 |
7 | jobs:
8 | publish:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Setup .NET
13 | uses: actions/setup-dotnet@v1
14 | with:
15 | dotnet-version: |
16 | 3.1.x
17 | 5.0.x
18 | 6.0.x
19 | - name: Restore dependencies
20 | run: dotnet restore
21 | - name: Pack
22 | run: dotnet pack --configuration Release /p:OfficialBuild=true
23 | - name: Publish NuGet to Nuget.org
24 | run: dotnet nuget push ./src/dotnex/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.PUBLISH_TOKEN }} --skip-duplicate
25 | - name: Publish to GitHub packages
26 | run: dotnet nuget push ./src/dotnex/bin/Release/*.nupkg --source https://nuget.pkg.github.com/piraces/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
27 |
--------------------------------------------------------------------------------
/tests/dotnex.IntegrationTests/dotnex.IntegrationTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | enable
6 |
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | runtime; build; native; contentfiles; analyzers; buildtransitive
16 | all
17 |
18 |
19 | runtime; build; native; contentfiles; analyzers; buildtransitive
20 | all
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Raul Piraces Alastuey
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tests/dotnex.IntegrationTests/ProgramTests.cs:
--------------------------------------------------------------------------------
1 | using FluentAssertions;
2 | using System;
3 | using Xunit;
4 |
5 | namespace dotnex.IntegrationTests
6 | {
7 | public class ProgramTests
8 | {
9 | [Fact]
10 | public void ProgramShouldFailIfNoToolAndNoValidOptionSpecified()
11 | {
12 | var result = Program.Main(new string[] { });
13 | result.Should().Be(1);
14 | }
15 |
16 | [Fact]
17 | public void ProgramShouldFailIfNoExistingToolSpecified()
18 | {
19 | var result = Program.Main(new[] { Guid.NewGuid().ToString() });
20 | result.Should().Be(1);
21 | }
22 |
23 | [Fact]
24 | public void ProgramShouldSuccessIfNoToolAndValidOptionSpecified()
25 | {
26 | var result = Program.Main(new[] { "--remove-cache" });
27 | result.Should().Be(0);
28 | }
29 |
30 | [Fact]
31 | public void ProgramShouldSuccessIfValidToolSpecified()
32 | {
33 | var result = Program.Main(new[] { "dotnetsay" });
34 | result.Should().Be(0);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/dotnex/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "dotnex clear cache": {
4 | "commandName": "Project",
5 | "commandLineArgs": "--remove-cache"
6 | },
7 | "dotnex help": {
8 | "commandName": "Project",
9 | "commandLineArgs": "-h"
10 | },
11 | "dotnex multiple arguments": {
12 | "commandName": "Project",
13 | "commandLineArgs": "dotnetsay hello world"
14 | },
15 | "dotnex only tool": {
16 | "commandName": "Project",
17 | "commandLineArgs": "dotnetsay"
18 | },
19 | "dotnex version": {
20 | "commandName": "Project",
21 | "commandLineArgs": "--version"
22 | },
23 | "dotnex with version": {
24 | "commandName": "Project",
25 | "commandLineArgs": "-v 2.1.4 dotnetsay hello world"
26 | },
27 | "dotnex with version and framework": {
28 | "commandName": "Project",
29 | "commandLineArgs": "-v 2.1.4 -f netcoreapp1.0 dotnetsay hello world"
30 | },
31 | "dotnex with version and framework no cache": {
32 | "commandName": "Project",
33 | "commandLineArgs": "-v 2.1.4 -r dotnetsay hello world"
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/dotnex/dotnex.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | A simple .NET tool to execute other dotnet tools without installing them globally or in a project.
4 | Exe
5 | netcoreapp3.1;net5.0;net6.0
6 | 9
7 | Enable
8 | 1.0.0
9 | https://piraces.github.io/dotnex/
10 | MIT
11 | dotnet, global tools, run, run once, dotnet-cli
12 | Raúl Piracés
13 | Raúl Piracés (@piraces_)
14 | true
15 | dotnex
16 | dotnex
17 | logo.png
18 | true
19 | https://github.com/piraces/dotnex
20 | true
21 | true
22 | true
23 | snupkg
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | True
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/docs/docfx.json:
--------------------------------------------------------------------------------
1 | {
2 | "metadata": [
3 | {
4 | "src": {
5 | "files": [ "**.csproj" ],
6 | "exclude": [ "**/bin/**", "**/obj/**" ],
7 | "src": "../src"
8 | },
9 | "dest": "doc",
10 | "disableGitFeatures": false,
11 | "disableDefaultFilter": false
12 | }
13 | ],
14 | "build": {
15 | "content": [
16 | {
17 | "files": [
18 | "doc/**.yml",
19 | "doc/index.md"
20 | ]
21 | },
22 | {
23 | "files": [
24 | "articles/**.md",
25 | "articles/**/toc.yml",
26 | "toc.yml",
27 | "*.md"
28 | ]
29 | }
30 | ],
31 | "resource": [
32 | {
33 | "files": [
34 | "images/**"
35 | ]
36 | }
37 | ],
38 | "overwrite": [
39 | {
40 | "files": [
41 | "apidoc/**.md"
42 | ],
43 | "exclude": [
44 | "obj/**",
45 | "_site/**"
46 | ]
47 | }
48 | ],
49 | "dest": "_site",
50 | "globalMetadata": {
51 | "_appTitle": "dotnex - Home page",
52 | "_gitContribute": {
53 | "repo": "https://github.com/piraces/dotnex",
54 | "branch": "main"
55 | },
56 | "_appLogoPath": "images/logo.png",
57 | "_appFaviconPath": "images/favicon.ico"
58 | },
59 | "fileMetadataFiles": [],
60 | "template": [
61 | "default"
62 | ],
63 | "postProcessors": [],
64 | "markdownEngineName": "markdig",
65 | "noLangKeyword": false,
66 | "keepFileLink": false,
67 | "cleanupCacheHistory": false,
68 | "disableGitFeatures": false
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/dotnex.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32120.378
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnex", "src\dotnex\dotnex.csproj", "{48FB0B53-CC53-441D-B41C-CBFACF82A7BA}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnex.IntegrationTests", "tests\dotnex.IntegrationTests\dotnex.IntegrationTests.csproj", "{0C78E5C4-0656-4C5F-87F0-297AD50C6AA7}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {48FB0B53-CC53-441D-B41C-CBFACF82A7BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {48FB0B53-CC53-441D-B41C-CBFACF82A7BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {48FB0B53-CC53-441D-B41C-CBFACF82A7BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {48FB0B53-CC53-441D-B41C-CBFACF82A7BA}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {0C78E5C4-0656-4C5F-87F0-297AD50C6AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {0C78E5C4-0656-4C5F-87F0-297AD50C6AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {0C78E5C4-0656-4C5F-87F0-297AD50C6AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {0C78E5C4-0656-4C5F-87F0-297AD50C6AA7}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {7B2246F3-0322-4C69-B10C-8513228BAE52}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/tests/dotnex.IntegrationTests/CacheManagerTests.cs:
--------------------------------------------------------------------------------
1 | using FluentAssertions;
2 | using System.IO;
3 | using Xunit;
4 |
5 | namespace dotnex.IntegrationTests
6 | {
7 | public class CacheManagerTests
8 | {
9 | [Fact]
10 | public void TempFolderShouldBeUserTemporaryFolder()
11 | {
12 | var tempFolder = CacheManager.GetTempFolder();
13 | var expectedPath = Path.Combine(Path.GetTempPath(), "dotnex");
14 | tempFolder.Should().Be(expectedPath);
15 | }
16 |
17 | [Fact]
18 | public void RemoveAllCachedFilesShouldRemoveAllTempFolder()
19 | {
20 | // ASSERT
21 | var tempFolder = CacheManager.GetTempFolder();
22 | Directory.CreateDirectory(tempFolder);
23 | // Create random file inside temp folder
24 | string fileName = Path.GetRandomFileName();
25 | var pathStringNewFile = Path.Combine(tempFolder, fileName);
26 | var fileStreamNewFile = File.Create(pathStringNewFile);
27 | fileStreamNewFile.Close();
28 | // Create random subdirectory
29 | var pathStringSubdirectory = Path.Combine(tempFolder, Path.GetRandomFileName());
30 | Directory.CreateDirectory(pathStringSubdirectory);
31 |
32 | // ACT
33 | CacheManager.RemoveAllCachedFiles();
34 |
35 | // ASSERT
36 | var tempFolderExists = Directory.Exists(tempFolder);
37 | var tempFileExists = Directory.Exists(pathStringNewFile);
38 | var tempSubdirectoryExists = Directory.Exists(pathStringSubdirectory);
39 |
40 | tempFolderExists.Should().BeFalse();
41 | tempFileExists.Should().BeFalse();
42 | tempSubdirectoryExists.Should().BeFalse();
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 | schedule:
9 | - cron: '44 18 * * 1'
10 |
11 | jobs:
12 | analyze:
13 | name: Analyze
14 | runs-on: ubuntu-latest
15 | permissions:
16 | actions: read
17 | contents: read
18 | security-events: write
19 |
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | language: [ 'csharp' ]
24 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
25 | # Learn more about CodeQL language support at https://git.io/codeql-language-support
26 |
27 | steps:
28 | - name: Checkout repository
29 | uses: actions/checkout@v2
30 |
31 | # Initializes the CodeQL tools for scanning.
32 | - name: Initialize CodeQL
33 | uses: github/codeql-action/init@v1
34 | with:
35 | languages: ${{ matrix.language }}
36 | # If you wish to specify custom queries, you can do so here or in a config file.
37 | # By default, queries listed here will override any specified in a config file.
38 | # Prefix the list here with "+" to use these queries and those in the config file.
39 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
40 |
41 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
42 | # If this step fails, then you should remove it and run the build manually (see below)
43 | - name: Autobuild
44 | uses: github/codeql-action/autobuild@v1
45 |
46 | # ℹ️ Command-line programs to run using the OS shell.
47 | # 📚 https://git.io/JvXDl
48 |
49 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
50 | # and modify them (or add more) to build your code if your project
51 | # uses a compiled language
52 |
53 | #- run: |
54 | # make bootstrap
55 | # make release
56 |
57 | - name: Perform CodeQL Analysis
58 | uses: github/codeql-action/analyze@v1
59 |
--------------------------------------------------------------------------------
/.github/workflows/sonarcloud.yml:
--------------------------------------------------------------------------------
1 | name: SonarCloud scan
2 | on:
3 | push:
4 | branches:
5 | - main
6 | pull_request:
7 | types: [opened, synchronize, reopened]
8 | jobs:
9 | build:
10 | name: Build
11 | runs-on: windows-latest
12 | steps:
13 | - name: Setup .NET
14 | uses: actions/setup-dotnet@v1
15 | with:
16 | dotnet-version: |
17 | 3.1.x
18 | 5.0.x
19 | 6.0.x
20 | - name: Set up JDK 11
21 | uses: actions/setup-java@v1
22 | with:
23 | java-version: 1.11
24 | - uses: actions/checkout@v2
25 | with:
26 | fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
27 | - name: Cache SonarCloud packages
28 | uses: actions/cache@v1
29 | with:
30 | path: ~\sonar\cache
31 | key: ${{ runner.os }}-sonar
32 | restore-keys: ${{ runner.os }}-sonar
33 | - name: Cache SonarCloud scanner
34 | id: cache-sonar-scanner
35 | uses: actions/cache@v1
36 | with:
37 | path: .\.sonar\scanner
38 | key: ${{ runner.os }}-sonar-scanner
39 | restore-keys: ${{ runner.os }}-sonar-scanner
40 | - name: Install SonarCloud scanner
41 | if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
42 | shell: powershell
43 | run: |
44 | New-Item -Path .\.sonar\scanner -ItemType Directory
45 | dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
46 | - name: Build and analyze
47 | env:
48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
49 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
50 | shell: powershell
51 | run: |
52 | .\.sonar\scanner\dotnet-sonarscanner begin /k:"piraces_dotnex" /o:"piraces" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
53 | dotnet build
54 | .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
55 |
--------------------------------------------------------------------------------
/tests/dotnex.IntegrationTests/ToolHandlerTests.cs:
--------------------------------------------------------------------------------
1 | using FluentAssertions;
2 | using System;
3 | using Xunit;
4 |
5 | namespace dotnex.IntegrationTests
6 | {
7 | public class ToolHandlerTests
8 | {
9 |
10 | [Fact]
11 | public async void ToolHandlerShouldRunValidToolWithSuccess()
12 | {
13 | var toolHandler = new ToolHandler("dotnetsay");
14 | var result = await toolHandler.StartTool();
15 | result.Should().Be(0);
16 | }
17 |
18 | [Fact]
19 | public async void ToolHandlerShouldRunValidToolWithArgumentsWithSuccess()
20 | {
21 | var toolHandler = new ToolHandler("dotnetsay", toolArgs: "Hello!");
22 | var result = await toolHandler.StartTool();
23 | result.Should().Be(0);
24 | }
25 |
26 | [Fact]
27 | public async void ToolHandlerShouldRunValidToolWithSpecifiedVersionWithSuccess()
28 | {
29 | var toolHandler = new ToolHandler("dotnetsay", version: "2.0.0");
30 | var result = await toolHandler.StartTool();
31 | result.Should().Be(0);
32 | }
33 |
34 | [Fact]
35 | public async void ToolHandlerShouldRunValidToolWithSpecifiedVersionAndTargetFrameworkWithSuccess()
36 | {
37 | var toolHandler = new ToolHandler("dotnetsay", version: "2.1.7", framework: "net6.0");
38 | var result = await toolHandler.StartTool();
39 | result.Should().Be(0);
40 | }
41 |
42 | [Fact]
43 | public async void ToolHandlerShouldVerifyIfToolIsNotValidAndReturnError()
44 | {
45 | var toolHandler = new ToolHandler(Guid.NewGuid().ToString());
46 | var isValidTool = await toolHandler.CheckValidTool();
47 | isValidTool.Should().Be(false);
48 | }
49 |
50 | [Fact]
51 | public async void ToolHandlerShouldVerifyIfToolIsValidAndReturnSuccess()
52 | {
53 | var toolHandler = new ToolHandler("dotnex");
54 | var isValidTool = await toolHandler.CheckValidTool();
55 | isValidTool.Should().Be(true);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/dotnex/CacheManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Reflection;
4 | using System.Security;
5 |
6 | namespace dotnex
7 | {
8 | ///
9 | /// Main manager for the dotnet tools cache.
10 | /// It caches tools for subsequent or future executions, avoiding downloading it every time
11 | ///
12 | public static class CacheManager
13 | {
14 | private const string TEMP_FOLDER_NAME = "dotnex";
15 |
16 | private static string _tempFolder = Assembly.GetExecutingAssembly().Location;
17 |
18 | ///
19 | /// Removes all cached tools from the cache temporary folder.
20 | ///
21 | /// 0 if cache has been cleared successfully. 1 otherwise
22 | public static int RemoveAllCachedFiles()
23 | {
24 | var tempFolder = GetTempFolder();
25 | try
26 | {
27 | if (Directory.Exists(tempFolder))
28 | {
29 | Directory.Delete(tempFolder, true);
30 | }
31 | return 0;
32 | }
33 | catch (Exception)
34 | {
35 | Console.WriteLine("[X] FATAL: Could not remove cached files");
36 | return 1;
37 | }
38 | }
39 |
40 | ///
41 | /// Gets the temporary folder to store the cache in.
42 | ///
43 | /// The current user temp folder or the current directory if the first is not writable/accesible
44 | public static string GetTempFolder()
45 | {
46 | try
47 | {
48 | _tempFolder = Path.GetTempPath();
49 | }
50 | catch (SecurityException)
51 | {
52 | Console.WriteLine("[X] Could not obtain access to temp path...");
53 | Console.WriteLine("[i] Using current directory");
54 | }
55 | finally
56 | {
57 | _tempFolder = Path.Combine(_tempFolder, TEMP_FOLDER_NAME);
58 | }
59 | return _tempFolder;
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/src/dotnex/CliCommandLineWrapper.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using System.Threading.Tasks;
3 |
4 | namespace dotnex
5 | {
6 | ///
7 | /// Wrapper around the dotnet cli to execute external tools.
8 | ///
9 | public class CliCommandLineWrapper
10 | {
11 | private const string DOTNET_CLI_COMMAND = "dotnet";
12 |
13 | private readonly Process _toolCliProcess;
14 |
15 | ///
16 | /// Constructor for the CLI wrapper.
17 | /// It takes arguments, if the output should be redirected, the working directory and if the external tool window should be hidden.
18 | ///
19 | /// Arguments/options to execute the tool with
20 | /// If the STDERR/STDOUT should be redirected (default false)
21 | /// Working directory to run the tool from (default the current one)
22 | /// ProcessWindowStyle for the CLI execution (default hidden)
23 | public CliCommandLineWrapper(string[] args, bool redirectOutput = false, string? workingDirectory = null, ProcessWindowStyle processWindowStyle = ProcessWindowStyle.Hidden)
24 | {
25 | _toolCliProcess = new Process();
26 | _toolCliProcess.StartInfo = new ProcessStartInfo
27 | {
28 | FileName = DOTNET_CLI_COMMAND,
29 | RedirectStandardError = redirectOutput,
30 | RedirectStandardOutput = redirectOutput,
31 | WindowStyle = processWindowStyle
32 | };
33 | _toolCliProcess.StartInfo.Arguments = string.Join(' ', args);
34 |
35 | if(!string.IsNullOrWhiteSpace(workingDirectory))
36 | {
37 | _toolCliProcess.StartInfo.WorkingDirectory = workingDirectory;
38 | }
39 | }
40 |
41 | ///
42 | /// Starts the CLI command and returns the exit code.
43 | ///
44 | /// The exit code from the CLI command execution
45 | public async Task StartCliCommand()
46 | {
47 | _toolCliProcess.Start();
48 | #if NET5_0_OR_GREATER
49 | await _toolCliProcess.WaitForExitAsync();
50 | #else
51 | await Task.Run(() => _toolCliProcess.WaitForExit()); // TODO
52 | #endif
53 | return _toolCliProcess.ExitCode;
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # dotnex
2 |
3 | 
4 | [](https://github.com/piraces/dotnex/actions/workflows/docs.yml)
5 | [](https://github.com/piraces/dotnex/actions/workflows/dotnet-test.yml)
6 | [](https://github.com/piraces/dotnex/actions/workflows/codeql-analysis.yml)
7 | [](https://sonarcloud.io/summary/new_code?id=piraces_dotnex)
8 |
9 | 
10 |
11 |
12 | A simple .NET tool to execute other dotnet tools without installing them globally or in a project (a similar approach to [npx](https://www.npmjs.com/package/npx) from [npm](https://www.npmjs.com/)).
13 |
14 | [**View in Nuget.org**](https://www.nuget.org/packages/dotnex/)
15 |
16 | ## About
17 |
18 | This simple tool provides the minimum necessary to run dotnet tools without the need of installing them globally or in a project, since this is not yet supported in dotnet cli.
19 |
20 |
21 | ### Features:
22 | - **Cache**. This tool provides caching of used tools in a temporary directory (for better performance).
23 |
24 | - **Version and framework selection**. You can specify whatever version you want and the target framework to use in every run.
25 |
26 | - **SourceLink for debugging**. The binaries can be debbuged with [Source Link](https://github.com/dotnet/sourcelink). Example (with Developer Command Prompt for VS): `devenv /debugexe c:\Users\rich\.dotnet\tools\dotnex.exe`
27 |
28 | - **Symbols package**. A symbols package is published too in the publish process in order to ease the debugging of the NuGet package.
29 |
30 |
31 | ## Usage
32 | ```
33 | dotnex [options] [...]
34 | ```
35 |
36 | Where the arguments and options are the following:
37 | ```
38 | Arguments:
39 | The NuGet Package Id of the tool to execute []
40 | Arguments to pass to the tool to execute
41 |
42 | Options:
43 | -v, --use-version Version of the tool to use
44 | -f, --framework Target framework for the tool
45 | -r, --remove-cache Flag to remove the local cache before running the tool (can be run without tool)
46 | --version Show version information
47 | -?, -h, --help Show help and usage information
48 | ```
49 |
50 | This same output can be obtained running the tool with the help option:
51 | ```
52 | dotnex -h
53 | ```
54 |
55 | Example with the simple `dotnetsay` tool:
56 | ```
57 | dotnex dotnetsay Hello World!!
58 | ```
59 |
60 | ## Installation
61 |
62 | Install the [dotnet cli](https://dotnet.microsoft.com/download) (included in the .NET SDK) and then run the following command:
63 |
64 | ```
65 | dotnet tool install -g dotnex
66 | ```
67 |
68 | ### SDK version
69 |
70 | `dotnex` is published for all current supported SDKs from Microsoft:
71 | - .NET Core 3.1.x
72 | - .NET 5.0.x
73 | - .NET 6.0.x
74 |
75 | The main idea is to maintain `dotnex` up-to-date with all current supported SDKs from Microsoft.
76 |
77 | ## Contributions
78 |
79 | Feel free to open an issue or a PR if you want to without any problem :)
80 |
81 | ## License
82 |
83 | This project is licensed under the [MIT License](LICENSE).
84 |
85 | See the `LICENSE` file in the root of this repository.
86 |
--------------------------------------------------------------------------------
/src/dotnex/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.CommandLine;
3 | using System.CommandLine.Invocation;
4 | using System.Threading.Tasks;
5 |
6 | namespace dotnex
7 | {
8 | ///
9 | /// Main class of dotnex and entry point.
10 | /// Contains the options specification and description, the main handler and the root command definition (using System.CommandLine).
11 | ///
12 | public class Program
13 | {
14 | ///
15 | /// Main entry point.
16 | /// Composes the options and arguments, initializes the root command, sets the handler and invoke the root command.
17 | ///
18 | /// Command line arguments passed via STDIN
19 | ///
20 | public static int Main(string[] args)
21 | {
22 | var versionOption = new Option(
23 | new[] { "--use-version", "-v" },
24 | "Version of the tool to use");
25 |
26 | var frameworkOption = new Option(
27 | new[] { "--framework", "-f" },
28 | "Target framework for the tool");
29 |
30 | var removeCacheOption = new Option(
31 | new[] { "--remove-cache", "-r" },
32 | "Flag to remove the local cache before running the tool (can be run without tool)");
33 |
34 | var toolArgument = new Argument("TOOL", () => null, "The NuGet Package Id of the tool to execute");
35 |
36 | var toolArgsArgument = new Argument("TOOL-ARGS", "Arguments to pass to the tool to execute");
37 |
38 | var rootCommand = new RootCommand("Execute other dotnet tools without installing them globally or in a project")
39 | {
40 | versionOption,
41 | frameworkOption,
42 | removeCacheOption,
43 | toolArgument,
44 | toolArgsArgument
45 | };
46 |
47 | rootCommand.SetHandler(async (InvocationContext invocationContext, string? tool, string version, string framework, bool removeCache, string[]? toolArgs) => {
48 | await Execute(invocationContext, tool, version, framework, removeCache, toolArgs);
49 | }, toolArgument, versionOption, frameworkOption, removeCacheOption, toolArgsArgument);
50 |
51 | return rootCommand.Invoke(args);
52 | }
53 |
54 | ///
55 | /// Main method that handles all the inputs and executes the external tool with the provided tool arguments and options.
56 | /// The external tool downloaded and executed follows the version and target framework specified.
57 | ///
58 | /// Invocation context from System.CommandLine
59 | /// The external dotnet tool to execute
60 | /// The version of the dotnet tool to download and execute
61 | /// The target framework for the dotnet tool
62 | /// If true, it clears the main cache of dotnex, where dotnet tools are stored for subsequent executions
63 | /// Options and arguments to pass to the external dotnet tool
64 | private static async Task Execute(InvocationContext invocationContext, string? tool, string version, string framework, bool removeCache,
65 | string[]? toolArgs)
66 | {
67 | var finalToolArgs = toolArgs != null ? string.Join(' ', toolArgs) : null;
68 | if (!string.IsNullOrWhiteSpace(tool))
69 | {
70 | var toolHandler = new ToolHandler(tool, version, framework, removeCache, finalToolArgs);
71 | var existingPublishedTool = await toolHandler.CheckValidTool();
72 | if (existingPublishedTool)
73 | {
74 | var result = await toolHandler.StartTool();
75 | invocationContext.ExitCode = result;
76 | return;
77 | }
78 | Console.WriteLine($"[X] The specified tool '{tool}' does not exist... " +
79 | $"Please check the correct name at https://www.nuget.org/packages");
80 | invocationContext.ExitCode = 1;
81 | return;
82 | }
83 |
84 | if (removeCache)
85 | {
86 | CacheManager.RemoveAllCachedFiles();
87 | return;
88 | }
89 | Console.WriteLine("[X] Please specify a tool or a valid option to work without tool...");
90 | invocationContext.ExitCode = 1;
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/src/dotnex/ToolHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Net.Http;
6 | using System.Threading.Tasks;
7 |
8 | namespace dotnex
9 | {
10 | ///
11 | /// Class that handles the download, install and execution processes for dotnet tools.
12 | ///
13 | public class ToolHandler
14 | {
15 | private const string DEFAULT_NUGET_FEED = "https://www.nuget.org/packages/";
16 |
17 | private readonly string[] _toolManifestCliProcessArgs = { "new", "tool-manifest", "--force" };
18 |
19 | private readonly CliCommandLineWrapper _dotnetManifestCommand;
20 | private readonly CliCommandLineWrapper _dotnetInstallCommand;
21 | private static HttpClient _httpClient = new();
22 |
23 | private string _toolName;
24 | private string? _toolArgs;
25 | private bool _removeCache;
26 | private string _tempFolder;
27 |
28 | ///
29 | /// Constructor for ToolHandler.
30 | /// Initializes the tool with its name, version, target framework and arguments/options to execute the tool with.
31 | ///
32 | /// Name of the dotnet tool
33 | /// Version of the dotnet tool to download, install and execute (default latest)
34 | /// Target framework for the tool (default same as the current dotnet sdk used to run this process)
35 | /// If true, cache is purged is exists for this tool. Otherwise it will use cache if exists (default false)
36 | /// Options/arguments to invoke the tool with (default none)
37 | public ToolHandler(string toolName, string? version = null, string? framework = null, bool removeCache = false,
38 | string? toolArgs = null)
39 | {
40 | _toolName = toolName;
41 | _toolArgs = toolArgs;
42 | _removeCache = removeCache;
43 | _tempFolder = CacheManager.GetTempFolder();
44 | _dotnetManifestCommand = new CliCommandLineWrapper(_toolManifestCliProcessArgs, true);
45 | var installArguments = GetToolInstallCliProcessArgs(toolName, version, framework);
46 | _dotnetInstallCommand = new CliCommandLineWrapper(installArguments, true);
47 | }
48 |
49 | ///
50 | /// Starts the execution defined in this class, generating the manifest and removing cache if needed.
51 | ///
52 | /// Exit code from the execution of the tool
53 | public async Task StartTool()
54 | {
55 | if (_removeCache)
56 | {
57 | CacheManager.RemoveAllCachedFiles();
58 | }
59 | var manifestProcessResult = await _dotnetManifestCommand.StartCliCommand();
60 | if (manifestProcessResult > 0)
61 | {
62 | Console.WriteLine("[X] Could not create manifest for tool. Check if this program is allowed to write in the current directory.");
63 | return 1;
64 | }
65 | await _dotnetInstallCommand.StartCliCommand();
66 |
67 | return await StartToolProcess();
68 | }
69 |
70 | ///
71 | /// Makes a request to the main NuGet package repository and checks if the tool exists or not
72 | ///
73 | /// True if the tool exists in the NuGet package repository, false otherwise
74 | public async Task CheckValidTool()
75 | {
76 | var response = await _httpClient.GetAsync($"{DEFAULT_NUGET_FEED}{_toolName}");
77 | return response.IsSuccessStatusCode;
78 | }
79 |
80 | ///
81 | /// Gets the install arguments for the dotnet tool with the version and framework specified.
82 | ///
83 | /// Name of the dotnet tool to install
84 | /// Version of the dotnet tool to install (default latest)
85 | /// Target framework of the tool to install (default same as the current dotnet sdk used to run this process)
86 | /// Array of arguments to install the dotnet tool with the specified options
87 | private string[] GetToolInstallCliProcessArgs(string toolName, string? version, string? framework) {
88 | var args = new[]
89 | {
90 | "tool",
91 | "install",
92 | toolName,
93 | "--tool-path",
94 | _tempFolder
95 | };
96 |
97 | if (!string.IsNullOrWhiteSpace(version))
98 | {
99 | args = args.Concat(new[] {"--version", version}).ToArray();
100 | }
101 |
102 | if (!string.IsNullOrWhiteSpace(framework))
103 | {
104 | args = args.Concat(new[] { "--framework", framework }).ToArray();
105 | }
106 |
107 | return args;
108 | }
109 |
110 | ///
111 | /// Starts the execution of the external tool downloaded with the provided args/options (synchronous)
112 | ///
113 | /// Returns the exit code of the execution
114 | private async Task StartToolProcess()
115 | {
116 | var toolProcess = new Process
117 | {
118 | StartInfo = new ProcessStartInfo
119 | {
120 | FileName = Path.Combine(_tempFolder, _toolName), WindowStyle = ProcessWindowStyle.Hidden,
121 | Arguments = _toolArgs ?? string.Empty
122 | }
123 | };
124 | toolProcess.Start();
125 |
126 | #if NET5_0_OR_GREATER
127 | await toolProcess.WaitForExitAsync();
128 | #else
129 | await Task.Run(() => toolProcess.WaitForExit()); // TODO
130 | #endif
131 |
132 | return toolProcess.ExitCode;
133 | }
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
352 | # JetBrains IDEs
353 | .idea/
354 |
355 | /**/DROP/
356 | /**/TEMP/
357 | /**/packages/
358 | /**/bin/
359 | /**/obj/
360 | _site
361 | /**/docs/doc/*.yml
362 | /**/docs/doc/.manifest
363 |
--------------------------------------------------------------------------------