-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Debug for Windows App Fails Deployment: Need recipe file #2493
Comments
Same issue here - tried everything, nothing worked so far |
Oddly, if you comment out both the <PropertyGroup>
<TargetFramework>net6.0-windows10.0.19041</TargetFramework>
<!-- <TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks> -->
<!-- <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>MauiArgh3</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<!-- Display name -->
<ApplicationTitle>MauiArgh3</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.MauiArgh3</ApplicationId>
<!-- Versions -->
<ApplicationVersion>1.0</ApplicationVersion>
<AndroidVersionCode>1</AndroidVersionCode>
<!-- Required for C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
</PropertyGroup> |
@markrendle: Haha, first thought no, that is too weird, but could reproduce it, also works for me. So maybe a bug in csproj processing? |
This is a bug in Visual Studio. While you have either Android or iOS selected as the device to deploy to, it still has "Windows Machine" (The WinUI project) internally selected and tries to deploy to it. Since the Framework is still net6-ios or net6-android, MAUI can't generate the needed recipe files for it to deploy, hence "Need recipe file". This can happen even if you have the windows TFM added as well. If you select "Windows Machine" and then select the Android or iOS device again, it should fix itself. You can also remove the launchProfile.json in the Properties folder as well. The underlying bug is being tracked internally and should be fixed for the next preview of VS 2022. The other way you can hit this is if you don't have the Windows TFM added and selected. If you select "Windows Machine" but don't select "net6.0-windows10.0.19041" as the runtime, it will throw with "Need recipe file". To fix this, uncomment the TargetFrameworks line in the csproj, select the Windows TFM, and then select "Windows Machine". It should deploy now. |
@drasticactions: Thanks for the answer, took me a bit to understand it so for others you need to select windows in two places. Should I close this now, or when it is fixed in visual studio? |
Hello. I was going on with the same issue. The solution works, but in the examples templates, the EnablePreviewMsixTooling was removed, which keeps producing the "need receipt." To fix that if it's case of anyone just add in the first property group |
My csproj didn't have net6 for windows, so I added it to target frameworks and everything works fine.
|
As @BillyMartin1964 said this works fine, just update the target frameworks in your csproj to this and make sure the framework is set to windows and it should work |
It's still reproducible in VisualStudio 2022 Preview5 |
Yes. I am facing it as well. I am using preview 5.0 |
You have to Edit project file and Uncomment this line it's working for me (Dont forgot to activate Developper Mode) |
Have you installed this extension yet? https://marketplace.visualstudio.com/items?itemName=ProjectReunion.MicrosoftSingleProjectMSIXPackagingToolsDev17 In Preview 5 this is still a separate extension, but will eventually be in the box and automatically installed. |
If the emulator does not appear after launching as a desktop app, reload the project. |
Could anyone please confirm if they are still able to reproduce this with the latest VS 17.1 Preview 2.0 or 3.0 and MAUI Preview 11 or Preview 12? We believe this is fixed. |
Hi, we think this issue has been fixed in more recent previews of .NET MAUI and Visual Studio. Please try installing the latest preview per the instructions at https://docs.microsoft.com/dotnet/maui/get-started/installation. If you are still experiencing an issue, please file a new issue with updated details. |
Description
Steps to Reproduce
I also tried to install Project Reunion but did not fix the problem.
Expected Behavior
The Windows App Starts
Actual Behavior
A Error appears that Deployment Failed and the output only says Need recipe file
Basic Information
The text was updated successfully, but these errors were encountered: