How to add SixLabor.ImageSharp in .net core project - .net-core

Hey I want to resize images stored in a folder using .net core 3.1. The library I am trying to use is SixLabor.ImageSharp. I tried to install its latest version using nuget package manager and it was successfully installed and later on I added namespace SixLabor.Imagesharp in my .Cs file. but I am getting an error Namespace sixlabor.imagesharp not found. how can i use image sharp in my project. I read its documentation it was mentioned that Image sharp is available in Nuget package manager but its not working for me.

Please install the Nuget Package "SixLabor.ImageSharp" in the desired project. Once done, in your Startup.cs configure it as mentioned on their getting started page https://docs.sixlabors.com/articles/imagesharp.web/gettingstarted.html

Related

Popper's tooltip.js NuGet package

I have downloaded the popper.js NuGet package for some bootstrap features. It works.
Now I want to test and use other their feature - tooltip.js.
In the readme.md file is information about instalation of poppers.js throught NuGet but there is no info about the Tooltips.js.
There is no package in NuGet with 'Tooltip.js' name.
How shoud I install and use it in asp.net application correctly?
Does it available at all for .NET (yes I am a newbie)?
May be poppesr's js files already include the code of their tooltip framework?

Migrate to PackageReference Missing Nuget Build Failure

I have a Xamarin Forms Project - the Android project targets API 28 (Pie) and uses packages.config for the nuget references. All of the packages have a targetFramework="monoandroid90". The project compiles and runs correctly.
I want to migrate to using PackageReference, so I use the Migrate packages.config to PackageReference option.
After this completes I try to build the project and receive an error regarding a missing package:
Xamarin.Android.Support.Annotations.28.0.0.1
Looking in the packages folder, I can see that none of the Xamarin.Android.Support packages have been downloaded and I can't get them to download - even by reinstalling the package.
I also noticed that the csproj file reference monoandroid81 for all the nugets, even though the packages.config used monoandroid90
Has anyone had a similar difficulty after migrating?

Package tried to add reference to System.Runtime which was not found in the GAC

ASP.NET 4.5.1 or 4.5.2
Updating Nuget package MicrosoftAspNet.Identity.EntityFramework from version 2.2.1 to version 3.0.0-rc1-final
I get the following error:
Failed to add reference. The package 'Microsoft.AspNet.Identity.EntityFramework' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package
owners for assistance.
I had a similar issue with another package.
I "solved" it adding a manually reference to missed library, updating the package and then removing the reference added manually:
On your project go to References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
Add, update and then remove.
I know, it is not a solution, but it will allow you continue working until get a real solution.
I had the same issue, but adding the MySQL package to my project.
The way that i solved was just very closely to the answer given by Sebastián Guerrero.
So i will be adding a manually reference to that missed library (system.runtime) and than installed the MySQL package and it works perfectly.
ATTENTION: I only unnistall the system.runtime package after installing the MySQL.
References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
I had the same issue when running Install-Package Microsoft.Azure.Management.Fluent on .NET framework 4.5.2
Solved the issue with the following steps:
Installed Microsoft.Rest.ClientRuntime latest version from Nuget.
After that, installed latest version of Microsoft.Azure.Management.Fluent from Nuget.
I had this problem when I opened the project after a while.
The problem was it was originally built with Microsoft.Net.Compilers.2.4.0 and I was on 3.3.1.
The project strangely added two required Imports to the .csproj file, one for the 2.4.0 compiler,and a duplicate for the 3.3.1 version. I just needed to:
Right click on the project file
Unload the project
Edit the csproj file
Remove the 2.4.0 references (was also a reference in an Error element)
Close file
Right click on project, reload file.
Rebuild All

I'm unable to install Moq nuget package for ASP.NET5 (core CLR) Unable to locate Dependency moq.netcore >= 4.4.0-beta8

I'm playing with new Core CLR code and trying to implement some test project. I found that Moq at the current moment not support Core CLR and there is package from MS guys called moq.netcore. But when I'm adding this in my list of dependacies like moq.netcore": "4.4.0-beta8" I get this error:
Unable to locate Dependency moq.netcore >= 4.4.0-beta8
How to fix this?
You need to add special source to your nuget package manager to be able to locate dev version of packages by MS team.
URL of sources where you could find this packet is https://www.myget.org/F/aspnet-contrib/api/v3/index.json
if you prefer command line I think this command should work:
nuget sources add -name FeedName -Source https://www.myget.org/F/aspnet-contrib/api/v3/index.json
or click to nugget settings in Visual Studio and add it manually (you could check there for example)

can't install google map control in ASP with NuGet

When I click install in the NuGet packages manager the screen looks like it flashes for a split second and does nothing, if I look in installed packages there are no packages installed. However it does add this line to the web.config file
<add tagPrefix="artem" namespace="Artem.Google.UI" assembly="Artem.Google" />
since the package is not installed properly I can't use the artem map control. I have created a new project and installed it fine so it is something in my current project that I need to change that is not allowing me to get it installed. The things I have done so far:
1. Browsed to the packages file in my project and deleted the GoogleMapControl.6.1 folder.
2. Removed the line from the web.config folder.
3. Removed the reference to Artem.Google in my project.
4. Cleared package cache which had google maps file in it.- Manage Nuget Packages - Settings - PackageManager - General - Clear Package Cache.
Then tried to reinstall from manage Nuget Packages - Google Map Control.
Now I click install and it looks like it installs ok has a green tick next to it, then I try and add a :
<div>
<artem:GoogleMap ID="GoogleMap2" runat="server"></artem:GoogleMap>
</div>
GoogleMap is not a know element, no Artem tools in the toolbox and if I go to the package manager and click on installed packages, there is nothing there. So it is not installing fully somehow. Any ideas?
These are the steps I followed to fix the problem
Browse to the packages file in the project and delete the GoogleMapControl.6.1 folder.
Remove the line from the web.config folder.
Remove the reference to Artem.Google in the project.
Clear package cache which has google maps file in it.- Manage Nuget Packages - Settings - PackageManager - General - Clear Package Cache.
Delete the packages.config file
install with the Package Manager Console run:
PM> Install-Package GoogleMapControl -Version 6.1.0
Add <%# Register assembly="Artem.Google" namespace="Artem.Google.UI" tagprefix="artem" %> to top of asp page where the maps will be used.
Add to body of this page.

Resources