maui icon indicating copy to clipboard operation
maui copied to clipboard

Debug build works for android maui8 but release doesnt compile because file is being used by another process

Open michaelonz opened this issue 1 year ago • 6 comments
trafficstars

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

michaelonz avatar Apr 15 '24 10:04 michaelonz

cc @jonathanpeppers

jsuarezruiz avatar Apr 15 '24 14:04 jsuarezruiz

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 avatar Apr 15 '24 14:04 jonathanpeppers

@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.

michaelonz avatar Apr 16 '24 00:04 michaelonz

Hi @jonathanpeppers - I have emailed the file to you -thx

michaelonz avatar Apr 16 '24 01:04 michaelonz

This this the XamlCTask, so a general MAUI issue:

image

(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?

jonathanpeppers avatar Apr 16 '24 14:04 jonathanpeppers

This solved my @jonathanpeppers - disabling the virus checker for that folder

michaelonz avatar Apr 22 '24 00:04 michaelonz

@michaelonz which antivirus software caused it?

jonathanpeppers avatar Apr 22 '24 13:04 jonathanpeppers

@jonathanpeppers - I went into totalav and added a rule to exclude the root of the solution folder and the problem went away.

michaelonz avatar Apr 23 '24 19:04 michaelonz

I guess this is: https://totalav.com/

jonathanpeppers avatar Apr 23 '24 20:04 jonathanpeppers

And with that, I think this issue is resolved. Thanks all!

jfversluis avatar May 06 '24 11:05 jfversluis