-
Notifications
You must be signed in to change notification settings - Fork 527
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
CS1504 with AndroidBoundLayout when building with .NET 8 SDK #8516
Comments
@rgroenewoudt have you tried deleting the bin and obj directories and completely rebuilding? |
@dellis1972 Of course, no difference. |
This might be related to dotnet/sdk#34438 |
Yup, I think there was a change in the SDK which caused this. |
Are there tests missing for building a project with AndroidBoundLayout? |
@rgroenewoudt not on the .net android side, we have a number of tests which check that this works. Thats how we found the fix which went into 2b0761b |
The workaround It might be worth it to have a test for building the previous version with the latest SDK. |
@jonpryor this is the |
Looks like its related to SourceLink? https://github.com/dotnet/sourcelink/blob/f9585b334d71b93b3fb7d0023957b538b6b72360/docs/README.md?plain=1#L58 |
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
VS 2022 17.8
Description
After upgrading to VS2022 17.8, I cannot build my .NET 7 Android app anymore. Same issue with
dotnet build
.For every Android layout file with build action 'AndroidBoundLayout', I'm getting the build error:
project\obj\Debug\net7.0-android33.0\generated\Binding.About.g.cs(27,11): error CS1504: Source file 'Resources\Layout\About.xml' could not be opened -- Could not find file.
The generated .cs file contains code
#line 2 "Resources\Layout\About.xml"
which seems to break compiling.Steps to Reproduce
Use .NET 8 SDK to build a project with AndroidBoundLayout file.
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: