I am trying out ZeroMQ to see if it can be used for my application. However, I have problem getting it to work.
OS: Windows 10
Programming Language: C#
SDK: VS 2015 Enterprise
From what I read in order to use it in c#, I will need clrmq (which contains clr namspace for .NET) and zmq.
I gotten the "ZeroMQ.Release.zip" from "https://github.com/zeromq/clrzmq4/releases" and within it, it contains libzmq.dll, libsodium.dll (both from i386 folder in bin) and ZeroMQ.dll (from bin).
When I try to add references (of the mentioned 3 dlls) to my testing project, I got an error stating
"libsodium.dll and libzmq.dll icould not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
In the end, I only manage to bring in ZeroMQ.dll.
Any help would be appreciated to help me start using zeroMQ in my testing.
Thanks.
Try to use NuGet package ZeroMQ. It will add required references properly.
Try to use Package Manage Console from Tools in VS. Install clrzmq and zeromq it'll solve all problem. In offline mode download the packages and install them.
Related
I want to create a g application with C# and Windows Forms. For this I have downloaded and installed the latest nuget from the official website (https://download.linphone.org/releases/windows/sdk/). But now when I want to make a call, the programme crashes with the error:
DllNotFoundException:linphone.dll
I have now tried various things: modify LinphoneWrapper.cs, integrating dll file into the project, dll file in bin folder, ... but had no success.
I tried the same thing with C# UWP and it worked without any problems. But UWP does not look like the right way to me.
I am still inexperienced: Is it even possible with this nuget and Windows Forms, or do I have to download and build (cmake) the linphone-sdk first?
Thanks for help.
Are you building for x64? linphone doesn't support targeting x86 (look here)
I am setting up a simple console project to connect to a database using a connection string. My problem is the project is NOT finding one of the required libraries at runtime.
When I run the console app the application fails.
I go look at the csproj file to ensure I have added the library. I run the command 'dotnet restore -force'. and it finds the library and reports no errors.
The same code works on other developer machines (Windows laptops) but it does not work on my MAC. I am using NuGet Package Manager and NuGet Gallery to ensure I have installed them correctly. I have uninstalled the libraries and re-installed them. It still does not work.
Have I done something wrong? Any suggestions or recommendations would be helpful.
After a lot of searching I found a work around.
I change the usage from System.Extensions to MicroSoft.Extensions.Configuration. I followed the instructions form this question on how to get the connection string.
I'm working on a Windows 10 universal app. The aim was to have a JS front end connecting to a C# library for the heavy lifting. Though when I add the reference and trey to compile I get the following error
Couldn't find the required information in the lock file. Make sure you
have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets.
I've looked around and in a few cases the solution has been to update Visual Studio and the NuGet packages which I have done.
Any suggestions would be great,
Thanks
Just change build configuration to x86 or ARM and it should work.
Any CPU is not supported by UWP projects, because they are built using .NET Native. You can read more about it here.
Why SQLite is not available on NuGet? Why it is part of Visual Studio where you have to go look for updates at Tools->Extensions and Updates? I started coding Windows 8 and Windows Phone 8 in the past few months and I like to get some insight into this.
To me, using SQLite on a Windows 8 project creates a VS-level dependency.
Let's say I develop a client library using the version of SQLite referenced by the Visual Studio IDE (Example: 3.7.x) and distribute the library to another developer who uses SQLite 3.8.x referenced by his/her Visual Studio IDE, will my client library still work?
What happened to me last week was this:
I developed a client library for Windows Phone 8 using SQLite and I had to use a 3rd party wrapper written by Peter Huene called sqlite-net-wp8.
It is available at: https://github.com/peterhuene/sqlite-net-wp8/
When you look at the Sqlite.vcxproj file (https://github.com/peterhuene/sqlite-net-wp8/blob/master/Sqlite.vcxproj) of this project, it has references to a given version of SQLite. Looks like every time you update SQLite on Visual Studio, you have to update the .vcxproj file too.
Something like:
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\SQLite.WP80\**3.8.0.2**\DesignTime\CommonConfiguration\Neutral\SQLite.WP80.props" />
</ImportGroup>
Let's say I develop the client library using 3.8.0.2 and give it to an apps developer who uses the same approach to talk to SQLite (using sqlite-net-wp8) for Windows Phone 8 apps and he/she uses a different version of SQLite (say 3.7.x or even a newer version 3.9.x), will my client library still work? I believe his/her sqlite-net-wp8 may be referring to a different version of SQLite than my client library, breaking the code.
When I updated SQLite 3.7.x to 3.8.x, it forced me to update the Sqlite.vcxproj to go find 3.7 and replace with 3.8 which was not good user experience.
I think ideally it should be backward compatible working with 3.7.x also. But it didn't.
If SQLite and sqlite-net-wp8 is available on NuGet, I can inform the developer who wants to use my client library the version of SQLite and sqlite-net-wp8 I use.
Any idea of overcoming the problem and have better developer experience dealing with the issue?
I believe the reason SQLite is not available on nuget is that it is a native package so the dll to be used need to be dependent on the target assembly platform which nuget don't seem to support yet
Regarding updating the version of sqlite for your project, you don't need to manually update vcxproj, just use "Add Reference" to remove and readd the reference to Sqlite (it will show up in the Add Reference window under windows ->Extension after you have install the extension)
I have followed the posts on this, but i am still not getting a few steps. I am new to C#, and that is probably the issue. I would love a little help (I have been banging on this all day).
I can open the FreeImage.NET solution (Win7 64 bit machine btw) in Visual Studio. This post says i need to Build it to get the C# dll. When i build it, i get hundreds of errors "type or namespace 'Name' could not be found".
Does it need the C++ DDL added first? I dragged and dropped it onto the solution, but still the errors.
Am i doing something simple and wrong?
Specifically what i am trying to do is add FreeImage to project in C# Visual Studio Express 2012.
Thanks,
Dan
After downloading the version of FreeImage.NET , I opened the following VS2005 Solution File in VS2012.(Thats the only one I have)
FreeImage3154\FreeImage\Wrapper\FreeImage.NET\cs\FreeImage.NET.2005.sln
After upgrading the project and building it for the first time, I saw around 491 errors. If you open the references of the UnitTest.2005 project, you will see that the nunit.framework assembly is missing. If you have nuget installed , in VS2012 you can
Right Click references > Manage NuGet Packages > Search for NUnit and install it.
In the image below we see that the nunit.framework assembly is correctly linked.
After doing this there were only 50 errors remaining and they were all because the Xml Documentation file checks were enabled. You can disable this check as shown below in the Library.2005 project.
Build again, and it should succeed.
NOTE: The FreeImage website provides only a 32-bit version of the DLL, thus to use this DLL you will have to ensure that you set your project version to 32-bit. To obtain a 64-bit version of the FreeImage DLL you will have o download their source code project and manually do a 64-bit build as show in this blog.