Can clean iOS project in debug. Cannot clean iOS project in Release - xamarin.forms

Visual Studio 2019 and 2022 under Windows 10. I get the following error:
Error Unable to remove directory "obj\iPhone\Release". Could not find a part of the path 'Microsoft.AppCenter.Crashes.iOS.Bindings.dll.msym'. Droid project works fine.

Related

VSCode Omnisharp server A .NET 6 SDK for x86_64 was not found

Omnisharp does not seem to recognize my installed .NET sdk (version 6.0.408).
I have tried manually adding this path via settings to Omnisharp: SDK path i.e.:
C:\Program Files\dotnet\sdk\6.0.403
I have also tried reinstalling the SDK and even VSCode.
This does not seem to solve the issue however, and I am unable to run my asp.net application on VSCode. Running dotnet run from the terminal is fine.
TLDR: Both .NET SDK versions and Visual Studion versions needed to be x64.
Here was the exact error I was seeing in the Output Window:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the
latest x86_64 SDK from
https://dotnet.microsoft.com/en-us/download/dotnet/6.0.
[ERROR] Error: OmniSharp server load timed out. Use the
'omnisharp.projectLoadTimeout' setting to override the default delay
(one minute).
When I realized there was a mismatch between my .NET SDKs and Visual Studio Code in terms of being x86 and x64, I did the following:
Deleted the bin/obj folders and .vscode folders in my VS Code project.
Uninstalled my .NET SDKs via Windows (Setings > Apps).
Uninstalled Visual Studio Code via Windows (Setings > Apps).
Installed .NET 7.0 x64 and .NET 6.0 x64.
Opened PowerShell and ran dotnet --info to make sure my .NET runtime and SDK were appearing correctly.
Installed Visual Studio Code x64.
Used PowerShell and cd'd to my project folder. Did a dotnet restore. Then launched Visual Studio Code using code . command.
I could then use the most current version of the VS Code extension (v1.25.2).
Uninstalling and then installing the VSCode extension C# for Visual Studio Code solved the issue for me.
I had the same problem and just solved it. Copy and pasting this from a Youtube comment I just finished writing, so it might sound funny out of context, but the good bits are in there. Hope it helps.
Installed dotnet 7.0, but then it said dotnet 6 was missing...
So I deleted the script asset, exited Unity, went back to their website and installed Net 6.0.403
Error still happened.
I'll note this seemed to push a script compiling error out to Unity in the inspector window, as well.
Deleted the script asset again, exited Unity again, then uninstalled both dotnet 7 and dotnet 6.
Then I reinstalled dotnet 6.
Into unity, made a new script, opened it, and this time no error message about missing net 6.
I just started yesterday. Literally. So if my solution is trash, I'll laugh with you lol. Best of luck.

visual studio 2022 cannot load any projects - Unsupported project type error

I was playing with some VS 2022 extension development and I ran the vsix project in debug mode with "Start external program" set to
"E:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
Command line was: /rootsuffix Exp
I was running it OK. I was able to see a new VS 2022 instance and I loaded a solution, closed it and open another.
When I stopped running vsix project in debug mode. I closed that project.
Then when using normal VS 2022 to open a solution with many files suddenly I could not open any project due to unsupported project type error.
Its seems the experimental flag changed something in the registry and invalidated my normal VS 2022.
I tried running:
devenv /rootsuffix Exp /updateconfiguration
and
Reset the Visual Studio 2022 Experimental Instance.lnk
It didn't help.
How can I get back my VS 2022 back?
I had a lot of extensions installed and I hope someone can help.

Build failing for Android after updating xamarin.forms

I have a Xamarin.Forms app. Yesterday, I updated Xamarin.Forms package to the latest version 4.8.0.1687. In Visual Studio 2019 I can build the app and run it. But build in Azure DevOps pipeline fails. For Android, the following error is reported:
C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1005: Assets file 'D:\a\1\s\My_MobileApp\My_MobileApp\obj\project.assets.json' doesn't have a target for 'netstandard2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project. [D:\a\1\s\My_MobileApp\My_MobileApp\My_MobileApp.csproj]
Where My_MobileApp is the shared project.
I checked the project file, but the Target Framework there is set to .NET Standard 2.0. I checked the project.assets.json in the local obj folder, and it has
"originalTargetFrameworks": [
"netstandard2.0"
],
But no "TargetFrameworks".
What is wrong, and how this can be fixed?
Updating nuget to 5.8 worked for me

'{{FSharpCoreShippedPackageVersion}}' is not a valid version string

I just upgraded to Visual Studio 2019 version 16.5.0 Preview 2.0. It seems to have broken building and running .NET Core projects in F# with the dotnet command line tool.
Previously dotnet build and dotnet run worked fine. Now either one produces this error message (wrapped for readability):
C:\Program Files\dotnet\sdk\3.1.200-preview-014883\NuGet.targets(124,5):
error : '{{FSharpCoreShippedPackageVersion}}' is not a valid version string.
My projects don't have the string FSharpCoreShippedPackageVersion anywhere in them that I can see (including in the .fsproj files). I also looked in the referenced NuGet.targets file and couldn't find FSharpCoreShippedPackageVersion in it either.
Using dotnet new console --language=F# also fails, telling me to restore NuGet packages, but attempting dotnet restore gives the same error message.
What can I do to fix this?
UPDATE: This issue appears to be fixed in the current version of the preview:
3.1.200-preview-014977
If you update Visual Studio 2019 Preview, you shouldn't need this workaround anymore.
I found a workaround:
Run dotnet new globaljson in the project root folder
Edit the global.json to use .NET Core 3.1.101 instead of 3.1.200-preview-014883.
It appears that the combination of VS 2019 Version 16.5.0 Preview 2.0 and .NET Core 3.1.200-preview-014883 causes this problem.

Can't copy obj/Debug/program.exe.manifest, wont compile on MacOS (Visual Studio). How do I generate the .exe and subsequent manifest file?

The problem can be replicated by pulling the OrchardCMS from Git at https://github.com/OrchardCMS/Orchard and then attempting to build the Orchard.Web solution on Visual Studio 2019 within a MacOS environment.
However, I don't know if my problem is specifically with Orchard. The project builds perfectly on my work unit that runs Windows 10. Yet when the project is built at home on my iMac running MacOS, the build fails with the error:
Could not copy the file "obj/Debug/Orchard.exe.manifest" because it was not found
I'm guessing that the .exe is not being built because of my OS and as such the manifest is not being generated, though this is just a guess. Is there any way to force the project to build the .exe and its subsequent manifest for the debug directory so the build succeeds?
If so, how do I go about doing this in a Mac environment?
System specs:
MacOS Mojave. V10.14.6 .
Visual Studio 2019

Resources