ERR Value cannot be null. (Parameter 'input')
Closed this issue · 4 comments
dotnet-version-cli version 3.0.1.0
When a use this command: dotnet version minor -f MyProj.csproj
, I have this output: ERR Value cannot be null. (Parameter 'input')
I don't understand why.
Here is my cproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>MyProj</PackageId>
<Authors>Doublon</Authors>
<Company>MyCompany</Company>
<Description>Description</Description>
<PackageVersion>1.8.2</PackageVersion>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
</Project>
Can you help me ?
Hi
I believe you need to run it with the new package version flag as introduced in version 3.0.1 of the tool
https://github.com/skarpdev/dotnet-version-cli/pull/111/files#diff-4a4588302b6b6704e8d835eeae2bc4e72d329487921efe11aa2c30c4ee345e3fR70
Meaning that you should add the following to your invocation
--version-property-name PackageVersion
And obviously it should not crash with a null ref but rather try and be helpful, so we can definitely improve that.
Hi,
Thank you for your asnwer. I try with :
dotnet version -f MyProj.csproj --version-property-name PackageVersion minor
But the issue is still there.