Tweetinvi namespaces are not recognized although dll's are present - c#

I'm using creating a .Net 4.0 application to post stuff to Twitter using the Tweetinvi API. I can't use packages, so I've downloaded the dll's and added them to my project:
Yet my includes are showing errors:
My error console shows:
Error 423 The type or namespace name 'Core' does not exist in the
namespace 'Tweetinvi' (are you missing an assembly
reference?) {...file...}.cs 10 17 ApiProviders
Can anyone tell me why this happens and how I could fix this?

Tweetinvi requires the Bcl.Async package. You need to add that too.
Check all the dependencies and make shure all are installed.
BUT as already said I highly recommend using NuGet for this. If you are not allowed to use the "public feed" you can download the packages and put them in a local folder and add this folder as a new feed in Visual Studio.

Have you tried downloading the project from the download page?
https://tweetinvi.codeplex.com/downloads/get/852208

Related

Is it possible to use both Microsoft.Graph and Microsoft.Graph.Beta in the same app?

I'm writing some C# code targeting .NET 4.8, which needs to use Microsoft Graph. It works OK with Microsoft.Graph SDK (V1), however when I try to switch to Beta, I'm getting compilation errors like
Error CS0433 The type 'GraphServiceClient' exists in both 'Microsoft.Graph.Beta, Version=0.29.0.0 <...>' and 'Microsoft.Graph, Version=1.19.0.0 <...>'
The reason being that one other nuget I'm using, namely SharePointPnPCoreOnline, unfortunately depends on Microsoft.Graph 1.19.
It would seem that there should be no problem using both assemblies, as - according to the current documentation (https://learn.microsoft.com/en-us/graph/sdks/use-beta) - Beta should use its own namespace:
using Microsoft.Graph.Beta;
Unfortunately it is wrong, both libraries share the same namespace Microsoft.Graph. The code above results in
Error CS0234 The type or namespace name 'Beta' does not exist in the namespace 'Microsoft.Graph' (are you missing an assembly reference?)
I'm trying to use compiler options to resolve the assembly, but it's extremely convoluted under VS2019 - so far no luck.
But I'm wondering why can't I find anything on this issue, I'm surely not the only one - can it be that I miss something obvious? Please help :)
Not sure if you solved this, but I solved this by adding an alias to Microsoft.Graph.Beta package. Then when referencing, add this to be able to reference your beta-endpoints or resources. Change MSGraphBeta to whatever you added as an alias to your package.
extern alias MSGraphBeta;
using GraphBeta = MSGraphBeta.Microsoft.Graph;

using Zxing.Net Mobile for forms does is not recognize

I am new in Xamarin.Forms and I want use the bar code scaner by Zxing.
however I install the plugin form nuget:
1)ZXing.Net.Mobile for Forms
2) ZXing.Net.Mobile. -> install it since I read somewhere it would help my problem but its not.
as far as I understood I need to add this line: to the Android project in main Activity
However alotugh I install the packages I am still getting an error of:
The type or namespace name 'Andorid' does not exist in the namespace 'ZXing.Net.Mobile.Forms' (are you missing an assembly reference?) ScannerZXing.Android
what can I do? (perofrm clean and rebuild for the project didn't help)
also would like to add that it is added in the referecnes of the projects.
Thanks for the ansewrs.
In my case the reason was that I installed only ZXing.Net.Mobile.Forms. After installing ZXing.Net.Mobile it`s gone. (two libraries need to be installed)
UPDATE: After trying to run the project I discovered that you actually need both Nuget Packages
Previous: Just in case anyone had the same issue as me there are actually two ZXing.Net.Mobile packages both of which by Redth. They both have the exact same description as well unfortunately. I tried the first one which at the time of this writing had the most downloads... however it produced the error as described. By uninstalling and reinstalling the second I resolved the issue:

Sending mail with ASP.Net vNext

In legacy ASP.Net and .Net in general, sending mail was accomplished via System.Net.Mail classes which resided in System.dll. Now with KRE, vNext doesn't seem to have System.Net.Mail as a separate package.
Referencing the "net453" framework in project.json
"frameworks": {
"aspnet50": { },
"aspnetcore50": { },
"net453": {} // <<< throws compilation errors
},
causes all hell to break loose with errors like:
.NET Framework 4.5.3 error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
It virtually complains about all vNext dependencies that are part of kpm packages.
So, has anyone figured out a way to send mails using ASP.Net vNext yet?
Note
Even though System appears under References and even though Intellisense shows System.Net.Mail is available for use, the code doesn't compile. E.g., a simple statement like this, although appears valid,
using System.Net.Mail;
var m = new MailMessage();
will throw compilation error such as:
ASP.NET Core 5.0 error CS0234: The type or namespace name 'Net' does not exist in the namespace 'System' (are you missing an assembly reference?)
ASP.NET Core 5.0 error CS0246: The type or namespace name 'MailMessage' could not be found (are you missing a using directive or an assembly reference?)
Update
With latest Visual Studio 2015 CTP 5, they seemed to have fixed the intellisense glitch. Now System.Net doesn't have Mail namespace anymore. On a side note, the vNext project I created with VS 2015 preview is no longer working - I get an 403.3 error on the home page! Ah, the joy of working with beta software!
To use System.Net.Mail your app can target only aspnet50. The aspnetcore50 target has no such support (at least, not right now, as far as I know).
You shouldn't ever have your app target net453 (which, as Luca mentioned in a comment, has since been renamed anyway) because ASP.NET 5 apps don't run on that platform.
An app that targets aspnet50 can generally reference any .NET 4.0+ NuGet package or GAC reference.
So, in your case, remove the net453 and aspnetcore50 targets, and within the aspnet50 target add a framework reference to System.Net.Mail.
A complete alternative would be to find some other existing NuGet package that has support for sending email in both aspnet50 and aspnetcore50, but I doubt such a package exists at this time (though it no doubt will at some point in the future).
To follow up... .NET team has stated that porting System.Net.Mail will be less than straightforward and will likely take a while. That's a bummer since a production website usually does more than a little email sending.
In the meantime, someone just released a Core-Clr compatible email API called MailKit. You can read about it here https://github.com/jstedfast/MailKit/issues/212

The type or namespace name 'Core' does not exist in the namespace

I encounter this kind of error when I debug a project
I already have EntityFramework.dll, System.Core.dll, System.Data.Entity but still Core is not referenced.
Can someone help me?
I'm having error in this Line
using System.Data.Entity.Core.Objects;
This is the error:
The type or namespace name 'Core' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)
Enrique, I had this problem crop up when I started opening a project on my desktop that I had normally been opening on my VM. Masoud's answer is not helpful... I don't think he read your original post.
What I did to clear this compile error up was to open NuGet package manager and install the update that was available for EntityFramework. I had version 6.1.1 installed in the project and I upgraded to 6.1.3. I should not have had the error to start with, but upgrading the version appeared to jiggle whatever it was loose because I started compiling fine after that.
Sometimes, when you add references from other sources than nuget manager (example: Local source) you need to verify the HintPath of that reference before moving your application in another environment

The type or namespace name 'Http' does not exist?

I have this portable class library, its settings it Windows Phone 8, Windows Store and .NET 4.5.
I'm trying to add the HttpClient, but after I add it by NuGet its runtime version is v4.0.30319, and when i try to using System.Net.Http it states:
The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
The following is added as a reference, and was added by NuGet upon install:
System.Net.Http
System.Net.Http.Extensions
System.Net.Http.Primitives
The class I'm trying to use is HttpClient in my portable class library :-/
This MSDN blog post makes it clear that you need to use this special release of HttpClient.
To use the HttpClient package, right click on your solution, go to the
Manage Nuget Packages dialog, search for Id Microsoft.Net.Http, and
make sure “Include Prerelease” is turned on.
This was released last February, but I haven't seen any updates to indicate that it is now obsolete.
EDIT
Here's the page for the latest version of this package

Categories

Resources