Add Web API To .Net Core Console Application - asp.net-core

There is a simple dotnetcore console app project that I want to add an api controller class on it.I searched too much and I had wild goose chase.somebody says you should use OwinSelfHost but when I would install that I see this message on NuGet package manager:
Nuget Package error -
this package may not be fully compatible with your project.
How can I do it ?

Related

How to resolve compile errors after adding a WCF net tcp service reference in .Net Core Console App targeting .Net 5

After I was able to add a WCF net tcp service reference to my .Net Core Console App targeting .Net 5, under the Dependencies -> Assemblies, System.ServiceModel is listed but has a yellow triangle.
When I checked the Microsoft Docs on this, there was mention it would add needed Nuget packages but non are listed for the project.
Please advise and thanks for your help,
Bob
Find Manage NuGet Packages in the project
Click Browse, search for System.servicemodel in the search box and install the Nuget package for the project.

TinyMCE not installing the default scripts

I have created a asp.net core 2.2 web app and I want to integrate TinyMCE in it. I found out that you can download it as a nuget package but when I installed it, the package did not come with the TinyMCE js template folder(It just said that the package was installed and that's it). How can I install TinyMCE properly?
NuGet does not support copying content files to your project directory any more. This was changed when PackageReference was introduced which is the new default and only supported way to include package references in .NET Core projects.
So while TinyMCE still updates the NuGet package, you will only be able to consume it properly in classic non-Core ASP.NET MVC projects on the .NET Framework.
If you want to use TinyMCE in ASP.NET Core, you should look at other mechanisms to include JavaScript dependencies in your application.
When you take a look at TinyMCE’s “Get TinyMCE” page, you will see a few options. If you already have some npm-based deployment set up, then you should probably get it from npm. Otherwise, you can also just download a static release and copy it into your wwwroot directory. This would actuallly have the same effect as using the NuGet package (if that worked).

fully compatible powerbi.api package with aspnetcore?

i was able to get the sample asp.net embedded powerbi to work with my reports
now i have to migrate it aspnetcore
i was hopeful when i saw this post - seeing that someone was able to get it done
Embed Power BI Report In ASP.Net Core Website
so i:
started a new project with the aspnetcore
installed the powerbi package
now when compiling im getting this warning:
Package 'Microsoft.PowerBI.Api 2.0.11' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
i searched and couldnt find a powerbi package that was specific to aspnetcore
is there one? will there be a conflict crossing cores? or does it not matter?
UPDATE:
4.6.1 powerbi package does indeed work with aspnetcore 2
but looking forward to a powerbi package specifically coded for core
As you can see this is just a warning, not an error. That warning appears because .NET Core 2.0 applications can use some Nuget packages which target .NET Framework 4.6.1 (or less). However, this inclusion might fail if the referenced .NET 4.x package contains some API not included into .NET Core/.NET Standard 2.0
So, my advice - try to run your application. If it works well at the first glance - then, most probably that PowerBI package does not contain any not supported APIs and will work well further. If it fails right at start - then you will need to wait for the release of the new version of that package which targets .NET Standard 2.0.

Google plus api nuget package download

I want to include Plus.v1 namespace in my mvc application. I am unable to find any package on nuget to download the dll's.
www.nuget.org has been experiencing some problems, especially related to search. Please check back later and sorry for the inconveniences.
Run the following command in the Package Manager Console: Install-Package Google.Apis.Plus.v1
To access PMC (Package Manager Console) go to "Tools -> Nuget Package Manager -> Package Manager Console"

windows 8 store app - dependency issue - certification failed

We just submitted app in windows 8 store (metro style app) and got the error:
XXX takes a dependency on Microsoft Visual C++ Runtime Package framework but is missing the framework dependency declaration in the manifest.
We had our app working fine in release version but it was not getting accepted as package so we needed to migrate our app as Windows RTM. During that we had following entry
in manifest:
<Dependencies>
<PackageDependency Name="Microsoft.VCLibs.110" MinVersion="11.0.0.0" />
</Dependencies>
If we keep this, we get following error while build the app.
Error : DEP0700 : Registration of the app failed. Windows cannot install package 5d6f272d-c915-4de1-a9d6-c0c08d63ab94 because
this package depends on another package that could not be found. This package requires minimum version 11.0.50727.1 of framework Microsoft.VCLibs.110
published by any publisher to install. Provide the framework along with this package. (0x80073cf3) Test_App1
So we removed it and submit the app, it just got failed and gave following error.
XXXX takes a dependency on Microsoft Visual C++ Runtime Package framework but is missing the framework dependency declaration in the manifest.
We need to keep this package itself in the manifest but not getting it done.
I had similar problem.
Add a reference in your project to Microsoft Visual C++ Runtime Package
Just click on project i select Add reference and find this Package. Adding this should resolve your problem
The issue got resolved by updating
"Microsoft.VCLibs.110" to Name="Microsoft.VCLibs.110.00"
Just I've repaired the VS 2012 for windows 8 from Control panel > Programs and the designer works fine.