Home: '11.2.0.3.0' is not a valid version string, Parameter name: value

Created on 10 Aug 2018  路  7Comments  路  Source: NuGet/Home

Environment

NuGet product used: reproducible in both nuget.exe and dotnet.exe

NuGet version : 4.7.0.5148

dotnet.exe --version : 2.1.302

OS version: Mac OS X High Sierra 10.13.6 (17G65)

Mono: 5.12.0.226

Steps

  1. Mac OS X, make sure mono is installed (for example, brew install mono; brew install nuget )

  2. clone the https://github.com/fsprojects/ProjectScaffold/ - (this is the default scaffolding project for F# Ionide Extension for VS Code)

Other suggested things

Follows similar issues #1743 #2785 #3070 #3095 #5295

Verbose Logs

nuget restore -verbosity detailed
NuGet Version: 4.7.0.5148
Restoring NuGet packages for solution /private/tmp/2018-08-10/ProjectScaffold-master/FSharp.ProjectScaffold.sln.
MSBuild auto-detection: using msbuild version '15.0' from '/usr/local/Cellar/mono/5.12.0.226_1/lib/mono/msbuild/15.0/bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
MSBuild P2P timeout [ms]: 120000
/usr/local/bin/msbuild "/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets" /p:RestoreUseCustomAfterTargets="True" /p:RestoreTaskAssemblyFile="/usr/local/Cellar/nuget/4.7.0/libexec/nuget.exe" /p:RestoreSolutionDirectory="/private/tmp/2018-08-10/ProjectScaffold-master/" /p:SolutionDir="/private/tmp/2018-08-10/ProjectScaffold-master/" /p:SolutionName="FSharp.ProjectScaffold" /p:RestoreBuildInParallel="False" /p:RestoreUseSkipNonexistentTargets="False"
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: The "WriteRestoreGraphTask" task failed unexpectedly. [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: System.ArgumentException: '11.2.0.3.0' is not a valid version string. [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: Parameter name: value [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at NuGet.Versioning.NuGetVersion.Parse (System.String value) [0x00045] in <55431ab4846b49babe0aafcf24cd67ed>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at NuGet.Commands.MSBuildRestoreUtility.GetVersion (NuGet.Commands.IMSBuildItem item) [0x00027] in <55431ab4846b49babe0aafcf24cd67ed>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at NuGet.Commands.MSBuildRestoreUtility.GetPackageSpec (System.Collections.Generic.IEnumerable1[T] items) [0x0029b] in <55431ab4846b49babe0aafcf24cd67ed>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets] /var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at System.Linq.Enumerable+SelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00048] in <4532f2d0f72246948a535b22fa05d69f>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () [0x0004e] in <4532f2d0f72246948a535b22fa05d69f>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets] /var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at NuGet.Commands.MSBuildRestoreUtility.GetDependencySpec (System.Collections.Generic.IEnumerable1[T] items) [0x001f8] in <55431ab4846b49babe0aafcf24cd67ed>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at NuGet.Build.Tasks.WriteRestoreGraphTask.Execute () [0x000a5] in <55431ab4846b49babe0aafcf24cd67ed>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in <82d05e73c22a425d94f54e932409b29e>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]
/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/pjep3cac.cwf.nugetrestore.targets(143,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder+d__26.MoveNext () [0x00212] in <82d05e73c22a425d94f54e932409b29e>:0 [/var/folders/yt/6pv3rp0x1tx75t5ysvvfwvn40000gn/T/NuGetScratch/4qcxuspr.mxr.nugetinputs.targets]

NuGet.CommandLine.ExitCodeException: Exception of type 'NuGet.CommandLine.ExitCodeException' was thrown.
at NuGet.CommandLine.MsBuildUtility+d__6.MoveNext () [0x00473] in <55431ab4846b49babe0aafcf24cd67ed>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <47b74980241a4d7898fb5dbf7819d2e5>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <47b74980241a4d7898fb5dbf7819d2e5>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <47b74980241a4d7898fb5dbf7819d2e5>:0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <47b74980241a4d7898fb5dbf7819d2e5>:0 at NuGet.CommandLine.RestoreCommand+<GetDependencyGraphSpecAsync>d__48.MoveNext () [0x000ff] in <55431ab4846b49babe0aafcf24cd67ed>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <47b74980241a4d7898fb5dbf7819d2e5>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <47b74980241a4d7898fb5dbf7819d2e5>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <47b74980241a4d7898fb5dbf7819d2e5>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <47b74980241a4d7898fb5dbf7819d2e5>:0
at NuGet.CommandLine.RestoreCommand+d__43.MoveNext () [0x000e5] in <55431ab4846b49babe0aafcf24cd67ed>:0

Sample Project

https://github.com/fsprojects/ProjectScaffold/archive/master.zip

Restore ByDesign

Most helpful comment

I saw this when doing the same thing through msbuild. Turns out I had a 'version' environment variable set, from running a visual-studio-related batch file. Obviously this isn't the exact same environment but the error message is almost exactly the same so it might be related.

All 7 comments

+1

System.ArgumentException: '1.3.4-20180903_3-build53' is not a valid version string. Parameter name: value at NuGet.Versioning.NuGetVersion.Parse(String value) at Microsoft.NET.Build.Tasks.DependencyContextBuilder.CreateRuntimeLibrary(String type, String name, String version, String hash, IReadOnlyList1 runtimeAssemblyGroups, IReadOnlyList1 nativeLibraryGroups, IEnumerable1 resourceAssemblies, IEnumerable1 dependencies, Boolean serviceable, String path, String hashPath) at Microsoft.NET.Build.Tasks.DependencyContextBuilder.GetProjectRuntimeLibrary(SingleProjectInfo projectInfo, ProjectContext projectContext, Dictionary2 dependencyLookup, Boolean includeCompilationLibraries)
at Microsoft.NET.Build.Tasks.DependencyContextBuilder.Build()
at Microsoft.NET.Build.Tasks.GenerateDepsFile.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()`

on VSTS.

Did you install the Oracle Client 11G ? I have the same problem and strangely that number (11.2.0.3.0) is the same of the Oracle client... Where do I can set NuGet version string manually ?

Thanks.

I saw this when doing the same thing through msbuild. Turns out I had a 'version' environment variable set, from running a visual-studio-related batch file. Obviously this isn't the exact same environment but the error message is almost exactly the same so it might be related.

@ilyakharlamov 11.2.0.3.0 is not a valid
version string. It's a 5 part.
@tzographos 1.3.4-20180903_3-build53 is not a valid version string as _ is an invalid character https://semver.org/#spec-item-9
[0-9A-Za-z-].

I don't think there is a client bug here.

Unless you have a counter example for me, I'll close this soon.

2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018: Unerwarteter Fehler bei der GenerateDepsFile-Aufgabe.
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018: System.ArgumentException: '2.0.0-pre.59.NLog_viewer.da6dfce' is not a valid version string.
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018: Parametername: value
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei NuGet.Versioning.NuGetVersion.Parse(String value)
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.NET.Build.Tasks.DependencyContextBuilder.CreateRuntimeLibrary(String type, String name, String version, String hash, IReadOnlyList`1 runtimeAssemblyGroups, IReadOnlyList`1 nativeLibraryGroups, IEnumerable`1 resourceAssemblies, IEnumerable`1 dependencies, Boolean serviceable, String path, String hashPath)
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.NET.Build.Tasks.DependencyContextBuilder.GetProjectRuntimeLibrary(SingleProjectInfo projectInfo, ProjectContext projectContext, Dictionary`2 dependencyLookup, Boolean includeCompilationLibraries)
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.NET.Build.Tasks.DependencyContextBuilder.Build()
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.NET.Build.Tasks.GenerateDepsFile.ExecuteCore()
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.NET.Build.Tasks.TaskBase.Execute()
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(124,5): error MSB4018:    bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Got same error if I want to build my project..


After changing my banch name without _, everything works 馃憤

Per my above comment, closing this as not a bug.

For future reference, feel free to look at https://nugettoolsdev.azurewebsites.net/ for the parsing of versions. It's an official tool but it does the job for most questions :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

infin8x picture infin8x  路  3Comments

msaraf1 picture msaraf1  路  3Comments

blackchoey picture blackchoey  路  3Comments

dotMorten picture dotMorten  路  3Comments

vsfeedback picture vsfeedback  路  3Comments