Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want an AnyCPU dll for PCRE for C#. In the currently available PCRE.NET we can make it either 32 bit or 64 due to its C++ dependencies. Is there an implementation that can be truly MSIL, like using DllImport with an if else for selecting the correct source based on the application. If not, Can anyone guide as to how to make one. Any help would be appreciated
Disclaimer: I'm the author of PCRE.NET.
PCRE.NET is an AnyCPU assembly, which ships both an x86 and an x64 version of the native library inside. It will choose the correct one at runtime. It won't run or ARM or any other architecture though.
If you want some details, the main MSIL assembly contains two mixed-mode assemblies in its resources. At runtime, it will choose the correct one, unpack it into %TEMP%, then load and use it.
You need to have the MSVC 2015 redistributable package installed though, because the C++/CLI part depends on it.
To make the library compatible with .NET 4, you'll have to replace some interfaces like IReadOnlyList<T> with IList<T>, Volatile.Write with Thread.VolatileWrite etc.
As for this line:
System::Threading::Volatile::Write(_calloutInfoByPatternPosition, dict);
You could replace it with:
#undef MemoryBarrier
System::Threading::Thread::MemoryBarrier();
_calloutInfoByPatternPosition = dict;
Not that pretty, but works.
Last but not least, make sure to run the build script (build/Build.Bat) to compile the library, as it will execute the steps required to embed the mixed-mode assemblies inside PCRE.NET.dll.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
How to read .RData files from .NET?
Solutions provided to similar questions automate R to open an .Rdata file and return the data. The recommended way to do it in .NET would be to use the R.NET library, which is designed for fast data exchange with R.
But is there any way to read the .RData file from .NET without having R installed on the machine?
R.NET might still be the best way to go as it can be used without having R installed.
From the R.NET library GitHub page:
R needs not necessarily be installed as a software on the executing
machine, so long as DLL files are accessible (you may need to tweak
environment variables for the latter to work, though)
Note: R is provided under GPL 3 license, which mean that if you embed its DLL in a commercial .NET application, the source code of your application must be open:
You can distribute your application using a GPL library commercially,
but you must also provide the source code.
If you distribute this library in an executable, you must disclose your source code by
providing it either alongside your distribution or list an accessible
way (URL, physical copy) to obtain the source for 3 years. Does not
apply if you serve through a web portal.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to use a C# .NET diff/comparison library for text files (C++ to be more precise, but it should not matter).
I have found a lot of libraries in the topic but what I need is a something that is part of the .NET library or it comes from Microsoft. The reason of this restriction is that I do not have to go over our company's long open source tool approval process.
Does C# .NET has such feature?
An example for the usage: I have two slightly different .cpp files. I have to create one .cpp file which will have a #ifdef according to the differences of the two files and we can use one file at two places controlled by a predecessor definition.
There is no such built in functionality in any Microsoft .Net library.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have got C# .Net based applications. Is there any way I can run these applications for Apple IOS. I don’t have resources to develop all applications from scratch.
Many Thanks,
Ni
First of all, you can not just run your existing .NET programs unmodified on the iOS platform.
The .NET runtime does not work on iOS, nor will it (in relation to current app guidelines regarding runtime compilation). Mono has the same fate and will not run on the iOS platform.
Your only option is to get the code compiled to native iOS executables, and this will involve 3rd party tools.
One of those is the MonoTouch product. It is not free.
Note that this is not a technical limitation. The .NET runtime could run on the iOS platform if Microsoft, or Mono made it for that platform, but Apple does not allow such runtimes (the ones that download/execute not-yet-100%-compiled code) on their platform at all.
This is the same problem that prevents Flash from executing on the platform. The way Flash has gone to solve this is to compile the Flash programs to native iOS executables.
You can use the tools made by the mono project.
These will not support all of the MS namespaces (non of the windows specific ones, such as WMI) and your application code needs to be written to be cross platform (so using Path.Combine for directory paths instead of concatenations).
Try the MoMA tools to see if your code is cross platform and get recommendations for fixing it if it is not.
Take a look at Xamarin for IOS. Integrates nicely with Visual Studio otherwise you can use its own IDE.
You can also reference .net assemblies. Hope this helps.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
A beginner question I am sure, but I have just started working with a DLL provided by Vandyke software (VRALib, a COM and .NET API for scripting SSH2 connections) so while I am happily now coding on my PC, I am not sure how you go about redistributing DLLs along with the application to other PCs.
Does any one have some beginners guides to working with 3rd party DLLs and best practice methods and tips / tricks for redistribution?
Ok, well if its a COM DLL with a managed .NET API, you need to make sure that you have a means for installing and registering the COM DLL on the PC. The .NET API can just be copied along with your application.
There are various ways of registering DLLs, there's a command line program regsvr32 which is a bit ugly but functional. Here is an article describing how to register COM DLLs from .NET code.
Does the Vandyke software come with an installer that you can just run from your installer? Do they provide a means of running the installer in a silent mode?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm trying to figure out how to manage our main Visual Studio solution.
In the solution we have to manage C++/CLI projects, C++ native projects, C# projects, external dependencies (compiled C# assemblies with their own dependencies) managed by other teams and frequently updated (together with their dependencies).
Every type of project can be a dependency for each other (except C# or C++ native of course).
Some C# projects have dependencies on external DLLs which can require some other DLLs to work properly.
Until now we have used post-build-steps to copy references to each project's output directory (additional dependencies for C# libraries compiled externally and required C++ DLLs).
We would like to automate this process. Projects are many, and external DLLs are often managed by other teams (sometimes they add more and more dependencies) and we would like every change made by them to be automatically reflected on our main project.
Is there a tool, a best practice for batch files, or something not to lose ourselves in this dependency hell and just make a svn update and a little configuration effort every time a new project is included in a solution?
One of my problems is if I have a C# project1.dll which requires C# project1a.dll and C# project 1b.dll, if my C# project2 requires project1.dll I would prefer not to add project1a.dll and project1b.dll to project2 references but I would like to find it in my output folder (this is because project1a is managed by another team and day by day could require project1x.dll to work).
How did you solve this requirement?
Here's a Microsoft Connect suggestion requesting simular features, (this one's mine actually). Unfortunatly references do not update with your solution build configurations very well. It forces you to split up your project and maintain redundant project/solutions in some cases (like binary references).
If you can build all of your project from source then you have nothing to worry about, but this is rare, and you can see in the connect suggestion, it's not possiable for some system dependencies.
Here's a blog post for some heavy duty for build customization.
You could try using NuGet and hosting your own package feed?