maui
maui copied to clipboard
(App Name).build.appxrecipe" does not exist. You may need to build your project
Description
Unable to run the MAUI winUI app.
Always giving the error as "DEP1700: The recipe file "C:\Projects\MauiApp2\MauiApp2\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\MauiApp2.build.appxrecipe" does not exist. You may need to build your project. MauiApp2 " And my launch settings looks like this:
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
},
"Profile 1": {
"commandName": "Executable",
"nativeDebugging": true
}
}
}
And the .csproj file looks like this :
<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>MauiApp2</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>MauiApp2</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.mauiapp2</ApplicationId>
<ApplicationIdGuid>3aac4806-6dd2-4fd2-aa7f-8cdc9d9ed172</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
app.manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MauiApp2.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
Steps Followed:
- Clean
- Rebuild
- Removed bin and obj
- Changes "commandName": "MsixPackage", to "commandName": "Package", which gives the different error
I have not done any changes in the MAUI project. Just created new MAUI project and try to run with code changes. Still not working.
Steps to Reproduce
Create a new MAUI app and run targeting the Windows platform
Link to public reproduction project repository
No response
Version with bug
7.0.92
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
Unable to find some workaround
Relevant log output
DEP1700: The recipe file "C:\Projects\MauiApp2\MauiApp2\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\MauiApp2.build.appxrecipe" does not exist. You may need to build your project.
1>Deployment of the application to the target device failed.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
========== Elapsed 00:00.424 ==========
Hi @AnithaRaniT. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@Eilon Here is the code sample.
Reproducing steps: -Download the code -Extract the file -Select the target platform for windows -Run the Windows Machine
Output:
DEP1700: The recipe file "C:\Projects\MauiApp2\MauiApp2\bin\Debug\net7.0-windows10.0.19041.0\win10-x64\MauiApp2.build.appxrecipe" does not exist. You may need to build your project. MauiApp2
My System Configuration:
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Could you please provide some work around for this? My work got blocked.
Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0. This issue does not repro on Windows 11 .NET 7 and .NET 8 with provided Project: MauiApp2.zip
Hi @AnithaRaniT. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@XamlTest Please find the Screenshots. I already tried in the latest preview version of Visual Studio. Still I see the issue.
@AnithaRaniT We cannot repro the issue with your project in our side, could you try to move your project directory to a different disk drive without encryption and try again?
Hello @XamlTest I tried that as well. I still see the same issue. I installed the Enterprise edition of Visual Studio. And there also the same.
@AnithaRaniT I have encountered the issue, but it seems not stable.
Related to the https://github.com/dotnet/maui/issues/13085
Seems the issue is closed with no further update. And it's reported 6 months ago. How to track that in that case? Or is there any way can re-open that? Any suggestions?
I am getting the same error using .net 8 RC1 and VS2022 17,8 Preview 2.
does anyone have a work around
@dgerding and @Fred-Hudson-CST This might be the certificate issue in the windows platform. Target your solution to the windows platform and create your own certificate for windows with the publisher name and password. And then try to run in the windows machine. It works.
@AnithaRaniT thanks for the response, what ended up working for me was creating a new solution in place and then moving my project into the new solution ... i could identify no changes to any of the configuration files or code but just copy pasting to a new solution worked for some reason
Same issue here. I'm running on Windows 10, VS 17.7.5. Targeting Yesterday my app was working, today I tried to integrate MudBlazor components and got that error. Initially I thought I messed up the config somehow, but the issue persists after git stash.
@Fred-Hudson-CST copying the existing projects in a new solution didn't work, same error @AnithaRaniT can you share a bit more please? How do I create my own certificate and why do I need certificate to debug the project?
After almost 4 hours of reading, attempting new solutions, new projects, several manual VS cache clears ( almost deleted the whole vs folder by accident ) I finally solved it, by simply pushing my changes and making a fresh repo clone.
@achobanov its such a strange failure mode, it seems that the 3 of us all found unrelated solutions that did not work in the other cases. makes it very difficult to know what to do when the error presents ... will try re cloning the repo next time i encounter this because that is much easier than what i did to fix it.
Indeed. Not looking forward to encountering that again, lol. Feels bad when not yet mature tooling steps in the way.. but then MAUI allows us to do amazing stuff, so it's worth in the end.
Seriously? there is no solution so i just redo the project? that sucks man
@Hassan-Abdulbaqi it seems to be some sort of bug/immaturity of the platform. These things happen, MAUI is very ambicious
qUalIty 🤡
This sounds like something was blocking VS for creating/reading the recipe. Are folks still hitting this?
Hi @AnithaRaniT. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This sounds like something was blocking VS for creating/reading the recipe. Are folks still hitting this?
Yes ! New to C#, .Net and MAUI; Visual Studio 17.8, .NET 8.0 . Upgraded from VS 17.6 to 17.8 and started getting it again (dont recall how it 'vanished' last time but I got it a few days back too)
Just moving the new solution to a new folder also doesnt seem to fix it
Hey, I just ran into the same problem after upgrading to the latest Visual Studio 17.8.0 release. Project is a Maui Blazor-Hybrid-App.
I could "fix" it by cloning the repo again. Now everything works as usual.
@mattleibow We are also running into this with VS 17.8, .NET 8. No fixes mentioned here have worked.
I've added <OutputType>Exe</OutputType> to the csproj and now it works again.
Same issue for me after upgrading to 17.8 on my .NET 7 MAUI project. Changing <OutputType>Launch</OutputType> to Exe in csproj corrected the issue.
Upgraded my MAUI project from .NET 6.0 to 8.0 today along with 17.8 Visual studio, same issue persists. Changing Launch to Exe in csproj did not work.