AIR App crashes at Extension context creation on one machine but works fine on others - air

I am using an ane in our AIR application which works fine except on some machines(I have access to one such machine).
I tried other ane on that machine and that is running just fine.
Now after spending hours and hours I have come to know that the app crashes at this line:
objExtCtx = ExtensionContext.createExtensionContext("device.boost.NativeAdd",null);
this call never returns and my app crashes :(
What's more is everything works when I debug the application on that same machine.
This problem is common but no solution is available.
Any help will be appreciated.
Thank you.

I got the answer :)
seems like my c++ code was using some managed code and hence was dependent on .net framework and by default the target was set to .net 4.0.
Now my code crashes on the machines which have .net 3.5 or lower.
I think changing the target .net version should do fine..will update my answer if it does.
EDIT1: seems like vs2008 is needed to change the dependency to .net 3.5 and that too full version, as express version doesn't contain all the libraries required in the project.
So now the required platform becomes .net 4.0 .

Related

VB.NET application compiled to target 4.6.1 framework does't run successfully on Computer with only 4.8 .Net framewor

I intend to build simple Winform application just to allow user to automate their file creation and store the last filled form in a file to keep it for next run.
thus, I'm not interested in creating installer for this simple Winform application. I expected to only compile it to .exe and let it run on other computers.
I develop the application using VS2019 community with target .net 4.6.1
It won't run on computer with Windows 10 with only .net framework 4.8
We are not able to install framework 4.6.1 since it says an earlier version of .net framework is already installed.
Should I recompile my application with target .net framework 4.8?
Can't I compile my application to run on any computer which at least has 4.6.1 or newer? without installer.
(I don't really understand the .net framework backward compatibility truly mean)
my application uses:
library of user32.dll for SetForegroundWindow function
to create .ini file
Finally it works. Even compiled to target .NET 4.6.1 still work on .NET 4.8 computer actually.
The issue is because my application is targeting to another application using interope COM interface, while the license is not sufficient for the user to allow COM interface.
we notice it when we finally create a pure simple windows form, then step-by-step compiling while adding each feature.
Sorry Every Body for this silly case. And my special apologize to evry1falls for spending your time.
I'm thinking to change this Question or delete it. because it is not the issue at all
The Actual Issue is:
I created Windows Form Application starting from a blank Project. And I don't know that the .NET Unhandled Exception is not activated by default.
When created from Windows Form Project Template, the Unhandled Exception message shown.
I created another Question about it: Here

VB.NET WinForm Web Connection stopped working when project was upgraded from .NET 3.5 to 4.0

I've got a strange issue that's left me scouring Google for the past couple of hours, but I haven't found anything even close to this.
I have a VB.NET Winforms project containing a class that dynamically generates an image URL for a remotely hosted charting API, and returns the URL as the source to a PictureBox (pbCallChart.ImageLocation = MyURL). This has been in place and working fine for years now. However, I recently had to upgrade the project from .NET 3.5 to .NET 4.0 (I'm working in VS 2010 on a 64-bit build, which apparently won't let you do active debug in .NET 3.5). As soon as I did this, my image stopped showing up.
I verified that the image works when I pull up the URL in a web browser on the same machine that I'm working from. At first I figured maybe that property was removed in 4.0, so I tried switching to the Load() function. No dice. Then I took it one step further and wrote this little function:
Public Function ChartImage() As Bitmap
Dim ChartURL As String = "http://www.anyURL.com/img.jpg" 'Chart()
Return New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(ChartURL)))
End Function
When I run this (and I've confirmed that it doesn't matter what URL I pass it), I always get the error:
An unhandled exception of type 'System.Net.WebException' occurred in System.dll
Additional information: Unable to connect to the remote server
I know this isn't a proxy problem, because it works fine on this same computer under .NET 3.5. And I've confirmed it's not just a debugging quirk, because I compiled executables and provided them to users - they confirmed that the .NET 3.5 version works and the .NET 4.0 version does not.
I can only assume that there must be some security configuration difference in the two versions that I don't know about, but it seems like someone would have mentioned it somewhere. Has anyone else ever experienced anything like this? I'm pretty much out of ideas - do you have any?

One of the assemblies in MS Expression Encoder SDK fails to resolve

I have an year or so old application which uses Expression Encoder 3 to generate thumbnails. Few of the users are complaining that they are receiving the following exception:
Could not load file or assembly 'Microsoft.Expression.Encoder.Utilities.dll' or one of its dependencies. This application has failed to start because the application configuration is incorrect.
The application contains in itself the required EE3 assemblies in the setup, so as such installation of Expression Encoder is not required.
All these crashes started to occur after the application was upgraded to .net 4.
Any clues on what might be happening?
[EDIT] Was able to reproduce the issue on one of our local systems. We did a clean install of Windows XP. Installed .net 4 and then our app. It crashed with the same exception. We could fix the issue by installing .net 3.5!
I was quick to point fingers at .net 4 backward compatibility.
So the question remains: any clues on what might be happening?
According to this question this seems to be an issue with EE3 itself in that it requires EE to be installed (via the installer) to work properly.
Sadly this also seems to be the case for EE4, according to this thread, due to a codec licence issue.
Sorry :/
Have you looked at MediaFoundation? it might serve as an alternative, although ive never used it myself.
I had similar problems, where it wasn't working on a Windows7 64-bit server.
Here's some things I've learnt:
You must modify your project's build settings so it has a target platform of "x86".
You must ensure that the "Desktop Experience" feature is enabled on the target machine. See this blog.

Publishing an application in an old version of .NET

I've written a really simple launcher app for my team at work to use. However I wrote it in VB.net Express 2010 so its using .NET 4. I need it to be compatible with older machines that are using .NET 2 or maybe 2.5.
I don't want to force upgrading to a higher .net if its not needed. And in some cases we work on old machines that can't be upgraded. My app is really simple and I'll post the code if needed.
Please note, I am still a noob, my coding is ugly, and this is a quick and dirty tool.
You're looking for the Target Framework dropdown in Project Properties.

Any suggestions as to why a .Net app looks for a different config file on a 64-bit machine?

We have a project management application written in VB.net. When running this application from a 32-bit machine or from within the Visual Studio IDE on a 64-bit machine, it looks for the correct configuration file (i.e. MyApp.exe.config). However, when running this app from outside the IDE on a 64-bit machine, it looks for MyApp.config and fails to find it.
Obviously I can copy the correct config to the badly named config, but we're at a loss as to why this behavior is occurring in the first place.
This is a windows application written in the 2.0 framework. No web.config file is associated (as I have found some references to a similar issue with web.config files that didn't apply).
Any guidance or suggestions is greatly appreciated.
Edit: I also should note that this is the only application this is occurring on. If I create a new vb.net application using the same libraries we use for config management, it works fine. Also, of some possible relevance, the projects are being built targeting the x86 CPU.
What I'd do is on 64 bit at install time I'd do CreateHardLink("MyApp.exe.config", "MyApp.config", NULL)
CreateHardLink is P/Invokable.