aspose pdf v 21.8 only work till .net 5, After upgrade to .net 6, I don't want to upgrade aspose pdf version - .net-6.0

License license = new License(); license.SetLicense("MyLicence"); //get exception system.Exception
How to resolve this issue?

Related

How to Update Blazor Server App from .net core 6.03, to 6.04

I have a .net core Blazor Server App which is currently using version 6.03 of .net core.
Version 6.04 came out a few days ago, and I need to upgrade the project and then publish it so it is using the new bits.
I have:
Install the latest SDK from here which includes 6.04.
I also used Nuget to ensure all libs are on 6.04.
However, when I open the project, and check the file versions, it is still using 6.03.
I have looked for any setting in the project file that would indicate which version of .net 6, it is using, but I don't see any such setting. I only see this setting:
<TargetFramework>net6.0</TargetFramework>
Is there some way to get VS to use 6.04 instead of 6.03?
After quite a bit of working with this, I found that the minor version is tied to the Version of Visual Studio that you are using.
So, I was using VS 2022 Version 17.2.0 Preview 4, and the .net 6.0.4 bits had not been released yet for this version. So those bits are not accessible from this version.
However, the 6.0.4 bits have been released for VS 2022 Version 17.1.5. So by downloading and installing 17.1.5, the project then opened up using 6.0.4 without any other changes.
I am sure that soon the bits will be released for the 17.2 version soon.

Can't install Microsoft.EntityFrameworkCore.SqlServer for a .NET 4.7.2 Framework project

I have a VB.NET Windows Forms project targeting the .NET Framework 4.7.2:
I am trying to install Microsoft.EntityFrameworkCore.SqlServer of which the latest stable version is 5.0.8:
However after clicking install and accepting all terms I get an error:
Could not install package 'Microsoft.EntityFrameworkCore.SqlServer 5.0.8'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', 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.
Does anyone know what the heck its moaning about version for?
Does anyone know what the heck its moaning about version for?
EF Core 5 requires .NET Standard 2.1. .NET Framework only supports .NET Standard 2.0. So it will never work.
EF Core 3.1 is the last version to support .NET Standard 2.0, and so it's the last version of EF Core compatible with .NET Framework.
But .NET Core 5 supports Windows Forms.
So the options are:
upgrade everything to .NET Core 5
downgrade EF Core to version 3.1
switch from EF Core to EF 6, which is mature, stable and supports .NET Framework

What's the best way to migrate from preview version of .NET Core to the latest version?

I have a site built in .NET Core 1.0 Preview 2. It's using the deprecated xproj file. I need to migrate the project to the lastest .NET Core 3.1.
Would it be simpler to try and go through all the migration steps listed below for each new version one at a time or would it be easier to try creating a new site in 3.1 and trying to just move my code over?
https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-3.1
If the better answer is go through each migration one at a time, there are there any good walkthroughs on migrating from the preview version to .NET Core 1.0?

.net core entity framework to Oracle Database

I created .net core api. And I want to use entity framework. I installed Devart.Data.Oracle.EFCore from nuget.I created DBFirst.
In DbContext
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.Options.Extensions.OfType<RelationalOptionsExtension>().Any(ext => !string.IsNullOrEmpty(ext.ConnectionString) || ext.Connection != null))
optionsBuilder.UseOracle(#"User Id=test;Password=test;Server=Test;Persist Security Info=True");
CustomizeConfiguration(ref optionsBuilder);
base.OnConfiguring(optionsBuilder);
}
And In controller
public class ValuesController : Controller
{
bmsModel model = new bmsModel();
[HttpGet("{id}")]
public string Get(int id)
{
var result = model.HRILETISIMEKRANIs.ToList();
return null;
}
}
When I debug to var result I got error like
Feature is not supported. This error is thrown by Devart .NET Standard assemblies if license key validation fails. Possible reasons: 1. License key
is not found, refer to the "Licensing .NET Standard (.NET Core) Projects" article in the product documentation. 2. Your product edition (the key was generated for) doesn't support the feature you are trying to use, refer to the editions matrix. 3. Your key is outdated for using the current product version, renew the license key in the Customer Portal.
I can build project problem is when it tries to open connection while running
How can I solve this problem?
Thanks in advance
ODP.NET Core has supported .NET Core 3.0 since last year. ODP.NET is certified with EF 6.4, .NET FW 4.8, and support Oracle tool sets in Visual Studio 2019 and VS Code. Oracle signed a cloud partnership with Microsoft to ensure Oracle Cloud and Oracle on-premises software integrates well with Azure. Also DEVART is supported too. for Devart requirements
Requirements for DEVART
Visual Studio 2017 or higher (for Entity Framework Core 3.1 - Visual
Studio 2019)
If you want to use Entity Framework Core 2.2 - .NET Core
SDK 2.2. For Entity Framework Core 3.1 - .NET Core SDK 3.0
Latest version of NuGet Package Manager
Latest version of Windows PowerShell

The current .NET SDK does not support targeting .NET Core 2.0

I'm trying to build aspnet\mvc and I'm receiving the following error after running build.cmd /t:Restore from the cmd line per the instructions here.
The current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0.
According to dotnet --info I have the 2.0.2. Is that not a high enough version?
What am I doing wrong?
Try checking your global.json file in the root of the project/solution.
I had the same problem when opened a old .NET Core project and tried to compile it in multi-target mode for both .NET Standard 1.6 and 2.0.
{
"projects": ["src", "tests"],
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
Since I had .MET Core SDK 2.0.3 installed I just changed the version property to
"version": "2.0.3"
You might also remove global.json file completely, since it considered deprecated after .NET 1.0 => 1.1 migration and project.json / runtimeconfig.json / global.json / hosting.json / .. infrastructure being dropped in favor of .csproj format.
You can try replacing it with
<RuntimeFrameworkVersion>2.0.3</RuntimeFrameworkVersion>
for every project.
However some people suggest avoid using both global.json and <RuntimeFrameworkVersion> for painless .NET Core SDK/Runtime updates.

Resources