maui icon indicating copy to clipboard operation
maui copied to clipboard

VS 17.3.4 Breaks Android build with - Manifest file at 'obj\Debug\net6.0-android\android-arm\staticwebassets.build.json' not found

Open jordanwilcox opened this issue 3 years ago β€’ 48 comments

Description

Since updating to VS 17.3.4 I can't build any MAUI Android projects on my machine.

I have verified this on two devices running VS - before updating to VS 17.3.4 it was building ok - post update to 17.3.4 the build errors show for android.

I am unable to verify if this affects iOS but the build errors seem to point only at android.

This is happening on dotnet --version 6.0.401

Steps to Reproduce

  1. Update to VS 17.3.4
  2. Create a brand new MAUI project (I used MAUI blazor for testing)
  3. Attempt a build
  4. Fails

Link to public reproduction project repository

https://github.com/jordanwilcox/maui-build-error-android-17.3.4

Version with bug

SDK 6.0.401

Last version that worked well

SDK 6.0.400

Affected platforms

Android

Affected platform versions

All android platforms

Did you find any workaround?

Workaround found by @cupsos by changing global.json in solution to sdk version 6.0.400

Relevant log output

1>C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(680,7): error : Manifest file at 'obj\Debug\net6.0-android\android-arm\staticwebassets.build.json' not found.
1>C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(680,7): error : Manifest file at 'obj\Debug\net6.0-android\android-x86\staticwebassets.build.json' not found.
1>Done building project "MauiApp1.csproj" -- FAILED.
1>C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(680,7): error : Manifest file at 'obj\Debug\net6.0-android\android-x64\staticwebassets.build.json' not found.
1>Done building project "MauiApp1.csproj" -- FAILED.
1>C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(680,7): error : Manifest file at 'obj\Debug\net6.0-android\android-arm64\staticwebassets.build.json' not found.
1>Done building project "MauiApp1.csproj" -- FAILED.

jordanwilcox avatar Sep 13 '22 22:09 jordanwilcox

Same issue here :(

peter-bozovic avatar Sep 14 '22 07:09 peter-bozovic

Closing VS, deleting bin and obj folder works for the first build, then the error appears again

GioviQ avatar Sep 14 '22 07:09 GioviQ

I'm on the same boat.

If you want to use VS 17.3.4 with MAUI now, try this.

  1. Install SDK 6.0.400
  2. Specify SDK version as 6.0.400 at global.json
{
    "sdk": {
        "version": "6.0.400"
    }
}

Maybe SDK issue?


Edit:

Windows update KB5017915 pushing SDK 6.0.400 to 6.0.401 and will not work above. Do not install KB5017915 if you want keep 6.0.400.

I just tried SDK 6.0.304 but no luck.

For who can't find 6.0.400 Animation

cupsos avatar Sep 14 '22 07:09 cupsos

Same issue. Uninstalled 17.3.4 and installed 17.3.2 again and now it's totally bricked. Reinstalled 17.3.4, same errors again as @jordanwilcox stated in initial post.

Tried to install the 6.0.400 SDK and put it in the global.json but doesn't work.

Global.json was in the wrong directory for some reason. Works again now with 6.0.400

Also seems like it's rebuilding everytime you deploy to a local Android device. Takes ages to test things. Edit: fast deploy was automatically disabled after the update...

jessestr avatar Sep 14 '22 10:09 jessestr

But SDK has been correctly updated from Visual Studio. No need to do separete setup Immagine 2022-09-14 133225

Despite the build errors, If I run the app, it works on Windows (Android not tested).

GioviQ avatar Sep 14 '22 11:09 GioviQ

Same issue! :/

hamedhajiloo avatar Sep 14 '22 12:09 hamedhajiloo

Having this issue, too...

stimm4711 avatar Sep 14 '22 12:09 stimm4711

same here :(

mhrastegari avatar Sep 14 '22 12:09 mhrastegari

same here rolling back to previous version this crazy

ltemimi avatar Sep 14 '22 14:09 ltemimi

I'm on the same boat.

If you want to use VS 17.3.4 with MAUI now, try this.

  1. Install SDK 6.0.400
  2. Specify SDK version as 6.0.400 at global.json
{
    "sdk": {
        "version": "6.0.400"
    }
}

Maybe SDK issue?

Helped me! Just needed to add the global.json in the solution folder to use the SDK version 6.0.400. Thanks.

stimm4711 avatar Sep 14 '22 15:09 stimm4711

I'm on the same boat.

If you want to use VS 17.3.4 with MAUI now, try this.

  1. Install SDK 6.0.400
  2. Specify SDK version as 6.0.400 at global.json
{
    "sdk": {
        "version": "6.0.400"
    }
}

Maybe SDK issue?

Thank you this works for me too, I have updated the main ticket with this workaround to help others. 😊

jordanwilcox avatar Sep 14 '22 16:09 jordanwilcox

It's already 6.0.401 :) if you follow the link !

GreatIdeaz avatar Sep 14 '22 19:09 GreatIdeaz

It's already 6.0.401 :) if you follow the link !

Yeah, can't find 6.0.400, hope it gets fixed soon

danfer avatar Sep 14 '22 20:09 danfer

Ok guys, for the meantime, I was able to make it to work, just did a search for file staticwebassets.build.json and found it at folder net6.0-android, so just copied it at folders where building was breaking and now it is working, cheers.

danfer avatar Sep 14 '22 20:09 danfer

It works. Thank you.

Haichen-Dong avatar Sep 14 '22 21:09 Haichen-Dong

Ok guys, for the meantime, I was able to make it to work, just did a search for file staticwebassets.build.json and found it at folder net6.0-android, so just copied it at folders where building was breaking and now it is working, cheers.

I found the 6.0.400 SDK at a different website third-party but it still did not work for me. This workaround did, however.

Here's the link to the third-party site in case someone gets any use out of it: https://versionsof.net/core/6.0/6.0.8/

ibanks42 avatar Sep 15 '22 01:09 ibanks42

obj\Debug\net6.0-android\staticwebassets.build.json Copy obj\Debug\net6.0-android\android-arm64\staticwebassets.build.json

dsuny avatar Sep 15 '22 06:09 dsuny

tried both the sdk and the file copy one. it still complains about missing dependencies now

TrabacchinLuigi avatar Sep 15 '22 08:09 TrabacchinLuigi

The problem still remains!

What is this ridiculous game? No one from Microsoft has replied, please answer :/

hamedhajiloo avatar Sep 15 '22 10:09 hamedhajiloo

Same issue here

matheusjulio96 avatar Sep 15 '22 17:09 matheusjulio96

The same issue

MargaritaLoseva avatar Sep 15 '22 19:09 MargaritaLoseva

Same issue here.

KieranDevvs avatar Sep 15 '22 23:09 KieranDevvs

Same issue here.

isaac-borrero avatar Sep 15 '22 23:09 isaac-borrero

Same issue here

xiangnanscu avatar Sep 16 '22 00:09 xiangnanscu

EDIT: Actually, other errors appeared a few builds later, but removing then re-adding the Nugets helped getting the Solution to build Updating Solution's Nuget Packages is the only thing momentarily that worked for me. Notes:

  • I was getting that Android error when trying to build for iOS Simulator!?
  • Visual Studio for Mac (Preview)

l3bel avatar Sep 16 '22 02:09 l3bel

this work for me, download & install sdk 6.0.400 https://download.visualstudio.microsoft.com/download/pr/9a1d2e89-d785-4493-aaf3-73864627a1ea/245bdfaa9c46b87acfb2afbd10ecb0d0/dotnet-sdk-6.0.400-win-x64.exe

rename sdk 6.0.401 in C:\Program Files\dotnet\sdk Screenshot_164

transnity avatar Sep 16 '22 06:09 transnity

Updated nuget packages still won't work. Seem to me that it's related to project dependencies or MAUI + Blazor. i managed to build a MAUI project that is not MAUI + Blazor and don't have references to other projects even without Global.json modifications. (i can see the line You are using a preview version of .NET so probably it's using 7.0.100-preview.7 which is the latest preview available in my machine)

TrabacchinLuigi avatar Sep 16 '22 06:09 TrabacchinLuigi

this work for me, download & install sdk 6.0.400 https://download.visualstudio.microsoft.com/download/pr/9a1d2e89-d785-4493-aaf3-73864627a1ea/245bdfaa9c46b87acfb2afbd10ecb0d0/dotnet-sdk-6.0.400-win-x64.exe

rename sdk 6.0.401 in C:\Program Files\dotnet\sdk Screenshot_164

Thanks, that fixed it for me !

HarryLobster avatar Sep 16 '22 13:09 HarryLobster

Same issue. Trying to be productive with Maui/Blazor is tedious.

I renamed 6.0.401 sdk to bak_6.0.401 and am able to run without doing anything else.

acxsasx avatar Sep 16 '22 13:09 acxsasx

@acxsasx Give it two years, all new MS products are sketchy at the start, look at .NET core for example.

KieranDevvs avatar Sep 16 '22 14:09 KieranDevvs