Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to a newer version of .net framework #163

Closed
Mediumspider opened this issue Feb 27, 2024 · 6 comments
Closed

Update to a newer version of .net framework #163

Mediumspider opened this issue Feb 27, 2024 · 6 comments

Comments

@Mediumspider
Copy link

Would it be possible to update SnakeTail to use .net framework 4.0 or above?

A bit of background
Currently snaketail is built for .net framework 2.0

We've have some corporate control software installed that crashes SnakeTail at startup. It doesn't crash in the debugger, and the event log just says "The process was terminated due to an unhandled exception".

Trial and error shows that it works if updated to at least .net 4.0.

It would mean removing support for windows 2000, and if that's a dealbreaker I can create a fork.

@snakefoot
Copy link
Owner

If you place the Snaketail.exe.config-file next to the SnakeTail.exe, then it should recognize that it supports all .NET runtimes.

See also: #160

@Mediumspider
Copy link
Author

I saw that one, but that is not the issue for us.

The problem is a bug in our new corporate access control software and not SnakeTail.

(We've doublechecked by temporarily disabling it)

Upgrading snaketail to build with at least .net 4.0 works.

I can prepare the pull request with the necessary changes if that is of interest, but I can also just create a fork if you prefer to stick to .net 2.0

@snakefoot
Copy link
Owner

What if you upgrade to .NET 3.5 ? (Instead of .NET 4.0)

@Mediumspider
Copy link
Author

I tried 2.0, 3.0 and 3.5 and they all crashed.
However I did a bit more digging and succeeded in getting a crash-dump using ProcDump.exe, where I could see the actual error.

Mixed mode assembly is built against version ‘v2.0.50727′ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

My guess is that the access control software injects some native code that crashes when it tries to load the native dll. A solution for me was to add the following to add "useLegacyV2RuntimeActivationPolicy" to the config file:

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
...
  </startup>
</configuration>

It would be nice if this could be added to the config bundled with the official installer, but I acknowledge that ours is probably not a common use-case.

I'll inform our IT department about the workaround, and update our custom installers.

Sources:

@snakefoot
Copy link
Owner

snakefoot commented Feb 28, 2024 via email

@snakefoot
Copy link
Owner

snakefoot commented Feb 29, 2024

Released version 1.9.8 - https://github.com/snakefoot/snaketail-net/releases/tag/1.9.8

It includes useLegacyV2RuntimeActivationPolicy="true" that should allow the applicaton to run without .Net Framework 3.5 being installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants