I have an ASP.NET Core 7.0 web project (C#) that I publish to an Azure App Service. It has been working fine, until a bad surprise happened.
I published the project, and it I was greeted with this error:
App: C:\home\site\wwwroot\MySuper.dll
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '7.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\
No frameworks were found.
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.WindowsDesktop.App&framework_version=7.0.0&arch=x86&rid=win-x86&os=win10
You must install or update .NET to run this application.
Now, this caused a bit of panic which I would prefer not to repeat. I ended up fixing the problem by restoring from the backup and have not published since this mistake. Of course, this means new code is not getting deployed to production.
So, before I publish the website again, I would like to be extremely sure that I know which framework(s) will be required.
By the way, I believe the problem was that another dev on the project had added EntityFramework, which it seems depends on 'Microsoft.WindowsDesktop.App', so the WindowsDesktop.App framework was added incidentally (but still blew up my app just the same).
I assume the necessary frameworks are stored somewhere in some file in the project folder. However, which file and where is it?
Microsoft.WindowsDesktop.Appis being needed (maybe you misused certain types from the desktop API profile, which is a common mistake to make). 3) Entity Framework doesn't depend on the desktop profile and is widely used in web apps. So if you want to make this question answerable, some edits are required.obj\project.assets.json, etc.), but I don't think there are articles from Microsoft Learn that cover your question.