class-library

Why is this class library dll not getting information from app.config

 ̄綄美尐妖づ 提交于 2020-01-04 04:12:28
问题 I am developing a custom HttpHandler, to do so I write a C# Class Library and compile to DLL. As part of this I have some directory locations which I want not hard coded in the app, so i'm trying to put it in the app.config which I've used before. Before this has worked by just going building the app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Share" value="C:\...\"/> </appSettings> </configuration> And then obtaining this in code like: var

Is there a way to make a native cocoa class library in MonoTouch?

醉酒当歌 提交于 2020-01-03 16:57:30
问题 I know that MonoTouch compiles code down to native machine code. Is there anyway to make a native (.a) class library using MonoTouch? Just to be clear, I'm not looking to share code between the two since I know that is not possible. 回答1: I believe it might be possible, but it would be hard work, and it's a long way from shrink-wrapped out-of-the-box functionality. For reference, take a look through the answers on Is there a way to mix MonoTouch and Objective-C? - that question is about how to

How to get user's location while chatting with bots?

走远了吗. 提交于 2020-01-02 03:14:31
问题 I am developing a Bot Framework application that integrates with Slack using Microsoft Bot technology. In the bot project, I was trying to get the user location when the user sends a message. What I am trying to achieve is that, when a user types the message "Show me nearby hospitals", I want to get the users Geo coordinates and pass them to an API that will return a list of hospitals near that location. So any idea on how to get the user's current location in the Microsoft Bot project? I

How to load views from a Class Library project?

為{幸葍}努か 提交于 2020-01-01 02:44:00
问题 I tried to create a VirtualPathProvider and set the view as an embedded resource. class AssemblyResourceVirtualFile : VirtualFile { string path; public AssemblyResourceVirtualFile(string virtualPath) : base(virtualPath) { path = VirtualPathUtility.ToAppRelative(virtualPath); } public override System.IO.Stream Open() { string[] parts = path.Split('/'); string assemblyName = parts[2]; string resourceName = parts[3]; assemblyName = Path.Combine(HttpRuntime.BinDirectory, assemblyName); var

Calling Javascript from a Class Library

为君一笑 提交于 2019-12-31 03:05:15
问题 I have created a class library DLL to be referenced from any third-party application and it contains only one function that calls a JavaScript to read a local file and returns some values from the file to referencing application. I used: System.Web.HttpContext.Current.Response.Write but it writes the JavaScript function at the beginning of the referencing page so it can never be executed. Then, to write the JavaScript at the end of the referencing page I used: Dim CSM As UI

NET Standard vs Net Core App: when creating .NET Core Project (using console or class library)

那年仲夏 提交于 2019-12-30 06:06:44
问题 I am trying to develop my projects to be cross platform. I have created several class libraries in this way: But, when I was using Entity Framework to scaffold my DB, the nuget packages needed didn't install except when used in Console application. Here is the difference, the console app references the .NET Core: And the Class library references NET Standard: So why they are both under .NET Core but referencing different libraries? Are both of them Cross Platform or only the console which is

NET Standard vs Net Core App: when creating .NET Core Project (using console or class library)

被刻印的时光 ゝ 提交于 2019-12-30 06:05:34
问题 I am trying to develop my projects to be cross platform. I have created several class libraries in this way: But, when I was using Entity Framework to scaffold my DB, the nuget packages needed didn't install except when used in Console application. Here is the difference, the console app references the .NET Core: And the Class library references NET Standard: So why they are both under .NET Core but referencing different libraries? Are both of them Cross Platform or only the console which is

How to debug class library that called from external app?

瘦欲@ 提交于 2019-12-28 09:55:05
问题 There is an external workflow that executes C# scripts and is able to work with DLL files(my class library). Is it possible to attach debug to my class library project so breakpoint will hit once this WF will call it? Thanks 回答1: Yes, you can do this with Visual Studio. You have two options: Configure your project to start the external program Open your DLL project. On the properties for the project, go to the Debug tab. Choose Start external program and give the path of the external program

How to debug class library that called from external app?

时光毁灭记忆、已成空白 提交于 2019-12-28 09:54:37
问题 There is an external workflow that executes C# scripts and is able to work with DLL files(my class library). Is it possible to attach debug to my class library project so breakpoint will hit once this WF will call it? Thanks 回答1: Yes, you can do this with Visual Studio. You have two options: Configure your project to start the external program Open your DLL project. On the properties for the project, go to the Debug tab. Choose Start external program and give the path of the external program

Class Library in C#

吃可爱长大的小学妹 提交于 2019-12-25 09:44:16
问题 I tried to create a class library that is being used in a winforms application in C#. In my application I have input from a textbox and through a button click I'm instantiating my event with one parameter (from the textbox). I tried to create a constructor with this one parameter - but to no avail. It seems if I just add a class to be existing project I can do this but not when referencing a class library. Just wanted to find a way to use a one parameter constructor within a class library if