I'm trying to make it slightly easier to install the needed requirements, and add some validation if a user hasn't installed the requirements.
Also, I validated that these instructions still work for Ubuntu 24.04 and have noted that other installs are only community-supported.
This is a small workaround to allow developers working on Mac the
ability to generate .dSYM bundles as part of inner-loop development,
instead of the unsupported .dwarf files that are generated by default.
A full solution to use .dSYM bundles everywhere on Mac, including
packaging and symbol indexing, is tracked by
https://github.com/dotnet/runtime/issues/92911.
To build .dSYM bundles instead of .dwarf files, invoke build.sh as
follows:
```bash
./build.sh --subset clr --cmakeargs "-DCLR_CMAKE_APPLE_DSYM=TRUE"
```
- Only create one .NET install layout to be shared by all host tests
- Add `pretest.proj` for `host.pretest` subset that builds all test project assets and creates the single .NET install layout
- Fix `NativeHostApis` tests that were editing the .NET install layout directly (instead of creating a copy to edit)
- Remove some unnecessary copying/creating of SDKs and frameworks by sharing the fixture across tests
- Update host testing doc with simpler setup instructions and more details around investigating test failures
- Delete build infrastructure around test project asset restore
- Remove requirement that packs must be built before running host tests
- Building packs was only necessary to support directing the restore/build for the test project assets to the built packs
* Allow using VS to run host tests when libraries use different config
When building the host tests from VS, there are dependencies on projects from the libraries subset. If the libraries are prebuilt with different configuration (typically `Release`) the build in VS breaks because it can't find the project's output.
This change modifies the import of generators (which are the problematic projects) to let them override the configuration of the referenced projects.
It then adds the ability to set environment based on the `-lc` parameter to the build script when starting VS.
Also updates the doc to describe how to use this.
* Update eng/build.ps1
Co-authored-by: Elinor Fung <elfung@microsoft.com>
* Update eng/generators.targets
* Move ShouldUnsetParentConfigurationAndPlatform to repo's Directory.Build.props
---------
Co-authored-by: Elinor Fung <elfung@microsoft.com>
* Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement
Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html
Please review and merge this PR to complete the process of onboarding to the new service.
* Deleting fabricbot.json
* Update repo documentation that referenced FabricBot
---------
Co-authored-by: dotnet-policy-service[bot] <123482357+dotnet-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
* Update CI Know issue template to point to helper page and update docs
* Delete .github/ISSUE_TEMPLATE/04_ci_known_issue.yml
* Rename 05_blank_issue.md to 04_blank_issue.md
* Update failure-analysis.md
- Remove all IBC comments from the vm portion of the codebase
- Remove `m_GenericTypeDefToCanonMethodTableMap` and `m_MehtodDefToPropertyInfoMap` which were only filled in by NGen
- Remove a variety of flags enums which are never used
- Remove infra for testing Zap and IBC scenarios
- Remove ZapDisable as @egorbo suggested
When recording a new AOT profile for .NET MAUI apps running on Android,
we noticed that System.Reflection.Emit work was being done on a
background thread. The call seen in `dotnet-trace` output:
11.32ms microsoft.extensions.dependencyinjection!Microsoft.Extensions.DependencyInjection.ServiceLookup.ILEmitResolverBuilder.GenerateMethodBody(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite,System.Reflection.Emit.ILGenerator)
.NET Android apps are unique in that there is a JIT,
`RuntimeFeature.IsDynamicCodeCompiled` is true, System.Reflection.Emit
is possible -- S.R.E is however, not great for startup performance.
Starting threads on Android during startup can also be slow, as Android
will commonly put all but a single core to sleep for battery saving
purposes. We try to avoid starting threads on startup for "hello world"
applications on Android.
To solve this for now, introduce a new feature flag:
Microsoft.Extensions.DependencyInjection.DisableDynamicEngine
Which, we will provide a value in either the Android or .NET MAUI
optional workload via an MSBuild property. To test, I put this in my
app's `.csproj` file:
<RuntimeHostConfigurationOption Include="Microsoft.Extensions.DependencyInjection.DisableDynamicEngine"
Condition="'$(DisableDynamicEngine)' != ''"
Value="$(DisableDynamicEngine)"
Trim="true" />
Customers *could* opt to change this flag, but we don't think it will
particularly useful. An example of services realized by .NET MAUI at
startup, via some logging added:
08-25 13:21:55.647 16530 16530 I DOTNET : RealizeService called: System.Collections.Generic.IEnumerable`1[Microsoft.Maui.Hosting.IMauiInitializeService]
08-25 13:21:55.664 16530 16530 I DOTNET : RealizeService called: System.Collections.Generic.IEnumerable`1[Microsoft.Maui.Hosting.IMauiInitializeScopedService]
08-25 13:21:55.665 16530 16530 I DOTNET : RealizeService called: Microsoft.Maui.Dispatching.IDispatcher
08-25 13:21:55.668 16530 16530 I DOTNET : RealizeService called: System.Collections.Generic.IEnumerable`1[Microsoft.Maui.LifecycleEvents.LifecycleEventRegistration]
08-25 13:21:56.057 16530 16530 I DOTNET : RealizeService called: System.Collections.Generic.IEnumerable`1[Microsoft.Maui.Hosting.HandlerMauiAppBuilderExtensions+HandlerRegistration]
08-25 13:21:56.115 16530 16530 I DOTNET : RealizeService called: Microsoft.Extensions.DependencyInjection.IServiceScopeFactory
08-25 13:21:56.670 16530 16530 I DOTNET : RealizeService called: Microsoft.Maui.Controls.HideSoftInputOnTappedChangedManager
08-25 13:21:56.712 16530 16530 I DOTNET : RealizeService called: System.Collections.Generic.IEnumerable`1[Microsoft.Maui.Hosting.ImageSourcesMauiAppBuilderExtensions+ImageSourceRegistration]
08-25 13:21:57.700 16530 16530 I DOTNET : RealizeService using S.R.E: Microsoft.Maui.Controls.HideSoftInputOnTappedChangedManager
`HideSoftInputOnTappedChangedManager` would be realized once per page,
which would not be a huge payoff to use S.R.E for. So the only way the
S.R.E codepath could be useful on Android would be if the customer is
registering lots of services themselves. They might be better off just
using `new()` in that case?
An example of the startup time Android reports with the new flag on/off:
DisableDynamicEngine=false
08-25 14:31:37.462 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +733ms
08-25 14:31:39.394 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +737ms
08-25 14:31:41.326 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +730ms
DisableDynamicEngine=true
08-25 14:32:20.233 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +724ms
08-25 14:32:22.137 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +727ms
08-25 14:32:24.042 2090 2330 I ActivityTaskManager: Displayed com.companyname.testmaui/crc643c09abdeec717b83.MainActivity: +716ms
This was a `dotnet new maui` project, using dotnet/maui/main on a Pixel
5 device.
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>