.NET Maui - You are using a preview version of .NET - Where is this coming from and what version am I using? - maui

I am running VS 17.3 Preview 6 on windows11. I have a .net maui app. when i load the app into vs, I get a message saying that I am using a preview version of .net. I don't think I've installed a preview of .net6 on this machine since it is pretty much brand new. i am using
.net 6.0 - ios for ios.
.net 6.0 - android for android.
.net 6.0 - windows 10.0.10941.0 for windows, but don't plan to build for windows.
Basically, why am i getting a message about using a preview version of .net? Is this some artifact message because I am using VS17.3 preview x? any idea how to make this go away since it is annoying? Is this due to .net 7 preview being installed with vs17.3?

To find out what version of MAUI you are using
Open solution or project in Visual Studio (Currently you should use Visual Studio Preview)
Right click on Project
Select Manage NuGet Packages...
Go to the register Installed
Check the versions of the packages Microsoft.Maui.Dependencies and Microsoft.Maui.Extensions
To find out what version of dotnet SDK you are using
Open PowerShell or cmd
Change directory to the path of your project
Execute dotnet --version

Related

Can't use intellisense for Unity because VS code can't find .NETWORK,Version=v4.71 even though it's installed?

Sorry, I'm a newbie here. I've spent a few hours now trying to get intellisense to work on VS code and have followed multiple Youtube guides. No luck. I've installed and uninstalled everything multiple times. I keep getting this message.
F:\Program Files\dotnet\sdk\6.0.401\Microsoft.Common.CurrentVersion.targets(1220,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
It tells me to install the developer pack, but it already is installed? Any idea of how to fix this? Please help.
Primarily, this has to do with the VS code extensions and Installation of the Unity editor on Unity HUB.
In VS code, install the extension: C# for Visual Studio Code (powered by OmniSharp).
While installing the unity editor through Unity HUB, make sure you are installing Microsoft visual studio community.

Error compiling MAUI project - missing MonoAOTCompiler.Task

I'm creating a MAUI application targeting iOS and Android. I have been using Visual Studio 2022 for Mac version 17.3. That version doesn't really support archiving the app, so I installed version 17.4 preview 2.1. When I try to compile my app I get the following error:
Unable to find Microsoft.NET.Runtime.MonoAOTCompiler.Task
I found a post that indicated I should run the command:
dotnet add package Microsoft.NET.Runtime.MonoAOTCompiler.Task --version 7.0.0-rc.2.22472.3
When I run that command in terminal I get the error:
error: Value cannot be null. (Parameter 'version')
Everything I have found indicated that the problem should have been fixed in Preview 2.1 of Visual Studio 2022 for Mac, but it is still occurring.
Can anyone help me resolve this? I need to publish my app to the stores and can't get it to compile in release mode or create the archive because of that.
You need to add the package to your project.
First, you should right click your project name and choose the Manage Nuget packages button.
Second, you can search the package Microsoft.NET.Runtime.MonoAOTCompiler.Task and install it.
Then you successfully add the package to your project.

Can not change .Net Framework to 6.0 in Visual Studio 2022

Hey so I have Visual Studio 2022, I installed the .NET Framework 6.0.1 SDK manually from the microsoft website, If I check the Visual Studio Installer the .NET 6.0 Runtime is checked (means it is installed).
But I am neither able to retarget my existing Projects to 6.0, neither create a new Project for 6.0. The .NET Framework 6.0 simply doesn't appear in the dropdown selection.
I found another thread which had the same issue but nothing worked for me.
I've read that you can change the Targetframework editing the .csproj file with Notepad, I tried that but at start it told me I don't have the framework installed and either need to downgrade to 4.8 or install 6.0.1.
I've restarted and reinstalled Visual Studio several times now, same with my Computer.
What the heck is wrong here?

What is the oldest visual studio version in which monogame's latest version is eligible?

I have a low end pc for thelatest versions of visual studio and want to work on monogame so please tell me what version is the last which i should use for the latest monogame version
You might want to use VS Code. It's lighter than any Visual Studios. The only downside is that building/deploying to iOS and Android might be difficult. But you can certainly build your games on PC/Linux.
Using VS Code and the .NET CLI will require you to know the basics of command-line tools.
Next, You would need to install .NET Core SDK 5.0.
After the installation is complete, You need to set up Monogame using the following scripts.
dotnet new --install MonoGame.Templates.CSharp
dotnet tool install --global dotnet-mgcb-editor
mgcb-editor --register
(Taken from here)
Now you're ready to build a project. Open a terminal (CMD or use VS Code) and run
dotnet new mgdesktopgl -o MyGame
This will create a folder "MyGame" and load a Monogame project. You can run it by heading inside the folder and using
dotnet run
I wrote an answer on this here as well.

Web Platform Installer : 0MB -- Azure SDK 2.5.1 install issues

Using Visual Studio 2013 Professional, using the web platform installer I select Microsoft Azure SDK for .NET (VS 2013) - 2.5.1.
I add and click install.
The next screen tells me what it's installing, showing 0MB in terms of size.
![enter image description here][1]
The operation finishes, however I create the new project I see the sdk listed with 0MB for file size.
If I install and let it finish, when I go back to the web platform installer, it indicated 2.5.1 sdk was not installed.
I tried doing a manual install from here which didn't work: http://azure.microsoft.com/en-us/downloads/archive-net-downloads/
Additionally, all other items I'm trying to install through web platform installer show 0 MB.