bradwilson,
@bradwilson@mastodon.social avatar

Pro-tip for the day:

dotnet does not appear to require a trailing backslash when you define a custom NuGet package cache path via env var NUGET_PACKAGES but Visual Studio does.

Good:
NUGET_PACKAGES=X:.nuget\packages\

Bad:
NUGET_PACKAGES=X:.nuget\packages

jaredpar,
@jaredpar@hachyderm.io avatar

@bradwilson the bad case also leads to paths being written with \ in editorconfig. That is problematic as it breaks path comparisons in the compiler and other tooling

https://github.com/NuGet/Home/issues/13374

jaredpar,
@jaredpar@hachyderm.io avatar

@bradwilson we had to start normalizing away the \ in the compiler to avoid this problem

bradwilson,
@bradwilson@mastodon.social avatar

@jaredpar I assume the answer is replacing string-concatenated paths with Path.Combine. More typing for more safety. MSBuild files tend to be all about the string concatenated paths. 😔

SmartmanApps,
@SmartmanApps@dotnet.social avatar

@bradwilson
The inconsistency around the trailing (back)slash is one of the most annoying things. First I need to remember if it's forward or backward on the system I'm currently on, 😂then I ALSO need to remember if there's one at the end or not (sigh). Have these people writing these things not heard of, you know, standards? 😂

bradwilson,
@bradwilson@mastodon.social avatar

@SmartmanApps The worst part is there's a perfectly good API (Path.Combine) that would let them ignore the problem wholesale.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • dotnet
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • tacticalgear
  • modclub
  • normalnudes
  • ngwrru68w68
  • cisconetworking
  • tester
  • GTA5RPClips
  • Leos
  • anitta
  • provamag3
  • JUstTest
  • lostlight
  • All magazines