VS Project References Broken On Case Sensitivity of GUID

前端 未结 5 1072
旧巷少年郎
旧巷少年郎 2020-12-09 03:03

Since upgrading to VS 2015, my team has experienced random quirky things which I\'m sure are being worked out at Microsoft right now. One pretty annoying one is that we see

5条回答
  •  一整个雨季
    2020-12-09 03:45

    There's a bug in the projectsystem it seems. This powershell will loop over projects and make all references upper case:

    #FixGuids
    
    get-childitem -recurse | ?{ @('.sln', '.csproj', '.vbproj') -contains $_.Extension } | %{
       [regex]::Replace((gc -raw $_.FullName), '[{(]?[0-9A-Fa-f]{8}[-]?([0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}[)}]?', { return ([string]$args[0]).ToUpperInvariant() }) |
          Out-File $_.FullName -Encoding "UTF8
    }
    

    It's quite simplistic. If you rely on guids in your projects for something other than references, you may want to turn it into something more intelligent.

提交回复
热议问题