You are here

What's the status of .NET support.

5 posts / 0 new
Last post
JensFF
Offline
Last seen: 5 days 2 hours ago
Joined: 2008-01-23 12:46
What's the status of .NET support.

I'm currently trying to portablize a .NET application. As we expect .NET to be available on the machines where it will, it doesn't matter that it's not really portable.

At least we want to check for an installed .NET version. So I was happy to find the UsesDotNetVersion parameter in AppInfo.ini. I started the App on a PC without the required .NET and expected to some kind of dialog.

Nothing happened. So here are my questions:

  • Is this feature already implemented?
  • What behaviour is to expect when .NET is missing?
  • Who does check for .NET - the launcher or the framework/menu?

I also tested some other apps which use .NET. They behave the same.

Can anyone help?

Thanks
Jens

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 5 hours 9 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
The UsesDotNetVersion

The UsesDotNetVersion parameter is there in the PortableApps.com Specification in preparation for a future implementation of .NET detection.

As far as I know the detection will made by the individual Launchers themselves, and will show a warning dialog notifying if the required version is not present, otherwise the app will be launched as normal.

However there is a potential work-around until it is released. The official app dotNETInspector (which is my own app, so please excuse the shameless plug) includes the ability to pass command line parameters for a file to run if the version (and optional service pack) is found, and another parameter for a file to run if the version/service pack is not found.

You could use dotNETInspector as an intermediary launcher for your .NET app, and if the correct version of .NET is installed launch the app, otherwise launch a local .html file, a text document, or if you are up to it a small program that simply shows a warning dialog.

Which gives me an idea for a new feature for dotNETInspector which would be easy enough to implement so I will aim for it in the next version, where you pass additional command line parameters to show a dialog with a custom message on successful or failed detection.

JensFF
Offline
Last seen: 5 days 2 hours ago
Joined: 2008-01-23 12:46
Thank you for the

Thank you for the information. I found your dniLite which probably fits even better. I will give it a try.

Is dotNETInspector or dniLite able to check for ".NET 4.0 or better"? I only found checks for explicit versions.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 5 hours 9 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Not yet

dniLite had been on my list of things to do for a few months now, but I only started it on the weekend, so it didn't even exist when I replied above.

Working so quickly on it I missed that fairly important piece of functionality, so at some time (probably very shortly) I will add in a way to handle it by adding a -gt and -lt switch which will check for any version greater than or less than the version you pass for -fv. I will also add -fv=4.0 as an accepted argument which will return true if either 4.0client or 4.0full is found.

JensFF
Offline
Last seen: 5 days 2 hours ago
Joined: 2008-01-23 12:46
Sounds nice. I currently

Sounds nice. I currently wrapped a batch script around which test for all possible versions.

Log in or register to post comments