.Net 6.0 How to Register Com DLL for Zebra barcode scanner on client machine - winforms

I somehow thought that when I deployed/ installed my .Net 6.0 winforms application on the client machine that the install program would be smart enough to register the "Interop.Corescanner" dll but it doesn't. THis dll is from the Zebra barcode scanner SDK.
What is the simplest way to make this happen? I have read a few posts but it doesn't appear that straightforward. I thought it would just be a property in the build somewhere
The properties of the Corescanner Com reference are:
CLS ID: db07b9fc-18b0-4b55-9a44-31d2c2f87875
Copy Local: Yes Embed
Interop Types: No ( this has to be no or it won't run )
Identity:
Interop.CoreScanner Isolated: No
Path: obj\Debug\net6.0-windows\Interop.CoreScanner.dll
Wrapper tool: tlbimp
It does copy the dll to the client machine when installed - but it is obviously not registering anything.

Related

Getting "Message from debugger: Error 1" - for simple project (in Xcode 11.0 11A420a) [duplicate]

This question already has answers here:
Mac OS X app crash with Code Signature Invalid error
(2 answers)
Closed 1 year ago.
my code is simple like this:
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
printf(" sizeof int = %lu\n", sizeof(int));
return 0;
}
run on xcode and got error:
Message from debugger: Error 1
Program ended with exit code: -1
run Terminal :
Tap PROJECT settings Signing & Capabilities, in Signing - Signing Certificate, if your selected is "Development", you can change it to "Sign to Run Locally" to have a try.
If you don't have a development certification, you can not be coding with that certificate mode.
The code that you've posted runs fine for me in an Xcode 12 project configured as a command line tool. Here's the output:
Hello, World!
sizeof int = 4
Program ended with exit code: 0
Try pasting the same code into a new project, and again, set it up as a command line tool. You shouldn't need to make any changes to the project default settings. If it works, compare that to your original project; the reason for the failure is somewhere in the original project's configuration.
From: https://developer.apple.com/library/archive/qa/qa1884/_index.html
Q: When I run my Mac app, it crashes immediately, and the crash log says Exception Type: EXC_CRASH (Code Signature Invalid). What is going on here?
A: The crash log indicates that your app is signed with your Mac App Store distribution identity, with the certificate’s Subject Common Name starting with “3rd Party Mac Developer Application.” Mac apps signed this way can no longer be run directly. Here’s the background on this.
Over time, more Mac App Store technologies have been added that require entitlements that come from a provisioning profile. This started with push notifications and iCloud. Later, Game Center and Maps were added to the list.
Recently, the com.apple.developer.team-identifier entitlement was added to all new Mac provisioning profiles. This means that, going forward, distribution builds of Mac apps cannot be run directly; they are for submitting to iTunes Connect for app review only
Instead, developers should adopt the Archive Build Workflow in QA1778: How to reproduce bugs reported against Mac App Store submissions for testing the builds that they plan to submit for the Mac App Store. On Xcode 6, select Export as a Mac Application. You won't see any chance to select your development signing identity, but Xcode will export the app from the archive as it was signed at build time. So the result will be the same.
You can create an installer package containing your development-signed app by hand with the productbuild tool, like this:
$ productbuild --component Sample.app /Applications --sign “3rd Party Mac Developer Installer:" Sample.pkg
Then install the package as documented in Testing the Mac Installer Package:
$ sudo installer -store -pkg Sample.pkg -target /
This workflow means that you will need to add your beta testers’ test systems to your Mac Developer Program account so they will be able to run your app.
Another possibility is to use Xcode Organizer > Export > Export a Developer ID-signed Application. Developer ID-signed apps can be run by anyone. However, code that uses technologies only available to Mac App Store apps, such as receipt validation, iCloud, and push notifications, will not work if your app is Developer ID-signed. You might need to temporarily disable those parts of your app if you opt for the Developer ID testing approach.
I have the same problem, which is very disturbing.
screenshot-img
These settings solve my problem. You can have a try.

Can Fody and its plugins be used with .NET Core (3.0)?

As the title says, I'm having trouble getting Fody, and the plugin Fody.PropertyChanged, to work in .NET Core 3.0, or any .NET Core version. Reading the issues on the respective GitHub pages doesn't answer my question, nor am I able to find any relevant answers.
Once installed I cannot run my WPF project anymore and I am given the following error:
The target process exited without raising a CoreCLR started event.
Ensure that the target process is configured to use .NET Core.
This may be expected if the target process did not run on .NET Core.
The program '[21820] CalculationToolsApp.exe' has exited with code -2147450749 (0x80008083).
Any suggestions?
EDIT: I found out that I (maybe) cant use "Fody.Costura" with "Fody.PropertyChanged" like this in the FodyWeavers.xml file:
<Weavers>
<PropertyChanged />
<Costura />
</Weavers>
Which shouldn't be a problem because with .NET Core I can create a single file application anyway. Removing the Costura reference from the FodyWeavers.xml solved my problem!
It should work. Fody is compatible with .NET Standard.
Create a new WPF app using the WPF App (.NET Core) template in Visual Studio 2019 or using the dotnet new wpf command
Install the Fody and PropertyChanged.Fody NuGet packages
Add a file named "FodyWeavers.xml" with the following contents to the project:
<Weavers>
<PropertyChanged />
</Weavers>
Build
If you then decompile the assembly using a decompiler such as for example dotPeek, you should see the injected code as expected, e.g.:
public string GivenNames
{
// Method get_GivenNames with token 06000009
get
{
return this.<GivenNames>k__BackingField;
}
// Method set_GivenNames with token 0600000A
set
{
if (string.Equals(this.<GivenNames>k__BackingField, value, StringComparison.Ordinal))
return;
this.<GivenNames>k__BackingField = value;
this.<>OnPropertyChanged(<>PropertyChangedEventArgs.FullName);
this.<>OnPropertyChanged(<>PropertyChangedEventArgs.GivenNames);
}
}
Costura didnt work in wpf with .net core 3.1 for me either.
In .net core 3.1 you can use this instead:
Build -> publish -> create profile -> Edit "Configuration"
Target Runtime = win-x64 (or what ever target system you want, but NOT "portable")
expand "File Publish Options"
check: Produce single file
save
When you now choose build -> publish -> publish button it will create the single file.
It seems to be that they stopped the costura project because of the "Single-file executables" feature of .net core. Though this feature is still behind costura because you have to set a target runtime.
https://github.com/Fody/Costura/issues/442
In dotnet core 3 there are two new features
Single-file executables
Assembly linking
With these features included in the dotnet tool set, the value
proposition of Costura is greatly diminished. With that in mind I
think long term Costura should cease to be used as people transition
over.
Please comment with any input.
Plan:
disable issues
PR will still be accepted but only for bug fixes
add note to readme
add note to nuget description
write a warning in
update for .NET 5:
for .NET 5 and the current visual studio version 16.10.2 the wizard changed. I could not get this to work with the wizard anymore though i checked the options for single file etc.. But using the console worked: tools -> command line -> developer command prompt -> enter this:
dotnet publish -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true
.NET 5 not compiling to single file executables

Codesign .app game for Mac Apple Store, after the creation of the PKG and the verification of the installation, the game does not start

I would like to ask for advice.
I created a game in the .app format
For the Mac App Store I have to convert it to PKG in order to use the Application Loader and send it for verification.
I performed all signing procedures successfully with codesign -f -s "3rd Party Mac application installer".
Then I created the PKG file.
Everything seems to have gone the right way, even the PKG installation check is correct.
The problem occurs when once installed in / Application I want to test the opening.
The game does not start, it closes immediately.
How can I do?
The strange thing that I noticed that the terminal had returned me "support macOS system: 10.9"
How can I change the macOS support at least to 10.12?

How Do I install an app on the ubuntu Touch device

I've been looking into Ubuntu Touch.
So I installed ubuntu on a Nexus 10 following the instructions here
I built the sample app following the instructions here
So now I have a device running ubuntu touch and an application, how do I put the application on the device?
You can use Qt Creator: Connect your Ubuntu Touch Device through usb open your project and simply press Ctrl+F12.
This works only if you have once installed ssh-server on the device.
Alternatively you can do it manually. Copy the necessary files (*.qml and *.desktop) to the device and start the application via ssh
qmlscene --desktop_file_hint=/usr/share/applications/qmlscene.desktop YourApp.qml
Source
Remember, this is all beta and if you are not a developer then you won't have much use for Ubuntu Touch at this stage. Eventually, Ubuntu Touch will have its own app store where it will be much easier to download apps and install them on your device.
If you are using the sdk provided by Ubuntu, then all you have to do is go:
Build -> Ubuntu Touch -> Install Application on Device
This will actually install the App instead of just running it. Now you can bring your prototypes with you =)

Debugging WPF browser applications gives a download file

I have built an application for my college work in WPF browser, but when I try to debug, Firefox opens and gives me a download of the xbap file, which should run in the browser. This happens in VS2008 Express and VS2010 beta. I have tried in Internet Explorer and Chrome with the same result. .NET is framework is installed right upto v4.0. This didnt happen before I started using Windows 7, but this shouldn't make much difference, right?
Any ideas?
Thanks
Check your MIME type settings in IIS. In earlier versions of Windows this was somewhat obscure to find in the UI, but in 7 it's easy: Start -> search for IIS -> choose IIS Manager -> filter for MIME.
You need to have the following types configured:
MIME Type Extension
application/manifest .manifest
application/x-ms-xbap .xbap
application/octet-stream .deploy
application/x-ms-application .application
application/vnd.ms-xpsdocument .xps
application/xaml+xml .xaml
(taken from here: http://www.xbap.org/faq.html )
Firefox runs XBAPs by using a dll from the .Net 3.5 Installer, and since Windows 7 comes with 3.5 already installed, this dll isn't available
Solution is to copy the file C:\WINDOWS\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\NPWPF.dll from an XP machine to C:\Program Files (x86)\Mozilla Firefox\plugins (if the plugin folder doesn't exist, create it)

Resources