-
Notifications
You must be signed in to change notification settings - Fork 538
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
Support Visual Studio "Build Acceleration" #9042
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonathanpeppers
approved these changes
Jun 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how we'd write a test. We'd have to try this in VS and watch the "fast up to date" check's logging window...
...amarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets
Show resolved
Hide resolved
Fixes dotnet#8581 The Visual Studio FastUpdate check flags the Resource Designer assembly as newer than the output assembly (which it is). But it causes it to incorrectly think the build is out of date. ``` WARNING: Potential build performance issue in 'Foo.csproj'. The project does not appear up-to-date after a successful build: Input ResolvedCompilationReference item 'obj\Debug\net8.0-android\_Microsoft.Android.Resource.Designer.dll' (2023-12-11 11:34:12.546) has been modified since the last successful build started ``` So lets remove it. We MUST remove the item from the @ReferencePathWithRefAssemblies ItemGroup BEFORE the CollectResolvedCompilationReferencesDesignTime target runs. This is because that target uses the Returns functionality. It turns out you cannot modify the ItemGroup that is being returned via a Returns on a target. Unfortunately there isn't a way to unit test this since the Fast Update check ONLY runs in Visual Studio. The targets do not even exist on the command line.
grendello
added a commit
that referenced
this pull request
Jun 27, 2024
* main: Bump to dotnet/android-tools@9674590 (#9036) Bump to dotnet/android-libzipsharp@de57dccb (#9010) [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042) Bump to dotnet/sdk@ea9243f9cb 9.0.100-preview.7.24323.5 (#9031) Fix places still pointing to xamarin/xamarin-android (#9050) [xaprepare] skip download progress for `dotnet-install` script (#9053) $(AndroidPackVersionSuffix)=preview.7; net9 is 34.99.0.preview.7 (#9052)
jonathanpeppers
pushed a commit
that referenced
this pull request
Jul 1, 2024
Fixes: #8581 Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2051915 Context: /~https://github.com/dotnet/project-system/blob/9c9efad1d986e38232cbd74bec9dbd794883a91c/docs/build-acceleration.md Context: /~https://github.com/dotnet/project-system/blob/dd9431b535a6158060d7ab64597276eb2c354aab/docs/design-time-builds.md#targets-that-run-during-design-time-builds Context: /~https://github.com/dotnet/project-system/blob/dd9431b535a6158060d7ab64597276eb2c354aab/docs/up-to-date-check.md#default-inputs-and-outputs Context: /~https://github.com/dotnet/project-system/blob/dd9431b535a6158060d7ab64597276eb2c354aab/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L448-L449 Context: dc3ccf2 The Visual Studio Fast Up-to-Date Check (FUTDC) flags `_Microsoft.Android.Resource.Designer.dll` (dc3ccf2) as newer than the output assembly (which it is). But this flagging also causes it to incorrectly think the build is out of date. WARNING: Potential build performance issue in 'Foo.csproj'. The project does not appear up-to-date after a successful build: Input ResolvedCompilationReference item 'obj\Debug\net8.0-android\_Microsoft.Android.Resource.Designer.dll' (2023-12-11 11:34:12.546) has been modified since the last successful build started. Fix this by removing `_Microsoft.Android.Resource.Designer.dll` from the list of files checked. To do so, we *must* remove the item from the `@(ReferencePathWithRefAssemblies)` item group *before* the [`CollectResolvedCompilationReferencesDesignTime`][0] target runs. This is because that Target uses the [`Returns` attribute][1]; it turns out you cannot modify the ItemGroup that is being returned via the `Returns` attribute on a target. Unfortunately there isn't a way to unit test this since the Fast Update check *only* runs in Visual Studio. The targets do not even exist on the command line. [0]: /~https://github.com/dotnet/project-system/blob/dd9431b535a6158060d7ab64597276eb2c354aab/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L448-L449 [1]: https://learn.microsoft.com/visualstudio/msbuild/target-element-msbuild?view=vs-2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8581
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2051915
Context
The Visual Studio FastUpdate check flags the Resource Designer assembly as
newer than the output assembly (which it is). But it causes it to incorrectly
think the build is out of date.
So lets remove it. We MUST remove the item from the @ReferencePathWithRefAssemblies
ItemGroup BEFORE the CollectResolvedCompilationReferencesDesignTime target runs.
This is because that target uses the Returns functionality. It turns out you cannot
modify the ItemGroup that is being returned via a Returns on a target.
Unfortunately there isn't a way to unit test this since the Fast Update check
ONLY runs in Visual Studio. The targets do not even exist on the command line.