dazinator / DotNet.Glob

A fast globbing library for .NET / .NETStandard applications. Outperforms Regex.
MIT License
363 stars 27 forks source link

Cannot build, deprecated dotnet dependencies and more #75

Closed Code7R closed 4 years ago

Code7R commented 4 years ago

Hi, I liked your package and I wanted to contribute a little feature now (word groups, like with "ls /{usr,usr/local}/bin/*.{exe,sh}" ).

However, the package was not even loading with MS Visual Studio 2019 (reporting inaccessible SDK... heh?). Turned out to be a reference in global.json , hardcoding a deprecated NET-Core version.

Removing global.json helps. I am wondering why this file is part of main repo, maybe because of CI/CD but still, there must be better ways to manage that.

Anyway, due to lag of access to MSVS machine in the next days, I wanted to build it on Linux with MSVS Core and latest SDK versions. Turns out: nope, not possible. msbuild always fails due to some non-existing dependency on GitVersionTask.MsBuild. And so does "dotnet build". Not sure what I have to tune now to make it work, I hope the creator of this dependency can enlighten me.

See attachment. errors.log

` $ dotnet --list-runtimes Microsoft.AspNetCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

$ dotnet --list-sdks 3.1.202 [/usr/share/dotnet/sdk] $ cat /etc/apt/sources.list.d/mono-official-stable.list /etc/apt/sources.list.d/microsoft-prod.list deb https://download.mono-project.com/repo/debian stable-buster main deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main

$ dpkg -l nuget msbuild ... ii msbuild 1:16.5+xamarinxplat.2020.02.20.11.54-0xamarin2+debian10b1 all build platform for .NET and Visual Studio ii nuget 5.5.0.6382.bin-0xamarin1+debian10b1 all Package manager for NuGet repos - executable

`

dazinator commented 4 years ago

Hello,

I am aware that GitVersionTask has some issues and my intention is to remove that package and then fix up the CI build to pass in msbuild versiom variables instead.

The global.json is there because I have been bitten by issues in the past when running newer dotnet sdk's, builds fail. Or when the appveyor agent updates to a newer dotnet sdk, and resulted in build failures. The global.json allowed me to pin it to a fixed version that worked and not allow environmental updates to suddenly ending up breaking things.

I haven't spent much (any) time on this project for a while as its been quite stable, but I'll see if I can resolve the above issues and then I'll let know!

Thanks for your feedback!

dazinator commented 4 years ago

@Code7R - Thanks again for reporting this. This should now be fixed on the develop branch, I removed GitVersionTask and updated the global.json to allow roll-forward for newer minor and patch level sdk releases. You will need a minimum of dotnet sdk 3.1.300 installed to build though. Please let me know if you still have issues and I'll re-open.