Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msbuild] Pass /p:RestoreConfigFile to 'dotnet build' in addition to 'dotnet restore'. #20008

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

rolfbjarne
Copy link
Member

Because apparently some packages are restored during the build, and not during restore.

Sample log:

FindAotCompiler
        Assembly = d:\AzDO\_work\3\s\xamarin-macios\tests\dotnet\Windows\bin\dotnet\packs\Microsoft.iOS.Sdk\17.2.9127-ci.pr.gh19944\\tools\msbuild\iOS\Xamarin.iOS.Tasks.dll
        Parameters
            RuntimeIdentifier = ios-arm64
            SessionId = 78de2a6cda9c8daebf9e6faac5b3b7dd8c8a555b6dafc35bd89e85458a078e87
            TargetFrameworkMoniker = .NETCoreApp,Version=v9.0,Profile=ios
        [... xma log output ...]
        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution started with arguments: restore /p:RestoreConfigFile=/Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/NuGet.config /bl:/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.binlog /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution finished (exit code = 0).

Checking the state of installed workloads...
[... workload install log output ...]
  Determining projects to restore...
  Restored /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj (in 2.12 sec).

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution started with arguments: build /p:OutputFilePath=/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/Output.txt /p:RuntimeIdentifier=ios-arm64 /t:ComputeAotCompilerPath /bl:/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.binlog /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution finished (exit code = 1).

        MSBuild version 17.10.0-preview-24076-01+e7a44d757 for .NET
  Determining projects to restore...
/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 9.0.0-preview.2.24076.4)
/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj : error NU1102:   - Found 15 version(s) in nuget.org [ Nearest version: 8.0.100-1.23067.1 ]
  Failed to restore /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj (in 608 ms).

Build FAILED.

…'dotnet restore'.

Because apparently some packages are restored during the build, and not during restore.

Sample log:

```
FindAotCompiler
        Assembly = d:\AzDO\_work\3\s\xamarin-macios\tests\dotnet\Windows\bin\dotnet\packs\Microsoft.iOS.Sdk\17.2.9127-ci.pr.gh19944\\tools\msbuild\iOS\Xamarin.iOS.Tasks.dll
        Parameters
            RuntimeIdentifier = ios-arm64
            SessionId = 78de2a6cda9c8daebf9e6faac5b3b7dd8c8a555b6dafc35bd89e85458a078e87
            TargetFrameworkMoniker = .NETCoreApp,Version=v9.0,Profile=ios
        [... xma log output ...]
        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution started with arguments: restore /p:RestoreConfigFile=/Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/NuGet.config /bl:/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.binlog /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution finished (exit code = 0).

Checking the state of installed workloads...
[... workload install log output ...]
  Determining projects to restore...
  Restored /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj (in 2.12 sec).

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution started with arguments: build /p:OutputFilePath=/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/Output.txt /p:RuntimeIdentifier=ios-arm64 /t:ComputeAotCompilerPath /bl:/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.binlog /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj

        Tool /Users/builder/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet execution finished (exit code = 1).

        MSBuild version 17.10.0-preview-24076-01+e7a44d757 for .NET
  Determining projects to restore...
/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 9.0.0-preview.2.24076.4)
/var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj : error NU1102:   - Found 15 version(s) in nuget.org [ Nearest version: 8.0.100-1.23067.1 ]
  Failed to restore /var/folders/cv/nscnn1lx1x5793d6mqhnh6480000gn/T/tmp50e7b53.tmp/ComputeAotCompilerPath.csproj (in 608 ms).

Build FAILED.
```
@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 2e2e057fdb529d8e5b1eac9ba50fbf198409c6e7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

Legacy Xamarin (No breaking changes)
  • iOS (no change detected)
  • tvOS (no change detected)
  • watchOS (no change detected)
  • macOS (no change detected)
NET (empty diffs)
  • iOS: (empty diff detected)
  • tvOS: (empty diff detected)
  • MacCatalyst: (empty diff detected)
  • macOS: (empty diff detected)

✅ API diff vs stable

Legacy Xamarin (No breaking changes)
.NET (No breaking changes)
Legacy Xamarin (stable) vs .NET

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 2e2e057fdb529d8e5b1eac9ba50fbf198409c6e7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 170 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ install-source: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 7 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac-binding-project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 6 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 41 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 2e2e057fdb529d8e5b1eac9ba50fbf198409c6e7 [PR build]

@rolfbjarne rolfbjarne merged commit 7704587 into xamarin:main Feb 7, 2024
77 checks passed
@rolfbjarne rolfbjarne deleted the msbuild-restore-build-as-well branch February 7, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants