PDK 7.0 error - plc.exe not recognized

Posted by grahams on 2007-10-16 13:20
OS: Windows XP Pro | Product: Perl Dev Kit | tags: .net not recognized perlnet plc
Question: 

For some reason, plc.exe has stopped working on my system. When I try to run it, I get a pop-up with the title ".NET Framework Initialization Error" and the text "Unable to find a version of the runtime to run this application."

I have tried re-installing both the PDK and the .NET framework, but nothing has helped. I'm patched to date. Other .NET applications are still working fine.

Any suggestions?

Answer: 

This message results from changes to .NET security behavior that Microsoft introduced with Security Fix KB928365. The previous work-around was to remove KB928365.

As of July 2007, Microsoft has added the Security fixes found in KB928365 into KB928366, which is the .NET 1.1 Hotfix, and KB928367, which is the .NET 1.0 Hotfix. As a result, ALL .NET installations will exhibit this problem if patched to date.

As of November 30 2007, Microsoft has released .NET 2.0 SP1 which rolls up all previous security fixes, and makes changes to .NET 2.0 in preparation for .NET 3.0 SP1 and .NET 3.5. PDK 7.0.0 will NOT be compatible with .NET 2.0 SP1, .NET 3.0 SP1, or .NET 3.5.

It is possible to work around this problem using the following steps:

Exclusion- Does not apply to Vista. Vista incorporates .NET differently from other versions of Windows.
Warning- Any versions of Visual Studio in use must be installed before starting this workaround. It has not been verified, but it is quite possible that some features of recent Visual Studio versions may be broken by this workaround. Because of the changes to .NET, it may not be possible to have certain versions of Visual Studio on the same system as PDK 7.0.0.

1. Check Microsoft Update. Install any critical updates that are NOT labeled as being part of .NET (This is not compulsory, but may save you some annoyance as you otherwise need to be careful about your default selections as you work through the process).
2. Turn off automatic update, use add/remove programs to uninstall ALL versions of .NET, and restart.
3. Deselect any critical updates available at this point. Go to the optional software section. Select the following:
.NET 1.1
.NET 2.0 KB829019
.NET 3.0 KB928416 (if desired)
(.NET 1.0 Compact Framework SP3 and .NET 2.0 Compact Framework may also be added if desired)
Install all the selections you make in this section simultaneously to save time.
4. Install:
.NET 1.1 SP1 (11/30/2007 last update)
Allow the reboot.
5. Install:
.NET 1.1 Hotfix KB928366
Allow the reboot.
6. KB928365 is no longer available from the Microsoft Update agent. You can still download and install it from here:
http://www.microsoft.com/downloads/details.aspx?familyid=BA3CEB78-8E1B-4...
The open browser will cause the installation to stall, but you can simply close the browser and tell the installer to re-try. Allow the reboot.
7. Open add/remove programs tool. Ensure show updates option is selected. Uninstall KB928365. Ensure Auto-update remains off.
8. PDK applications should now work.
- You may now install .NET 3.0 Update KB932471 if you are using .NET 3.0.

- DO NOT install .NET 2.0 SP1 (or .NET 3.0 SP1 or .NET 3.5 when they become available). If you install .NET 2.0 SP1 you must start over at step #2.

Why the order is important-
.NET 2.0 must be loaded in order to load KB928365. KB928366 will allow KB928365 to be installed after it, even though 366 contains files from 365. When KB928365 is loaded over KB928366, the uninstaller gets the references which allow it to remove only the offending portions of 366 when it removes 365. However, .NET 2.0 SP1 will block KB928365, and the changes made to .NET 2.0 in SP1 cannot be backed out, so if SP1 has been installed you have to start over.

If you need to work with .NET 2.0 SP1, .NET 3.0 SP1, .NET 3.5, or Vista; your current option is to wait for the next release of PDK 7.0, which should address the root cause of this problem.

royivyiii | Thu, 2007-12-13 18:51

This is an application killing bug, making plc.exe essentially unusable on any setup with any up to date version of .NET / Visual Studio / Vista...

Any ETA on the fix (in v7.0)?

- Roy Ivy

grahams
ActiveState Staff
Tue, 2008-02-12 15:05

PDK 7.1.0 has been released. This version will install on Vista, and will not encounter the plc.exe error when .NET is patched to date, however this was accomplished by removing PerlNET from PDK 7.1.0.

PerlNET will be returning to PDK with PDK 7.2.0, which should release early in 2008.

grahams
ActiveState Staff
Wed, 2009-06-10 10:03

This issue was fixed with the release of PDK 7.2, however .NET 1.1 AND 2.0 had to be installed prior to running the PDK installer, or a different error message would be produced.

The issue is now completely resolved. The installer for PDK 8.0+ will simply block the installation of PerlNET if both components are not available. .NET installations patched to the current Microsoft recommended level of .NET 3.5 will work correctly with PerlNET 8.x.