OPTICON API - unable to load example visual studio project - sdk

Im trying to make use of the Opticon API to write an app that will read the barcode data from the device. Opticon have a website for the API download.
http://wiki.opticonusa.com/techsupport/en/OPN-2001#Downloads
but when i open the example project in visual studio i get a reference missing,
the project folder has "csp2.dll" files in it. but i so far have not worked out how to add that reference to the project. I have tried to "Add Reference" and browse to the .dll file but this just causes Visual Studio to crash, is there something more I'm missing?
The Opticon OPN SDK does talk about "C-Library Kit", but from what i can read this seems to be for C++, rather than C#.
The documentation for the SDK seems to be rather old and for much older versions of Visual Studio.

Related

Context menu missing in Visual Studio 2022

The project that I'm working on uses the Visual Studio (2022) extension 'Unchase OpenAPI (Swagger) Connected Services' to generate a C# controller. My colleague and I have both followed a tutorial on Medium to setup this extension, and we have both installed version 1.7.1. However, in the solution explorer, I don't get the context menu item to update the connected service whereas my colleague does. The attached picture shows my environment (upper) and his (lower), and as can be readily seen, I'm missing an option.
So far I've tried to disable and enable the extension, restarting VS, and even restarting the PC.
Any idea why I cannot update the connected service?
It seems it is a bug in Visual Studio 17.2.x. Workaround is to use NSwagStudio, but the template folder has (if you use it) is now relative to a temporary folder, not the one .nswag definition resides into.
https://bytemeta.vip/repo/unchase/Unchase.OpenAPI.Connectedservice/issues/70

Xamarin Android use “Bundle assemblies into native code” and "obfuscation"

I am trying to combine obfuscating my xamarin android project and then bundle the assemblies into native code with the Visuals Studio 2017 Pro option.
I was able to obfuscate my assemblies with this tutorial https://blog.noser.com/xamarin-android-code-obfuscation/
Unfortunately the obfuscated assemblies does not find its way into the native bundle.
Likely i intercepted the build proccess at the wrong place.
<Target Name="Obfuscate" AfterTargets="_CopyIntermediateAssemblies" Condition="'$(Configuration)' == 'Release'">
Does anyone know how to merge the obfuscated assemblies into the native bundle? Thx for help in advance.
I help develop another .NET obfuscation/protection tool, Dotfuscator.
We've written a Xamarin build integration that automatically handles protection as part of the normal build process, so you don't have to manually write your own MSBuild targets or copy files around.
The official Xamarin docs recommend using Dotfuscator to protect Android builds, but this integration also works for iOS and UWP.
As Dotfuscator's Community Edition is included in Visual Studio, you can try this integration out for free.
I wrote a guest post for the Xamarin Blog that explains how to do this.
Edit regarding the setting in the question: I did some limited testing and Dotfuscator works fine with the "Bundle assemblies into native code" setting. I installed the latest version of Visual Studio 2017 Enterprise, version 15.7.2, but found out that version has a bug related to this setting. To work around it, I used the unofficial VSIX install mentioned at that link. Then I opened a Dotfuscator-Xamarin sample app and enabled the native code setting. I also added code to the sample to show the name of a class used by the application. Then I deployed the app to an emulator. The app ran normally and the logging statement showed an obfuscated name for the class, indicating that Dotfuscator correctly protected the app before it was bundled into native code.

MvcSiteMapProvider.dll not working in Visual Studio 2013

I have a MVC 2 project created in Visual Studio 2010 that use MvcSiteMapProvider.dll and works fine. But when loading the project in Visual Studio 2013, everything else work fine except it crashes at
Html.MvcSiteMap().SiteMapPath
The error message is
An exception of type 'MvcSiteMapProvider.MvcSiteMapException' occurred in MvcSiteMapProvider.dll but was not handled in user code
I believe that MvcSiteMapProvider.dll cannot be loaded correctly. I need help on this. Thanks.
Note that there is a separate DLL for each .NET framework version, and I suspect you are targeting the wrong framework. This can happen if you install MvcSiteMapProvider into your project and then change it to a different .NET framework version.
NuGet does not automatically upgrade/downgrade packages to the currently set framework version. This step must be done manually. The best way is to completely uninstall and reinstall the package as per this document. Also be sure to read this before attempting it.
But do note that if you do this NuGet will not remove any files you have changed (like Mvc.sitemap) and then prompt you whether to overwrite them. You should normally say no to each prompt to ensure your custom configuration is not overwritten.
Also note that it is not sufficient to use Assembly Binding Redirection with MvcSiteMapProvider because with each .NET framework version we create a separate build (DLL) that takes advantage of features that are not present in prior versions.

Can I create a Visual Studio project file from files on a server?

I have access to a working ASP.NET MVC 4 website through FTP but do not have the Visual Studio project file. Using these files can I create a Visual Studio project file?
If you have access to all the class files, views etc but are just missing the solution/project file then technically you can wrap them up in an empty project but it would still be a different project.
If you only have access to the published output (the views and JavaScript) then in short the answer is no, not without trying to reverse engineer the dll which I have heard is possible but have never tried myself.

Cannot add System.Net.Http reference to Xamarin.iOS Library project

I am using Xamarin's Visual Studio pluggin. I have a Xamarin iOS Library project and it needs to use System.Net.Http in order to compile. However, I cannot seem to add it as a reference. I have updated my Xamarin Studio to the Alpha version, but still cannot see System.Net.Http in the Assemblies list when attempting to Add Reference.
Any help here would be GREATLY appreciated as I am inches away from getting this thing implemented, but am stuck on this one reference.
Is this available in Visual Studio (with Xamarin Pluggin installed), or is it only in Xamarin Studio?
Thanks in advance for your help !!
WOW !! What a work around.
Ok, here's the solution. Looks like the Visual Studio pluggin does NOT get updated when you update Xamarin Studio on your windows box. HOWEVER, when you go to your mac build server and update Xamarin to the Alpha version, then open a Xamarin Project in Visual Studio, it will prompt you that the build server and Pluggin are different versions and will allow you to upgrade. When you upgrade, after closing visual studio, then open visual studio again, VOILA!!! The System.Net.Http reference is now available under Assemblies when adding a reference.
So, the solution is to update your MAC Xamarin Studio to the Alpha version and then Visual Studio will prompt you for an update. Update it and you're golden !!
Seems like there should be an easier way, but this one worked.
i think you cant add The System.Net.Http reference.you should try this RestSharp
A simple REST client for consuming HTTP APIs..
RestSharp makes it easy to consume the wide array of services on the web over HTTP, like: Amazon, Facebook, or even Twitter...
http://components.xamarin.com/view/restsharp

Resources