I have a ASP.NET 4.8 webapplication and want to maintain CICD using github actions workflow. I am trying to add tokenization task for replace the variable as per the environment secrets after build but couldn't able to do that. showing error
Run dotnet tool install --global tokenizer --version 2.0.0C:\Users\runneradmin\AppData\Local\Temp\428d356c-7a0d-43e1-ae45-124b620e5916\restore.csproj : error NU1212: Invalid project-package combination for Tokenizer 2.0.0. DotnetToolReference project style can only contain references of the DotnetTool type The tool package could not be restored.Tool 'tokenizer' failed to install. This failure may have been caused by:* You are attempting to install a preview release and did not use the --version option to specify the version.* A package by this name was found, but it was not a .NET tool.* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.* You mistyped the name of the tool.For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
Here is my github workflow file.
name: Build-Test'on': push: branches: - devenv: API_URL: ${{ secrets.API_URL }}jobs: Build: runs-on: windows-latest steps: - uses: actions/checkout@v2 - name: Setup MSBuild uses: microsoft/setup-msbuild@v1 - name: Setup NuGet uses: NuGet/setup-nuget@v1.0.5 - name: Restore NuGet packages run: nuget restore adminlte2_Dashboard.sln - name: build run: | mkdir artifacts msbuild adminlte2_Dashboard/adminlte2_Dashboard.csproj /t:Build /p:Configuration=Release /p:OutputPath=./artifacts - name: Install Tokenizer tool run: dotnet tool install --global tokenizer --version 2.0.0 - name: Tokenize web.config file run: tokenizer --file web.config --tokenization-file tokenization.json --output-file web.config - name: publish run: | mkdir artifacts2 Get-Location msbuild adminlte2_Dashboard.sln /t:Publish /p:Configuration=Release /p:Platform="Any CPU" /p:PublishDir="./artifacts2"
I would appreciate any help.