Questions tagged [dotnet-tool]

Refers to the dotnet tool cli commands used with a .NET Core Global Tool

57 questions
1
vote
1 answer

Several project nuget package. Unable to find package

I have to netstandard2.0 projects: projectA/src/client/client.csproj projectB/src/lib/lib.csproj project A client reference project b lib like: ...
VoidName
  • 340
  • 2
  • 16
1
vote
1 answer

How to use dotnet tool during Travis-CI build?

I'm trying to use dotnet-warp as a global tool in my .NET Core Travis-CI build, because I like the idea of a single executable so much better than a folder full of 75ish files. I can successfully add the tool and verify there's a tools/dotnet folder…
jdmac020
  • 557
  • 1
  • 5
  • 18
0
votes
0 answers

Is it possible to add a custom claim with an array of values into a JWT token generated by dotnet user-jwts tool?

Using dotnet user-jwts tool, I'm trying to generate a token that would have a custom claim that is an array of values, and not a name/value pair. When decoded, this token should look something like this: { "unique_name": "User", "sub":…
Meskenas
  • 1
  • 1
0
votes
0 answers

Error while trying to install Sonarscanner via dotnet tool install

I got the error while trying to install dotnet-sonarscanner as suggested by Sonarqube. This happened when I was installing into 2nd server. My 1st server can run the installation command without any issue. Is there anyone who has encountered this…
0
votes
1 answer

dotnet ef database update works locally but not on Azure VM

I have an orchestration script that copies our legacy app's database to our new app database name in our dev environment, clones our Azure repository (GIT) for our new app and then runs the ef migrations in the cloned new app project to get our new…
0
votes
1 answer

dotnet pack reads an empty VCTargetsPath

I am building a Nuget package with Azure Pipelines. The pipeline is run by a self hosted agent. It works perfectly for pure .NET and .NET framework projects, but I get an error with a (VS2022) solution that contains a C++ project. The build step…
Rye bread
  • 1,305
  • 2
  • 13
  • 36
0
votes
1 answer

How to make my dotnet tool to auto self update

I cannot see how to configure my dotnet tool (c# .net 6) to auto update If I execute dotnet tool update --global --no-cache in process then it complains about the file already existing. It seems that we need something external to do the…
Sam Mackrill
  • 4,004
  • 8
  • 35
  • 55
0
votes
1 answer

Azure pipeline dotnet test error ---> System.Exception: Unable to read beyond the end of the stream

When running dotnet test on the Azure Pipeline, the pipeline fails with error: System.Exception: Unable to read beyond the end of the stream. at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at…
iarunpaul
  • 117
  • 2
  • 13
0
votes
0 answers

"No .NET SDKs were found." on first run but not on the second run

On various windows 10 machines we are experiencing a very strange behaviour. We have installed a custom dotnet tool, let's call it Foo. Then we perform a series of commands to this tool from within one powershell script, e.g. # do_job.ps1 Foo…
Samuel
  • 6,126
  • 35
  • 70
0
votes
0 answers

upgrade-assistant and EntityFramework

I have an issue, every time i try to use the upgrade-assistant tool it tries to remove entityFramework from a library containing it, and then update the library to NetStandard2.0. This is not helping since this library need to contain EF6 and EF6 is…
MuLy
  • 1
  • 1
0
votes
1 answer

Why does my dotnet tool run when installed locally, but not when installed globally?

I've written a dotnet tool following the documentation, targeting .NET 6. I can install and run it as a local tool. It works fine. I can install it as a global tool also, but when I run it, the executable acts like no version of .NET runtime is…
Jeremy
  • 2,642
  • 18
  • 36
0
votes
0 answers

Resolve .NET runtime version with same approach for .NET and .NET Framework

We're developing several .NET web applications, both on the old (.NET Framework 4.8) and new stack (.NET 6). On production, we want to determine on which .NET runtime each application is running. I could add something like…
mu88
  • 4,156
  • 1
  • 23
  • 47
0
votes
0 answers

Scaffold-DbContext to dotnet ef dbcontext scaffold convertion

I have a hard time finding the syntax for this in .NET EF world Scaffold-DbContext "Server=server_dns,sql_port;Database=db-name; User ID=sql-account;Password=LeetPa$$w0rd;" -StartupProject Solution.Api Microsoft.EntityFrameworkCore.SqlServer…
DoomerDGR8
  • 4,840
  • 6
  • 43
  • 91
0
votes
0 answers

Why does dotnet publish fail when using the pwsh task, but not PowerShell@2?

Using Azure Pipelines, I have the following step in a job running on the windows-2022 vmImage: - pwsh: | $config = "${{ parameters.buildConfiguration }}" $runtime = "${{ parameters.runtime }}" dotnet publish WebApp ` …
void.pointer
  • 24,859
  • 31
  • 132
  • 243
0
votes
0 answers

Get Exit Code of Process Dotnet-Coverage is Collecting

Have a Github Action running tests that I'm using dotnet-coverage to collect code coverage with. It runs great and collects fine. I've now noticed that the step does not fail when the tests fail. The exit code of the test command does not seem to…
Montané Hamilton
  • 547
  • 1
  • 7
  • 17