Skip to content

[msbuild] Use MSBuild assemblies from NuGet instead of Mono's installation.#21471

Merged
rolfbjarne merged 2 commits intomainfrom
dev/rolf/msbuild-assemblies-from-nuget
Oct 23, 2024
Merged

[msbuild] Use MSBuild assemblies from NuGet instead of Mono's installation.#21471
rolfbjarne merged 2 commits intomainfrom
dev/rolf/msbuild-assemblies-from-nuget

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

Use MSBuild assemblies from NuGet instead of Mono's installation. Try to get
the closest version to Mono's assemblies.

This avoids a Mono dependency.

…ation.

Use MSBuild assemblies from NuGet instead of Mono's installation. Try to get
the closest version to Mono's assemblies.

This avoids a Mono dependency.
Comment on lines +31 to +34
<PackageReference Include="Microsoft.Build" Version="15.1.548" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.548" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.1.548" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.548" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rolfbjarne Any reason to not use latest version? I am just concerned that we may bring security issues this way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we need to keep the old versions at this point. I think we could try bumping to newer ones and test it. What do the task assemblies depend on?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying with the latest, let's see what CI says.

@emaf what's the latest desktop TFM that works in VS? Can we use "net4.8.1" or do we have to use something older?

I'm asking because we're building for netstandard2.0 in some of the projects, and that results in this warning:

warning NU1701: Package 'Microsoft.Build 17.11.4' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emaf Looks like using the latest versions is fine, but note that we're not running any tests from within VS, so if this breaks VS on Windows, our tests won't detect it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the build agent does not directly interact with VS, it should not make any difference. I gave this a quick try and seems to work fine.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

.NET (No breaking changes)

✅ API diff vs stable

.NET (No breaking changes)

ℹ️ Generator diff

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

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

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

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 101 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 (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 3 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 40 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 7 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 7 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 5e25d787f73449d1e32ef2ad16c26352238c5fa7 [PR build]

@rolfbjarne rolfbjarne merged commit 71a29e3 into main Oct 23, 2024
@rolfbjarne rolfbjarne deleted the dev/rolf/msbuild-assemblies-from-nuget branch October 23, 2024 19:10
dalexsoto added a commit that referenced this pull request Nov 20, 2024
dalexsoto added a commit that referenced this pull request Nov 21, 2024
… instead of Mono's installation. (#21471)" (#21670)

This reverts commit 71a29e3.

This seems to be breaking windows see:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2304182
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.

7 participants