class-library

Creating cs2php compiler using Visual Studio 2017

微笑、不失礼 提交于 2021-02-11 06:25:38
问题 I found an interesting project on GitHub which allows converting C# code to PHP. Link: https://github.com/isukces/cs2php They Stated: "You have do download and build cs2php compiler by yourself. Source code is available on GitHub. Binary version is currently not distributed due to Microsoft Rosylin licence limitations." I'm having a hard time creating a cs2php.exe compiler. I tried building a Class Library project but all I get is dll file, when I change Output Type to Windows application I

Pass a c# array to a c++ method

时间秒杀一切 提交于 2021-02-08 04:10:46
问题 I have a CLR class library in c++: namespace ANN_Lib { public ref class ANN_FF_BP { private: int neurons; int inputs; int outputs; double **wi; double *wl; public: ANN_FF_BP(int neurons, int inputs, int outputs); void Train(double **p, double *t, int pairsCount, int epochs, double goal); }; } I am using this class as a reference in a WPF project: ANN_FF_BP neuralNetwork = new ANN_FF_BP(neurons, inputs, outputs); Now I want to call the Train() method (in WPF) from that class and pass in some

Pass a c# array to a c++ method

一世执手 提交于 2021-02-08 04:10:44
问题 I have a CLR class library in c++: namespace ANN_Lib { public ref class ANN_FF_BP { private: int neurons; int inputs; int outputs; double **wi; double *wl; public: ANN_FF_BP(int neurons, int inputs, int outputs); void Train(double **p, double *t, int pairsCount, int epochs, double goal); }; } I am using this class as a reference in a WPF project: ANN_FF_BP neuralNetwork = new ANN_FF_BP(neurons, inputs, outputs); Now I want to call the Train() method (in WPF) from that class and pass in some

How to create .Net 5.0 Class Library project in Visual Studio 2019 16.8.1?

瘦欲@ 提交于 2021-01-21 12:50:14
问题 I can not see the Class Library(.NET) option on Add a New Project window in Visual Studio 16.8.1. How can I create a Class Library (.NET) project? (Not .Net Core or .Net Framework) 回答1: If the project templates are still giving you .NET Core 3.1 as the highest option, and the project properties options aren't allowing what you want - it isn't a problem: simply right-click on the project in Solution Explorer and select "Edit Project File", to edit the .csproj, and you can change the target

What is the difference between a class library and a namespace?

落爺英雄遲暮 提交于 2020-07-04 09:01:25
问题 What is the actual difference between class library and a namespace? I know both are used to group together classes, namespace etc. Can anyone tell in which scenario should I use a class library and when to go for creating a new namespace. 回答1: Namespaces provide a notional separation for classes, class libraries provide a physical separation (in windows think a standalone dll). Class libraries are useful for when you want to wrap up functionality that can be shared with other projects.

.net standard class library - not support Distributed Transaction error

て烟熏妆下的殇ゞ 提交于 2020-01-24 15:29:06
问题 I developed a logging service in .net standard class library project. It is perfectly working without System.Transaction (TransactionScope class) . When I add transaction to a process, logger insert method throws an exception. [ This platform does not support distributed transactions. ] When I add code to core console app with System.Transaction it works. Is .net standard not supporting System.Transaction(TransactionScope)? NOTE: For now : .net core and nugets are lastest. Distribution

Can you create an initialize method for DLL?

纵饮孤独 提交于 2020-01-17 07:46:11
问题 I need to create a service, but the service needs to be in a already existing Class Library file and also the new service needs to start running after the Class Library is installed. Is there a way to create an Init() method or other way to start service inside in Class Library? The project supports max .NET 3.5 Sorry if it sounds dumb, i'm new to the Class Library stuff 回答1: No, class libraries don't support initialization like this. Note that the library wouldn't even be loaded until it's

Safe class imports from JAR Files

一个人想着一个人 提交于 2020-01-15 10:06:27
问题 Consider a scenario that a java program imports the classes from jar files. If the same class resides in two or more jar files there could be a problem. In such scenarios what is the class that imported by the program? Is it the class with the older timestamp?? What are the practices we can follow to avoid such complications. Edit : This is an example. I have 2 jar files my1.jar and my2.jar. Both the files contain com.mycompany.CrazyWriter 回答1: First, I assume that you mean that the same

Need to call a .Net Class library dll from a Classic ASP Page

旧街凉风 提交于 2020-01-15 06:51:27
问题 I need to call a .Net Class Library from a vbscript application I have written a C# class library and created a COM DLL component and a type library file I have successfully registered the dll and tlb on my local computer using C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\user\Visual Studio 2008\Projects\[Sample]\[Sample]\bin\Debug\[Sample].dll" /tlb "C:\user\Visual Studio 2008\Projects\[Sample]\[Sample]\bin\Debug\[Sample].tlb" The dll and the type library file are registered

Why am I getting the “LoaderLock was detected” warning when debugging?

此生再无相见时 提交于 2020-01-10 02:32:14
问题 I'm developing an add-on for AutoCAD 2009. The project output is a class library. When I attempt to debug and load the class library, I get this "LoaderLock was detected message." I've been writing these add-ons for awhile and this is the first message of this type I've seen. Where do I start trying to figure this out? What is LoaderLock and why is it bothering me now? LoaderLock was detected Message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code