maui
maui copied to clipboard
Debug build works for android maui8 but release doesnt compile because file is being used by another process
Description
When i compile in debug my maui 8 app compiles and runs - when i try and compile from the command line using debug it also works but when i try and compile from command line for release it fails:
dotnet build -c Release -f net8.0-android -bl REDACTED.csproj
I get 9 different errors (all the same error but 9 different xaml files mentioned)
The process cannot access the file 'C:\share\repomike\REDACTED\obj\Release
\net8.0-android\REDACTED.dll' because it is being used by another process. [C:\share\repomike\REDACTED\REDACTED.csproj::TargetFramework=net8.0-android]
When i open the msbuild.binlog I get the following also: Views\HelpPage.xaml The process cannot access the file 'C:\share\repomike\BellMinderProCell\obj\Release\net8.0-android\BellMinderPro.dll' because it is being used by another process. [C:\share\repomike\BellMinderProCell\bellminderpro.csproj]
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.10 SR3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
I have no work around - at this stage i cannot release the application.
Relevant log output
see above
cc @jonathanpeppers
Can you share a .binlog of the failure? https://aka.ms/binlog
From the info above, I can't tell what MSBuild target or task the error is coming from. There should also be a C# stacktrace of some kind?
@jonathanpeppers do you have an email address i can send it to as there is a lot of information in that file and would rather not have that on public website.
Hi @jonathanpeppers - I have emailed the file to you -thx
This this the XamlCTask, so a general MAUI issue:
(It's complaining about the project's .dll file)
@michaelonz do you have some antivirus enabled? Can you exclude the source folder where this project is?
This solved my @jonathanpeppers - disabling the virus checker for that folder
@michaelonz which antivirus software caused it?
@jonathanpeppers - I went into totalav and added a rule to exclude the root of the solution folder and the problem went away.
I guess this is: https://totalav.com/
And with that, I think this issue is resolved. Thanks all!