Add a second .NET path for MicroBuild#16091
Conversation
|
I just ran into the microbuild-deleted-by-checkout issue again in a repo, would be nice to have this finally fixed :) |
Acknowledged :) This fell off of my radar with some of the other work I've been focusing on. I will have it completed by end of the week. |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/arcade/actions/runs/18732176848 |
|
@ellahathaway - I think this broke dotnet/aspire's official build. I'm reverting to a previous version of dotnet/arcade. But can you take a look to see if we are doing something wrong? |
@eerhardt - I found #15946, which describes an error message that's almost identical to what you've included above. My comment on that issue has an explanation of why this error occurs. What I'm not understanding is why this only happens in aspire and not in other repos like arcade or arcade-validation, where my changes in this PR have been successful (https://dev.azure.com/dnceng/internal/_build/results?buildId=2826588&view=results https://dev.azure.com/dnceng/internal/_build/results?buildId=2826600&view=results). |
|
interesting, so it picked up is the working directory not getting set to the correct path? |
Yeah, I found the same thing. Did you mean setting DOTNET_ROOT? or microbuild needs to set CWD when it is running dotnet? The issue seems to be that MicroBuild now uses its own dotnet. See https://dev.azure.com/dnceng/internal/_build/results?buildId=2828021&view=logs&j=ab19ba8f-7… we store the sdks from global.json;
So it using its own dotnet but clashing with |
|
I'm a bit stumped here. @mmitche - any ideas? |
|
Yes I meant setting the CWD to the .dotnet-microbuild path, it's in the temp directory so it shouldn't pick up global.json from the repo sources path. |
|
I'm a bit stumped here. I think the root of the problem (why it fails for aspire) has something to do with the pre-step Before the SDK installation location change, the 8.0 SDK would have been installed at There's maybe an issue in the MB install step. Their logic just uses the What I'm really stumped about is why arcade-validation doesn't fail for MacOS. In https://dev.azure.com/dnceng/internal/_build/results?buildId=2827170&view=logs&j=ab19ba8f-7bc9-572a-65fc-b6efe2f6eec8&t=5374bfbb-e95e-576d-70e0-582c47a3d139, the 8.0 SDK gets installed. I would not expect that the behavior would be any different from aspire's. The global.json should get picked up from the root source directory, which would be a 10.0 RC2 SDK, and it's not available. My hunch is that something in tools.sh influences the environment in some way when the first restore step happens. But I'm not sure what. |
|
Well, my Works fine there... |
|
There it is. Restore is a red herring here. The thing is that arcade-validation, like many .NET repositories, doesn't use an I think @ellahathaway's code is correct for the signing step itself. The intention is that step uses the 8.0 SDK. I am suspicious that prepending an 8.0 SDK to the path after the initial restore step will have negative downstream effects, though. It might just work now because the arcade tooling keeps info around about where its original install was. You have some options...
I thiiiink I'm a fan of the first option. It gives the ability to separate out the repo's infra from microbuild's, fully. The only thing I don't love is that UseDotNet@2 still prepends to the path. Why does it not have an option NOT to do so. We could switch to something else, though. |
Thank you, Matt. I've filed #16259 in response to this. I'm currently working with the MicroBuild team to get this resolved. |
This reverts commit 16f3dcc.
Resolves #15731
Arcade-validation test build