Where do you find GoogleOAuth2AuthenticationOptions? - c#

I feel like I am missing something pretty basic however I have had a solid effort at resolving it.
Basically I am trying to follow this question's answer here: https://stackoverflow.com/a/22694372/768952
It makes use of a GoogleOAuth2AuthenticationOptions object, which from my Googling should be located here within the .net4.5 framework: Microsoft.Owin.Security.Google.GoogleOAuth2AuthenticationOptions
However my MVC project is .net 4.5 and it's not there! Despite this saying it should be: http://www.symbolsource.org/Public/Metadata/NuGet/Project/Microsoft.Owin.Security.Google/2.1.0-rc1/Release/.NETFramework,Version%3Dv4.5/Microsoft.Owin.Security.Google/Microsoft.Owin.Security.Google/GoogleOAuth2AuthenticationHandler.cs?ImageName=Microsoft.Owin.Security.Google
So where on earth is GoogleOAuth2AuthenticationOptions? haha

The solution was as simple as updating the version of Microsoft.Owin.Security.Google in Nuget.

If you're using the 3.0.0 version of Microsoft.Owin.Security.Google, you have to turn on the Google+ API in the Google Developer Console. (http://blogs.msdn.com/b/webdev/archive/2014/07/02/changes-to-google-oauth-2-0-and-updates-in-google-middleware-for-3-0-0-rc-release.aspx)

You should get Microsoft.Owin.Security.Google.
In Visual Studio do the following: open Tools -> Library Package Manager -> Manage NuGet Packages for Solution ... then in search text box put Microsoft.Owin.Security.Google and choose Microsoft.Owin.Security.Google package, press "Install" to install it.
Install "Microsoft.Owin" the same way.

Related

Graph API SDK for .NET v6, C# Winforms

I've just installed Visual Studio Community and wanted to have a play around with C# (.net 6 LTS) and the graph API. I've created a winform for this purpose.
I've looked at the documentation and can see i need to install the SDK via nuget, but when i'm searching the repository i can't seem to see it.
Am i doing something silly?
It would seem the default install didn't include the online nuget packages. so i spotted an image on another site with the package source. Add it and can now see the packages as expected.

I can't seem to access packages I've installed inside the Nuget package installer for the solution

Sorry if this is a basic question I am quite new and can't seem to figure out why this is an issue. Basically I've installed Newtonsoft.Json via the Nuget package manager inside of the project I'm working on in VS 2019 and it keeps coming back with CS0246 errors saying the namespace or type can't be found even though when I check it was successfully installed and is up to date. It's doing this with every package I install, any links to further reading that could help me figure this out would be great or if anyone has an idea of what is going on I'd be super grateful! Thanks so much.
You could check if the namespace or type needs to work in specified package version and the framework of the project.

VS Code IntelliSense does not work with Unity. Why?

VS Code IntelliSense does not work with Unity. Why?
I am using Unity with VS Code. When I type I do not get any suggestions which are related to Unity. E.g. I am not getting the gameObject suggested once I type this.:
Another example is that I can not go to the MonoBehaviour definition:
I saw this question. So, I checked that all of the extensions recommended in the answer are installed:
The extensions installation did not help. Could someone help with the issue, please?
I am using the Unity 2019.3.2f1.
If in Unity Editor I go to the Window - Package Manager - search for Visual Studio Code Editor I see it is there:
Actually I can not see the definition even for System. So, I believe there should be something wrong on the VS Code side:
Also, I followed the video. It did not help. Under the video there is the comment:
For anyone still cannot get the autocomplete to work, try installing the ".net framework 4.7.1 developer pack".
In my case, I am using Unity 2019.1.2, and I installed dotnet core 2.2 which comes with ".net framework 4.7.2.". Apparently Unity 2019.1.2 requires framework 4.7.1. You can find which .net framework version is required by checking the Assembly-CSharp.csproj file
I followed the comment suggestion. I checked what version is specified in my case in the TargetFrameworkVersion. It is 4.7.1. So, I downloaded the 4.7.1. While installing the version it told me that it is already installed and whether or not I would like to reinstall it. I reinstalled it and still it did not help.
It seems I was able to fix the issue. I went to Edit - Project Settings - Player - Other Settings - Configuration - Api Compatibility Level. Then I changed it from .NET Standard 2.0 to .NET 4.x. Then I reopened Unity, changed it back (to preserve the API restriction) and reopened Unity. And now the suggestions work as expected. Except for a few warnings I am getting on script opening (here is the question which is related to the warnings).

SQLite in WPF application

I'm trying to use a SQLite database file inside my WPF application.
I tried searching for a proper library that wraps the entire SQLite library.
I found the following SQLite library which allows a perfect functionality that suites me.
The problem is building it.
I tried adding it in a Visual Studio as a project and compile it to get a dll file.
That didn't work so much well because of dependencies missing inside the project and sub-projects.
If anyone anticipated or experienced any hard time with this library, I would really use the help and of course appreciate it alot.
Thanks heads up :)
You should install it as a nuget package. Right click on your project -> Manage Nuget Packages -> find SQLite.Net-PCL. You don't need source code for this, only released package and that is exactly what nuget will download for you and add as a dependency.
You can also install the package with Visual Studio's Package Manager Console:
Install-Package SQLite.Net-PCL
If you want to have source code, this library is contained inside a single file, so you can just copy SQLite.cs to your project and it will work.

Search for .NET Core or Standard NuGet packages

I'm using Visual Studio Code on Mac OS X to develop .NET Core web APIs. I already understand that adding NuGet references is done manually in the project.json file.
However, I'm not quite sure how to search NuGet for .NET Core specific libraries. The Mac OS X tutorial in the .NET Core documentation only instructs the developer to add project dependencies, and it doesn't go into detail about how the developer would know / discover the dependency names.
Is there a way to search NuGet specifically for .NET Core libraries, and/or libraries that are compatible with .NET Standard? I would like to use the Mac OS X terminal or even VSCode to do this. However, any solution would be a great starting point.
ps. I did come across Reverse Package Search, but I have no idea who created it, how up-to-date it is, and if it will be available six months from now.
Right now (as of January 2017), there's no easy way to search unfortunately. It's an open issue on the NuGet Github project.
The closest you can get right now is to look at the package dependencies after you find it (see my answer here). That doesn't help you find it in the first place, though. It's currently a manual "educated guess" process.

Categories

Resources