Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

.NET Core 2.x fails on DotNetCliToolReference with * as Version number
JJauss
#1 Posted : Tuesday, November 28, 2017 7:17:02 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2016(UTC)
Posts: 2
Location: Germany

Thanks: 1 times
I'm on a project where we using a custom CLI command for dotnet and we want always have the latest version in our production projects.
So we decided to use * as Version identifier.

<DotNetCliToolReference Include="CustomPackageName" Version="*" />

This works on VS17. Executing nCrunch fails because of the following stack Trace:

System.IO.IOException: The path 'C:\Users\user\.nuget\packages\CustomPackageName\*' could not be processed because it is not of legal form
at nCrunch.Common.IO.DiskPath..ctor(String absolutePath, Boolean pathIsChecked)
at nCrunch.Common.IO.DirectoryPath..ctor(String , Boolean )
at nCrunch.Common.IO.DirectoryPath.GetDirectory(String directoryPathRelativeToDirectory)
at nCrunch.Compiler.UserNugetPackageDependency.GetFromCache(String packageName, String packageVersion, DirectoryPath& installPath)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader..(DotNetCliToolReference )
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at nCrunch.Common.Containers.ListExtensions.AddRange[T](IList`1 list, IEnumerable`1 range)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(ProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)

It seems that nCrunch doe not follow the SemanticVersioning like VS17 do.

Using the Version 3.12.0.15 of nCrunch

thx
Remco
#2 Posted : Tuesday, November 28, 2017 8:55:18 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,975

Thanks: 929 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this problem.

Yes, this makes sense. The DotNetCliToolReferences aren't represented in project.assets.json, so NCrunch has to do special parallel logic to identify this dependency. I wasn't aware that the '*' option existed, so naturally NCrunch can't handle it.

I'll see what we can do about getting this fixed in the next release. For the time being, I recommend specifying a version number as a workaround.
1 user thanked Remco for this useful post.
JJauss on 11/28/2017(UTC)
JJauss
#3 Posted : Tuesday, November 28, 2017 9:49:52 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2016(UTC)
Posts: 2
Location: Germany

Thanks: 1 times
Hi, thanks for the fast reply.
For short the workaround will help, but we have to adjust VersionNumber each time we made a update to our CLI-Tool.

kind regards
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download