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

[dotnet] Enable generation of runtime configuration file #17840

Merged
merged 4 commits into from
Mar 23, 2023

Conversation

haritha-mohan
Copy link
Contributor

@haritha-mohan haritha-mohan commented Mar 17, 2023

Set the GenerateRuntimeConfigurationFiles (GRCF) property to true
to avoid warnings at build time + add test for change.

Diving deeper into the fix...

  • This warning only occurs with .NET apps which is why GRCF
    is only updated in the dotnet directory and not msbuild (legacy)
  • After examining the binlog (see issue), it was found that the GRCF
    was contingent upon the HasRuntimeOutput property, which is only
    defined for executable projects. And in this case, the user's project
    output type is library thus both the RuntimeOutput and consequently
    GRCF properties were not enabled.
  • By setting the GRCF to true we can address the original warning of
    concern while ensuring the rest of the projects's behavior is not altered
    in mysterious ways (i.e. by touching the RuntimeOutput property or the
    project output type instead, these changes could have extraneous effects).

Fixes #17543

Set the GenerateRuntimeConfigurationFiles property to be true to
avoid warnings at build time for users + add test for change.

Diving deeper into the fix...
- GRCF == GenerateRuntimeConfigurationFiles property
- This warning only occurs with .NET apps which is why the property is only
updated in the dotnet directory and not msbuild (legacy code)
- Diving deeper into the fix, after examining the binlog (in xamarin#17543),
it was found that the GRCF was contingent upon the
HasRuntimeOutput property, which is only defined for executable projects.
And in this case, the user's project output type is library thus both the
RuntimeOutput and consequently GRCF properties were not enabled.
- By setting the GRCF to true we can address the original warning of concern
while ensuring the rest of the projects's behavior is not altered in mysterious
ways (i.e. by touching the RuntimeOutput property or the project output
type instead, these changes could have extraneous effects).

Fixes xamarin#17543
@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

This comment has been minimized.

dotnet/targets/Xamarin.Shared.Sdk.props Outdated Show resolved Hide resolved
tests/dotnet/UnitTests/ProjectTest.cs Outdated Show resolved Hide resolved
Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

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

After Rolf's comments are addressed 👍

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
@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
Collaborator

💻 [CI Build] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [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: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [PR build]

@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: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [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 is empty

Pipeline on Agent
Hash: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1023.Ventura
Hash: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 1 tests failed, 224 tests passed.

Failures

❌ bcl tests

1 tests failed, 68 tests passed.
  • mscorlib Part 2/tvOS - simulator/Debug: Crashed

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 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 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 25 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: c188edac3a6f8bebfeb2dc61ba541c3e5d36832d [PR build]

@haritha-mohan
Copy link
Contributor Author

Test failure is unrelated (https://github.com/xamarin/maccore/issues/2450).

@haritha-mohan haritha-mohan merged commit 3dff232 into xamarin:main Mar 23, 2023
@haritha-mohan haritha-mohan deleted the project-warning branch March 23, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants