Hello .Net Foundation Forum
I’m trying to add a new .net core 3.x project into our git repo, however, this repo is quite large and has .netcore 2.x specified in a root global.json, I understand I can override it by adding a new global.json with .netcore 3.x in my project to override, however, things are a bit tricky.
As you can see below, my folder and other projects share the same folder1, if I put global.json (3.x) in folder1, other projects will break because they have 2.x compatible csproj, if I put global.json (3.x) in myfolder, if I run msbuild from root or folder1, globaljson is not taking any effect, because global.json(3.x) in myfolder is not the current working dir. If I run build from myfolder with global.json(3.x) in it, it works fine. The problem here is our devops build does not build from myfolder, instead it builds from root or folder1, so I don’t really have a choice where to put global.json(3.x).
Can I specify the toolchain inside my csproj? or from a global.json, can I specify a specific version for a specific subfolder?
–global.json (.netcore 2.x)
------global.json (.netcore 3.x)