Setting up 32feet library - c#

I'm trying to get started with this library: 32feet
I have a Broadcomm Bluetooth Stack and haven't been able to figure out how to get this library set up. When I run my code, I get:
Unhandled Exception: System.PlatformNotSupportedException: No supported Bluetooth protocol stack found.
After digging around on their site, I found this: Installation instructions
It says to copy the appropriate DLL's into the project and then run the Test32FeetWidcommWin32.exe. I've tried putting the files in every single folder in my Visual Studio project and then running that EXE, but I still get the same error. Initially I tried just adding the InTheHand.Net.Personal.dll file as a reference to my project, but that didn't work either.
What could I be doing wrong?

It may also simply be that BlueTooth is not turned on in Windows.
I was using the .NET InTheHand library, and received this message only because BlueTooth was turned off in Windows, and resolved it by activating BlueTooth.

I just solved this. I think the problem was an old reference in my project to the NETCF version of the DLL from when I was trying to brute-force a solution, so I wiped my project clean and then started adding everything again and it worked!
A helpful tool to those trying to figure out their problem with this is to copy and paste the app.config file into your release directory with the app you are creating, and change the name to <YOUREXENAME>.exe.config. When you then run your EXE file, it should create a more detailed trace file. For mine, I found that coredll.dll was the culprit by not loading and was masked by the Stack not supported exception. After an easy Google search I found the problem to be with NETCF.
edit: To be clear, after I cleaned out my project a bit I re-added the reference to the correct InTheHand.Net.Personal.dll file and also added the 32feetWidcomm.dll file to my Release folder.

Related

Opened Templates result in Invocation Error due to missing files

Whenever I attempt to open any Unity Template in order to create a new project, the importing process is interrupted by a compilation error, that prompts me to go into Safe Mode. Upon opening Safe Mode, I am confronted with 99 error messages, all in the style of
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\[myuser]\Library\Bee\artifacts\mvdfrm\Unity.VisualScripting.TextureAssets.dll_4E2F4234F69DBB7F.mvfrm'.
However, my project directory is not in that location. I have tried installing Unity on 3 different drives (2SSD, 1HDD; clean reinstall including deleting %appdata% files and Registry keys). I have also tried creating different projects (2D & 3D) in several locations. All with the same result. Copying a friends /artifacts/ directory did not solve the issue either. Upon closer inspection, I discovered that the files in question are indeed in the project\Bee\artifacts\ folder during the working installation/import and then disappear upon error message.
At this point I have tried reinstalls of Unity, UnityHub, several restarts and clean reinstalls. I tried reimporting Assets via Unity Menu, deleting singular folders in order to force a reimport, a manual reimport, manual editing of manifest.json, deleting and reinstalling packages via Package Manager all with the same result or lack thereof.
Version: 2021.3.6f1
OS: Windows 10 Build 19044.1826
I have worked successfully with Unity on this same PC before and no other programs have ever had any problems. At this point the problem just doesnt make any sense to me anymore, I appreciate every help I can get.
Thank you
EDIT: It appears to have been caused by Anaconda, which destroyed my entire primary drive during its deinstall. After fully resetting Windows and reinstalling virtually everything, Unity finally works.
However, I still dont know the exact cause of the problem, nor a solution that does not involve the nuclear option.

Can't run a windows form app on other PC, can't find a dll from a project of the same solution

(First things first, I'm kind of new on this type of programming)
I'm trying to make a windows form application where i request data from a PLC so it can be stored in a access database. This application is going to be running on a different computer.
On the solution i created and besides my project I'm using an existing project that works "like" the communication between the app and the PLC, it is called LibplctagWrapper (on my main project I create a reference to this last one)
(https://www.mesta-automation.com/how-to-communicate-to-an-allen-bradley-plc-with-c-and-libplctag-ethernet-ip-library/),
and it works on my PC, but every time y copy the Bin folder to the new computer, then run the app, it opens, but a warning popup messages appears. Saying: Unable to load DLL "plctag.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E).
The LibplctagWrapper is in another directory than my Solution and Main Project so I moved it to C: so the direction will be the same on the new computer. But it doesn't work.(copy the LibplctagWrapper in C: of the new pc as well)
Moved the entire solution/main project to C: as well... the same result.
Instead of just the bin folder i copied the entire project folder... im thinking the problem goes with the fact that the LibplctagWrapper is not in the same direction? but I don't know how to place it in the same direction... I search on visual studio but I never saw the option to move it.
Unable to load DLL "plctag.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E).
This error message is quite generic, missing dependencies can cause it as well as the mentioned module not being present at all. Check the Dependency Walker ( http://www.dependencywalker.com/) to discover required C++ runtimes or something alike. Remember to take x86/x64 into consideration.
#JavierMata - I think you have probably resolved this issue, but for others encountering something similar you can use the recently released official wrappers which can be downloaded via nuget. Github link: https://github.com/libplctag/libplctag.NET
The libplctag.NativeImport package handles loading the appropriate C runtime so you don't have to.

Error "mscoreei.dll not found" in VS2015 debugging

When I'm trying to debug my dump file I get an error:
mscoreei.dll not found
mscoreei.dll was not found in the minidump. You need to load the binary in order to find the source for the current stack frame.
I have a project in C# that can hang sometimes on other computer. Each time as it hangs, 'procdump' app creates minidump file for me. Previously, I could normally open this dump file in VS2015, which shows me a stuck place in the source code.
Everything works fine till I made a 'clean up' in the repository. I didn't add any line in the code, I just clean up repository and all my .pdb files were exterminated. I build project again to restore .pdb files. But now as I try to debug dump files, VS2015 shows me page "No Binary Found" with error message written above.
I didn't make any changes in the source code. I didn't modify my environment. Debugging stops working as I made repository clean up.
When I'm checking 'Stack Frame' list, then evrything that is coming after "mscoreei.dll!7311ffcc" have format "[Frames below may be incorrect and/or missing, no binaries loaded for filename]".
I found the problem. It turns out, that my environment changed. From the last build when debugging worked correctly, Windows Update service updated my .NET library. As result my new build is using updated .NET files, but dumps are created for old .NET. Restoring correct version of .NET helped me.

"The path .. would result in a file outside the App Bundle and cannot be used" Error, mono touch / Xamarin

i am currently facing a really weird and annoying error message after migrating my Xamarin.IOS - Project to the 64bit unified - API. The exact error message is:
/Users/falcowinkler/Dev/AHK_App -Kopie/AHK_App_iOS/../ahk_app_ios/resources/.DS_Store:
Error: The path '../ahk_app_ios/resources/.DS_Store' would result
in a file outside of the app bundle and cannot be used. (AHK_App_iOS).
I get that error not only for .DS_Store but also for two other files.
Here are the things i tried.
Clean / Rebuild
delete bin / obj Folder and rebuild
I deleted the files that throw the error, just to get another message that the project is missing these files. I added them again after that, and got the same error as above again
I tried moving my project to other locations, but the error does not change in the slightest.
I tried to remove all problematic files, before migrating, which didn't work as well.
Does anybody know where all the file references are stored in Xamarin, so i can view/edit them to find out what the error is?
I mean the DS_Store file is just a tiny file from mac - finder architecture, is not even necessary for my project, but still it is referencing it, i will just have to kick out these references i guess.
If anybody encountered these issues as well, and has a solution, pls leave a quick post here, thanks :)
Update
I am now pretty sure that there are some misplaced references to files in my project, i saw a similar issue on git hub. But how can i wipe them out? I tried removing my entire resources Folder and adding it again, but it didn't help either. Error message now looks as follows:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets:
Error: Bundle Resource '../ahk_app_ios/resources/.DS_Store'
not found on disk (should be at '/Users/falcowinkler/Documents/AHKKopie/ahk_app_ios/resources/.DS_Store') (AHK_App_iOS)
If anyone else has this problem, just search your project files for the filename. The .csproj File will appear, where you will be able to wipe out the reference to the file, causing the problem.
If you are using Xamarin Studio, you can delete the .DS_Store under your Ios project [ProjectName.iOS] under the Resources folder

Unable to load DLL XXX.dll, Can not find specified module.(Exception from HRESULT: 0x8007007E)

Recently I wrote a small winForm program using C# language. In the app I use C# to invoke a "*.dll" file written in C++. It works all right in my Visual Studio 2012 and on my computer, but when I move it to other computer, it always pops an error about “ Unable to load DLL ' *.dll',can not find specified module.(Exception from HRESULT: 0x8007007E). ”.
I've searched the internet for solution. There are also some similar questions regarding problems that others met and it seems that they also have not found the right solution yet. I also tried some methods like moving my '*.dll' file to windows\system32 or write the app current directory to System Enviroment Variable, but this also didn't work.
Now I really don't know how to deal with it. So I'll be very appreciative if someone could give some help.
I'm new here and thanks very much.
Pretty old post but shows up first in Google so I am gonna post my solution to the issue: I was writing a minimal DLL in C++ which I integrated in a minimal C# console application and got the same error that you stated above. The final fix is simple: Your target PC might not have the appropriate VS redistributable package installed. In my case (VS 2013) it was this one here: http://www.microsoft.com/en-us/download/details.aspx?id=40784 for some reason it does not work to copy the required DLLs from the system32 folder manually... what a freak bug taking me half a day to find out. I did not find this anywhere online, will do some cross-posting now...

Categories

Resources