dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.21k stars 1.35k forks source link

Sdk Package Names should be `tolower`'d #1433

Open TheRealPiotrP opened 7 years ago

TheRealPiotrP commented 7 years ago

While merging in new templates from https://github.com/dotnet/sdk we took into CLI elements that looked like this:

  <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

Notice the capitalization of NET. The actual on-disk layout for these SDKs contain instead Net. This capitalization change did not cause issues on Windows as that is a case-insensitive file system but did cause issues on other platforms which are case-sensitive. The experience of tracking down this issue was frustrating because a capitalization problem in a file path is not one that immediately jumps out.

Given that NuGet already tolower's package names to avoid this class of issues I think we should do the same in the Sdk attribute. CLI and VS will tolower the package name during layout generation and MSBuild will tolower whatever string is passed in by the user.

@AndyGerlicher @srivatsn @dsplaisted @rainersigwald thoughts?

Note: NET was actually the right casing, so we changed the on-disk layout. However, this issue is still real as anyone typing an Sdk value may mix up caps and end up in the same broken state.

dsplaisted commented 7 years ago

See discussion of this issue in #1421