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

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?

Related

Visual studio (17.3.4) update causes xamarin forms solution to go in an infinite loop

I've updated my visual studio 2022 to the latest version and now its an infinite loop trying to load my xamarin forms projects file.
It constantly tries to restore csprojects and intellisense.
I have already checked the box to install xamarin
I have uninstalled reinstalled
I have checked if there are any .net sdks are installed elsewhere
It's been 2 days I'm trying to fix this problem with no luck.

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

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

UWP: Folder in AppPackages is different from Package Family Name

I am developing a UWP app with Visual Studio 2019 Community 16.6.3.
When I run the app in Debug, Visual Studio deploys the app on my machine, creating a folder under
C:\Users\<MY_USER>\AppData\Local\Packages\
but the folder is named differently from the Package Family Name in my Package.appxmanifest.
Therefore (I guess), my connection to the MS Store is not working (I receive an error when I invoke the Store APIs) and also the OneDrive integration is broken.
Please note that my colleagues do not have any problem with the very same code-base (but they are working with Visual Studio 2019 Professional 16.5.5).
Is it a problem of the specific version of Visual Studio or is there anything in my code, in my machine or in my configurations that I should tweak?
Thank you!
Is it a problem of the specific version of Visual Studio or is there anything in my code
Please check if has modified the project's package family name, for the testing Visual Studio 2019 16.7.0 does not reproduce this issue. Please try to update the VS to latest version and delete installed app and re-build again.

Cannot get unity hololens project to work

I'm trying to get a project to work that i downloaded this link over here, from github.
I've followed all the (configuration) steps in the install guide and i am using the exact versions of the software as described in the guide.
The problem seems to be that some references to the Windows namespace do not work.
I've tried adding it but i can't get it done in the usual way.
The error messages i get when building in unity:
When i open the project in visual studio 2015 update 3 (after building it in unity):
It seems that the option to simply add the reference in visual studio is not present in this kind of project.
I think this shouldn't be to hard to resolve but i lack the skills and experience as i usually develop windows apps solely in visual studio.
EDIT
These are the configurations I used:
i open the project in visual studio 2015 update 3
You should use Visual Studio 2017 with the latest Win10 SDKs.

Unity 2018.3.X problem with autocompletion

Using Unity 2018.3.X just installed does not let you use Visual Studio Code nor MonoDevelop to code right.
Precompile is disabled
No debugger
No autocompletion
Errors everywhere
I solved it myself with some hours dedicated to this thing.
I was installing Visual Code as usual on a new computer but when trying to edit code the autocompletion did not work, also tons of errors popped.
When I installed I added the normal plugins for Unity in Visual Code
C#
Unity debugger
When reloading Visual Code, the Omnisharp log said that the compiler did not find the .NET Framework 4.5 and anything works within your C# scripts.
When looking into it I found this folder in Windows.
(If someone knows where it is in iOS share it please)
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
That folder showed folders with the versions of the frameworks installed.
In my case, those were 3.0 and 4.5.2.
The problem is that for some reason it does not detects the version 4.5.2 as 4.5 so to fix it normally you should install version 4.5, the problem is that you cant get it anymore.
To solve this, look at the Omnisharp log and change the folder name to the one your Omnisharp says, in my case I changed the name of 4.5.2 to 4.5 and my problem was solved.
I have seen more cases where the version the Omnisharp wants is different, just download the 4.X version you want from this link and change the folder name if you need.
https://dotnet.microsoft.com/download/visual-studio-sdks
Keep you .NET Core updated too to avoid more problems.