While adding the class library I am getting an error - c#

I have created a C# web application project and added one new project "Class Library. In the class library, I am trying to add "ADO.NET Entity Data Model" but I am getting below snap error.
What is reason behind it. I am using visual studio 2019.

On which .Net Version did you create your web application project?
You need to create your project on a .Net version that is compatible to your added lib.

Related

I want to control Revit plugin with api. But I am getting this error "NetSDK1 ERROR"

I have an api project. I want the rvt file I want to convert the data result from this api to gltf format. I did not have such an error when I developed my plugin for testing purposes only, without using it with the API. I got an error when I added my class library (actually a ready template) to run this plugin in my api project. My class library uses .Net Freamwork latest version and my api project uses .Net core. What is the solution for this error?
Error : The target platform must be set to Windows (usually by including '-windows' in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so. RevitToGltfTrialApi

DataSet MSDataSetGenerator Not Working in .NET Core 2

I'm converting a .NET Framework 4.6.1 Library to .NET Core 2.1.2. The old data access library contains a DataSet. I've created a new Visual Studio project from the Class Library (.NET Core) template and added a DataSet. The Project does not group the DataSet.xsc and DataSet.xss files under the DataSet.xsd. Also, the Custom Tool MSDataSetGenerator does not generate the DataSet.Designer.cs file.
I found the problem posted on the Developer Community Site, see DataSet designer error in .net standard 2.0 library.
Does anyone know of a work around?

Not able to use My Class library in C#

I am using Visual Studio 2017. I have a solution and in that solution I have 2 projects. One project is a library I made. This library is using Target Framework .Net Standard 1.6 and Output type: Class Library. The other project is a Windows Application using Target Framework: .Net Framework 4.6.1 and output type: Windows Application.
I added my class library to my windows application and the reference is in the Reference section, but when I try to use a class from the library, it cannot find it. Also I tried adding the "Using MyLibrary" and it still cannot find the reference. What else can I do?
I'm not sure why but the whole solution must had been corrupted or something. So I remade a whole new solution and created the projects again and copied all my files over and it worked. Not sure what the whole problem was but it is now working.

Create a class library that targets asp.net 4.5 in Visual Studio 2015

Forgive if I am being incredibly dim, but how can I create a class library in Visual Studio that targets asp.net 4.5? As it stands, every time I add a new class library it defaults to DNX 1.0.0-beta5, which I don't want to use
For illustration purposes:
I create the initial MVC project targeting 4.5, which works absolutely fine
I then add a class library, again targeting 4.5
I then go look at it, and it's using .net 5 beta 5/DNX
If you go to the top level of C# templates instead of C#/Node, you will see three different Class Library templates: "Class Library (Package)", "Class Library (Portable)", and just plain "Class Library." Choose "Class Library."
The Class Library (Package) template is intended for creating Nuget Packages. I will pass along the feedback that this is causing confusion.

Xamarin Studio and reference to project

So i try to develop little andriod application by Xamarin Studio 5.4. I have three projects in my solution - project of android application (ClientProject), some class library that used by first one (MyLib) and some console application (ConsoleApp).
But when i try to add reference to MyLib into ClientProject i fail. Xamarin Studio tells me that "Incompatible target framework .NET Framework Version 4.0".
That looks this
I changed MyLib's framework version to 3.5, to 4.5 but it takes no effect.
But when i try to add this reference into ConsoleApp there is no problem:
So i have to add to ClientProject a reference to MyLib.dll so I can not debug its code.
What should i do to solve this problem?
The Android project will have a framework of MonoAndroid. This framework is incompatible with the full .NET Framework. Your options are to do one of the following:
Create an Android Library Project.
Create a Portable Class Library Project.
Create a Shared Project.
If you are only interested in creating an Android application, and not interested in using the library for other mobile platforms, then the first option will be the simplest.

Categories