So the situation is that I'm trying to get a build set up on bamboo that will build this solution that has many projects in it (it's a shared library solution), each of which is a nuget package. Bamboo is currently running on Ubuntu 16.04. The solution contains library projects (netstandard2.0) and tests (netcoreapp2.0). Each of the libraries targets both net461 and netstandard2.0 because they are used both in our newer .net core 2.0 applications as well as our 4.6.1 legacy platform.
The problem is that if I run dotnet build mysolution.sln then the cli attempts to build everything in net461 which obviously fails (linux machine). But if I run dotnet build mysolution.sln -f netstandard2.0then the tests fail to build because they are netcoreapp2.0.
The only thing I can think of is to write into the build script, a line that builds each individual project using the correct framework which seems a bit silly to me.
Luckily, all of the test projects are suffixed with .Tests so I feel like there's probably a way to do some find /path -regex 'match-csproj-where-not-tests' and so forth... voodoo to make this a bit less annoying. I'm wondering if someone out there might know something I don't about the dotnet cli that could help with this or even offer the regex solution.
TIA
netstandardand once withnetcoreapp? - John KoernernetNNNfrom your project files. - Lex Li