How Syncfusion.blazor could work using refrences? - asp.net

image view
i have installed syncfusion.blazor component from nuget package and its updated in references, but when I am trying to use it its showing refrence couldnot be found, what could be the possible reason and solution ?

From what I've tested, it looks like you created a blazor webassembly app based on .Net Core 3.1(out of support).
But if you check the syncfusion.blazer 20.4.0.50 nuget package, you can find that it is based on .Net 6.0 or .Net 7.0.
At least try to use .Net 6.0, .Net Core 3.1 is out of support.

Based on the given screenshot, you have registered the Syncfusion Blazor service in the server project (DMSBlazor.Server). To resolve this issue, you should register it in the client project's ~/Program.cs file. For more details, refer to this link.

Related

.NET Core 5.0 Console with WebAPI

I once build a .NET Core Console App that contained a web host, so I could make controllers without using IIS. Isn't that possible in 5.0?
I need it to run as a service later. It used to be so easy :-)
I can't find any guides to that, but I can find guids addressing version 2.1.
Latest .NET Core project templates (and .NET 5 ones) use Kestrel by default.
You can find the related documentation here.
You can also find here specific documentation about running ASP .NET Core as a service in both Windows and Linux, and in the case of Windows, with and without IIS.

Outlook Interop in .NET Core 3.0?

I migrated our project from .NET Framework to .NET Core 3.0 (C#, WPF) and now I can not use Microsoft.Office.Interop.Outlook anymore, because it is not compatible with .NET Core 3.0. What I want to achieve is opening/sending prefilled Outlook Emails.
Is there an alternative to this interop dll, or maybe a way to use .NET Framework for only this reference?
Microsoft.Office.Interop.Outlook
NetOffice.Outlook
This worked for me:
Right click Dependencies and click "Add Reference"
Select Microsoft Outlook 16.0 Object Library under the COM tab.
Under Dependencies/COM in your project, select Interop.Microsoft.Office.Interop.Outlook reference, then under "Properties" set "Embed Interop Types" to "Yes"
I also had to uninstall the Microsoft.Office.Interop.Outlook NuGet package because it caused a conflict with the reference in Dependencies/COM.
Outlook automation is now working fine.
I am having the same issue when trying to use Microsoft.Office.Interop.Excel 15.0.4795.1000. It won't run when I target .net core 3.00 preview 7.
At this stage I do not think there is any other option than reverting back to .NEW Core 2.2.
I had the same problem while migrating components with Office interop for Excel and Outlook to .NET Core 3.0. I found out that this is only a problem of the Nuget packages Microsoft.Office.Interop.Outlook and Microsoft.Office.Interop.Excel. The packages probably need an update to work with 3.0?
If I make direct references to the Interop assemblies all is working well. Here is a link to an example for this.
If you use Visual Studio, you need an additional workaround to achieve this. From the linked sample:
Adding COM references to .NET Core projects from Visual Studio is not
currently supported. The workaround is to create a .NET Framework
project, add the COM references, and then copy the relevant
COMReference elements in the project.
This is possible in a roundabout way. Here is how:
Create a temporary .NET framework project.
Add the references to COM components (Microsoft.Outlook.Interop).
Open that csproj file and copy the entire those components are located in, over to your .NET Core project.
The nuget packages seem to be incompatible at the moment.
Reference: DotNet Samples

NuGet Server for .NET Core

The NuGet.Server package is used to create a ASP.NET MVC NuGet server and it works just fine. There is another package NuGet.Server.Core that is expected to do the same when hosted within a ASP.NET Core (perhaps 1.0 or 1.1?).
The first one creates 'Packages' folder right beneath the main folder used as a package repository.
No such things happens after installing the Core version. I tried both root and a dedicated folder. Googling a bit, I found no info about installing the package and integrating it in a ASP.NET Core app.
Has anyone succeeded in installing the Core version? Also, there's another version NuGet.Server.V2 which depends on NuGet.Server.Core, however it requires .NET Framework 4.6.1. This makes me think that NuGet.Server.Core is not targetting .NET Core at all.
If so, the name must be somewhat misleading, I guess...
Yes, this is the answer:
No .NET Core whatsoever! Just .NET Framework 4.6.1. Not a big discovery but a warning to all devs who, like me, were (and, more importantly, will be!) misled by 'Core' in the package's name.
Here's a 3rd party option (free)
https://github.com/loic-sharma/BaGet
Nuget.Server.Core seems to be one of the dependencies of Nuget.Server. So it's not a .NET Core project. Guess that's one of those snags you run into when you call your framework "Core". :)
I think you can use BaGet.
There is my article about that.
Check this :
Create your own NuGet server and package feed

.net standard library with HttpCient for xamarin forms

I was trying to create a common library for using HttpClient to consume an API. I was planning to make it in .net standard so as to share it with my xamarin.forms project right now and any future ones. However the highest version of .net standard I managed to use was 1.0. HttpClient needs standard2.0. I have included the latest version of .netstandard nuget into my xamarin.forms.
I have noticed that xamarin.forms runs in net4.5. According to the documentations the max I can go with this is standard1.1. Is there any work around around these to a .net standard common project or is my only option to make a .net framework project/xamarin portable library?
I used to be in the same situation and I managed to pull through this. First I tried to upgrade my current PCL project to .netStandard, but it was always failing, so I decided to create a new Project A Class Library (.NETStandard), moved all my files to the new project and re-install all nuget packages.
New project configuration:
Target Framwork: .NET Standard 2.0
Output type: Class Library
Make sure you're using Microsoft Visual Studio > version 15.3
Hope it helps.
I did manage to get HttpClient working in .net standard after manually importing the class. It needed an additional reference which is why it threw an error when I downgraded from .netcore.
This seems to work sometimes and throws reference errors other times. These errors go when I close and re-open visual studios.

Can I use a .NETFramework project within a .NETCoreApp project?

I am building out a website using WebAPI in .NETCoreApp v1.0. However, I am trying to connect to an API for blackbook which is in another project that is built in .NETFramework v4.5.
When I attempt to add a reference to it in Reference Manager I get the following error:
The following projects are not supported as references:
BlackbookWCFProxy has target frameworks that are incompatible with targets in current project MainProject.
MainProject:
.NETCoreApp,Version=v1.0
BlackbookWCFProxy:
.NETFramework,Version=v4.5
So does that mean I have to scrap my entire project because a single API was built in .NETFramework? What about the other APIs I want to use? How can I get it to work nicely with my project?
You should install .NET Core RTM to make a .net core project so you will find this on following link

Resources