✅ Dotnet build failure on Linux due to nuget path case sensitivity
At work we're mostly using Windows, but we're trying to setup
Integration Tests
with the TestContainers
package.
- Since Azure Pipelines
has docker
built into the ubuntu-latest
build VM, we're trying to get our project to build in Linux
- But it keeps failing because nuget
is storing the packages with lowercase paths, but for some reason dotnet build
is looking for them with capitalization
- It seems to mainly be a problem with one of our internal nugets that is basically a wrapper around StyleCop
(with some extra config/rules)
- Due to that I can't really create a reproducible repo
Would anyone be able to help me figure out if there's something I can do to fix this?6 Replies
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
I wasn't involved in creating our StyleCop wrapper, but I found the problem! They were hard coding the
CodeAnalysisRuleSetLocation
with a capitalized Project Name
. This works fine on Windows, but not linux.
Hopefully I didn't waste too much of your timeI updated to use
MSBuildThisFileDirectory
and now it builds on Linux, woo hoo!Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
The project I'm building is .net core, but the nuget package is netstandard2.0 (and it internally uses StyleCop.Analyzers)
All of our company projects use the wrapper so they all have the same settings. The wrapper defines some custom rules and turns off others.
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View