maui
maui copied to clipboard
"DEP0600: Deployment failed. Exception - The stub received bad data." if the project name has at least 35 characters
Description
If a .NET 8.0 MAUI project name (.NET Maui App
or .NET Maui Blazor Hybrid App
) has at least 35 character in its name, after hitting the debug button Visual Studio will build the project and then an error window will appear saying:
The project needs to be deployed before we can debug. Please enable Deploy in the Configuration Manager.
The error in the output window will be:
DEP0600: Deployment failed. Exception - The stub received bad data.
The stub received bad data. [0x800706F7]
Tested in Visual Studio 17.8 with .NET 8.0 for Windows debugging.
Works fine when debugging using the Android emulator. Works fine also when selecting "Windows machine" if .NET 7.0 was selected during project creation. Not tested for other platforms.
Steps to Reproduce
- Create a new
.NET Maui App
or.NET Maui Blazor Hybrid App
project with a name which is at least 35 characters long (e.g.abcdefghijabcdefghijabcdefghijabcde
) - Select .NET 8.0 in the last screen
- Wait the project/solution to be initialized
- Make sure that the "Windows Machine" is selected
- Hit the F5 key
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
net8.0-windows10.0.19041.0
Did you find any workaround?
Use a project name with 34 characters or less
Relevant log output
No response
Further testing lead lead me to the problematic part: it's the ApplicationId
element in the .csproj
file. Changing it from:
<ApplicationId>com.companyname.abcdefghijabcdefghijabcdefghijabcde</ApplicationId>
to (removing the last letter):
<ApplicationId>com.companyname.abcdefghijabcdefghijabcdefghijabcd</ApplicationId>
then cleaning the solution and launching debug again solves the issue.
Then I tried adding an extra character to the companyname part:
<ApplicationId>com.companyname1.abcdefghijabcdefghijabcdefghijabcd</ApplicationId>
and the issue is back again.
So in fact it's not a 34 character limit on the project name, but a 50 character limit on the ApplicationId
element with a very obscure error message.
Nice, that was my issue too. It's a back end utility app I made for another project, and I basically kept the same name adding another part and that broke the limit.
Of course nothing was truly solved without deleting /bin and /obj folders, as usual.
Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Windows 11, not repro on Android 14.0-API34, iOS 17.0 and MacCatalyst with below Project: MauiAppTest123456789MauiAppTest12345.zip
This also was my issue today. I was starting in a new desktop app and wondering if MAUI was ready for real-world usage yet or if it still had gremlins in it and this was my first experience without any code changes. This helped me resolve the issue, but I'm not sure it's a good portent to continue down this path versus backtracking and going with WPF.
for me also length of applicationId caused the problem, removing some chararcters from it solved the issue
removing some chararcters from it solved the issue
Same. Though, I'd call it more of a work-around.