Open datvm opened 5 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Can repro this issue on the latest 17.11.0 Preview 1.1(8.0.21&8.0.40).
@jonathanpeppers Would this be an issue with the Android SDK?
@samhouts I removed the area-blazor label intentionally. It's not a blazor issue 👍
This is happening to me too. I thought I misconfigured something.
This all of the sudden began happening to both my mac and windows machines when trying to build release for android. However this issue has been opened for a while. Did you manage to fix this somehow @datvm ?
@Khongchai unfortunately not. This is some issue with MAUI. For us, we had to change the code of the external library so that we can use another file name. I know this may not be helpful for everyone.
@mkArtakMSFT is it happening to MAUI in general? In that case I should rename the title to reflect it.
Hi, same for me ( if files with the first character '.' exists in wwwroot then Release build crash. e.g. .gitignore, .prettier ).
Full message :
C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.138\targets\Microsoft.Android.Sdk.ILLink.targets(34,11): error MSB4186: Invalid static method invocation syntax: "[System.String]::Copy().StartsWith ('Xamarin.AndroidX.')". Method 'System.String.Copy' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order.
After it was removed, compiled without problems.
Hi, same for me ( if files with the first character '.' exists in wwwroot then Release build crash. e.g. .gitignore, .prettier ).
Wow that really is what's failing my build. Thanks @SequPL
Btw I added this to my csproj instead of removing .prettierrc
and .gitignore
<ItemGroup>
<Content Remove="wwwroot\.prettierrc" />
<Content Remove="wwwroot\.gitignore" />
</ItemGroup>
Description
When compile a MAUI Blazor project for Android in Release build, if there is a file like
.init
inwwwroot
file, it fails with the following message:Renaming/removing the file would make the error go away but sometimes it's not an option.
This is my workload because I am not sure which to pick from the list:
Steps to Reproduce
wwwroot
folder and name it something like.init
.dotnet build -f:net8.0-android -c:Release
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response