The type or namespace name does not exist in the namespace. .NETCore - Visual Studio 2017 - macos

I am using a mac with visual studio 2017. I'm trying to start up a project with NuGet packages inside. When I right click on the source and go to update NuGet packages, I receive incompatible errors for 15 of the packages.
Checking compatibility for System.Net.WebSockets 4.0.0 with
.NETCoreApp,Version=v1.1. Incompatible packages: 15 Package restore
failed. Rolling back package changes for 'project.api'.
When I restore packages for the solution, it works successfully. When I go to build the project I get 28 errors. All with the same text -
error CS0234: The type or namespace name '' does not exist in the
namespace 'project.api' (are you missing an assembly reference?)
This issue does not persist on a counterparts Windows machine. I have no idea what to do or where to go.
Side note - unsure where to go to the NuGet package manager then go to package manager settings. This exists on windows but not Mac it seems.

The latest version was not pushed to the repo. This was why I was getting the errors. So the build error is fixed but the update NuGet packages are still incompatible. Not going to worry about that for now.

Related

The type 'xct:TabView' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

I'm getting the error of the tittle when trying to use XCT TabView.
I'm using Microsoft Visual Studio Community 2022. I installed XCT in my project by running both the commands in NuGet Package Manager Console:
Install-Package Xamarin.CommunityToolkit
Install-Package Xamarin.CommunityToolkit.Markup
In NuGet solution manager I selected both packages, I checked every checkbook responding to my projects and I hit "Install".
I get the following errors and warnings though:
Package restore failed. Rolling back package changes for 'MyProject'.
and
Error NU1605 Detected package downgrade: Xamarin.Forms from 5.0.0.2291 to 5.0.0.2196. Reference the package directly from the project to select a different version.
MyProject -> Xamarin.CommunityToolkit.Markup 2.0.0 -> Xamarin.Forms (>= 5.0.0.2291)
MyProject -> Xamarin.Forms (>= 5.0.0.2196)
I also added the relative namespace to XAML: xmlns:xct="http://xamarin.com/schemas/2020/toolkit
By the way, I get the same error too for xct:TabViewItem but I additionally get another error for it: Cannot resolve type "xct:TabViewItem"
Any ideas?
I had tried to do this and met the same problem as you.
This issue happened because the version of xamarin.forms is too low. So you can open the nuget package manager to update the xamarin.forms to the lastest version.
You can also download the earlier version of the Xamarin.CommunityToolkit and Xamarin.CommunityToolkit.Markup such as 1.3.1

Error Could not install package 'Microsoft.Build.Framework 14.3.0'

I have used visual studio 2019, I have added some NuGet packages but it's show error like..
Error Could not install package 'Microsoft.Build.Framework 14.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v9.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Note: My Xamarin Binding library(Android) solution target version9.0.
please help me to resolve this issue.
Try by updating your Microsoft.Build.Framework package to the latest version (at the moment it is 16.0.461).
You can check it also here: https://www.nuget.org/packages/Microsoft.Build.Framework/
Once I copied the build task property section from my iOS csproj to my Android csproj.. I got a slightly different message. It asked me to add Microsoft.Build.Utilities.Core.
I then had to add the Microsoft.Win32.Registry 5 nuget then as it tried to install 4.3.0 which my Android project didn't like.

Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'

Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar', in Xamarine Android . I am using Visual Studio 17.
And also
When i am intalling below package from Nuget Package Manager in Visual Studio 2017 for Xamarine.Android i am getting erorr below.
Error:
Could not install package 'Xamarin.Android.Support.v7.RecyclerView 27.0.2.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
It's probably a build issue, clean your solution, delete bin and obj folder and then rebuild, see if it persists.
You can also try restarting VS once.
If it persists you might be missing the Appcompat library, which you can install via nuget.

Getting the error "Error CS0234: The type or namespace name `CrossCore' does not exist in the namespace `Cirrious'

Getting the error "Error CS0234: The type or namespace name CrossCore' does not exist in the namespaceCirrious'. Are you missing an assembly reference?" for PCL. And unable to update packages.
We are getting error when we are trying to update packages in Xamarin studio PCL in Mac machine. “Could not install package 'MvvmCross.PortableSupport 3.2.2'. You are trying to install this package into a project that targets 'portable-Profile78', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.”
If you are updating an old MvvmCross project then that is probably why. Starting with 3.2.1 MvvmCross moved to PCL profile 259. You'll need to change the profile of your pcl core to this profile or something else that is compatible.
After uninstall xamarin by following steps in the url http://developer.xamarin.com/guides/cross-platform/getting_started/installation/uninstalling_xamarin/
and reinstall the Xamarin Studio, the Nuget packages are started updating.

How can I remove MvcMailer, T4Scaffolding, and other dependancies and restore my program?

I tried to install MvcMailer and as soon as I added the package my project it died. I started getting all kinds of error messages concerning dependency conflicts with different versions of T4Scaffolding..versions 1.0.7 and 1.0.8. So I uninstalled the MvcMailer.
When I run the program I still get the same message: A different version of T4Scaffolding is already running in this instance of Visual Studio
Please restart Visual Studio to avoid unexpected behavior.
You won't be able to use scaffolding until you restart Visual Studio.
And my models have error message like:
The type or namespace name 'ColumnAttribute' could not be found (are you missing a using directive or an assembly reference?)
Or
The type or namespace name DatabaseGenerated could not be found (are you missing a using directive or an assembly reference?)
I am using EntityFramework 4.50501 SP1Re l.
MvcMailer seems like a great idea but since I installed it I can't run my program anymore. Is there anyway that I can simply get back to having my program revert back to the settings before I installed MvcMailer?
In the root of your project there'll be a Packages folder. Deleting T4Scaffolding version 1.0.7 should resolve the conflict.

Resources