-
Notifications
You must be signed in to change notification settings - Fork 564
Closed
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
Milestone
Description
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
.NET 7, VS 2022 17.4. 17.5 P2
Description
.NET 7's $(AndroidJavaSource) is great for simplifying several binding tasks. However, while it compiles on a build, the .cs files it generates do not get added to the files used by IntelliSense, and thus trying to consume the bindings is difficult because they do not show up in IntelliSense dropdowns and show as errors in the editor.
Looking at a design time build, this appears to be because they are never added to @(Compile) which is used by <Csc>:

For comparison, it appears we add Resources.designer.cs to @(Compile) when $(ManagedDesignTimeBuild)' == 'True'.
Steps to Reproduce
dotnet new android- Add a
.javafile to the project - Attempt to consume the generated binding in the project
Minimal test case:
AndroidApp2.zip
Did you find any workaround?
No response
Relevant log output
No response
jonathanpeppers, mohachouch, jpobst, brunck, thisisthekap and 2 more
Metadata
Metadata
Assignees
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
