.Net Framework Checking and Upgrade

.Net Framework Checking and Upgrade

  
Hi All,

How can I know the version of the .Net Framework the OS Platform is using?

I installed .Net Framework v4.5. Now how can I configure OS to use it?

Regards,
JC
JC that must be quite straight forward for you to use it... 

You have to configure that directly from Integration studio to the path....
1. Development Path - Its the executable of the version you are using.
2. Compilation Path... This is the path which integration studio takes on it own.. So again its based on the versions you would like IS to start working on .

so both the paths are basically used to configure your .net framework with you OS
Could not load file or assembly 'file:///C:\Program Files\OutSystems\Platform Server\running\Test.1038677379\bin2\Foxit.PDF.Printing.40.x64.DLL' or one of its dependencies. An attempt was made to load a program with an incorrect format.

The extension was made using v4.5 and it is not working on our Dev environment. I checked the server and it says:



How can I enforce the platform to use v4.5 and thus eliminate this error?
Solution
Hi JC,

In Platform 9 the requirement is already 4.5.1+, so if you are Platform 9 there is no way it is not using an older version of the framework. And any dll built for 4.5 is compatible with this, since the .net framework it is backward compatible.

Also note that the "or one of its dependencies. An attempt was made to load a program with an incorrect format." is very generic and can also mean that it is missing a C++ library dependency.
Try using this tool in the server machine to check for that dll dependencies and see if any is missing.


Edit: edited the post a bit since I noticed in another topic from you that you were already in 9.0.1+

Regards,
João Rosado
Solution
Hi Joao,

We are actually on version 9.0.1.25. I installed v4.5 and it says it can't be installed because the same or higher version is already installed.

In the C:\Windows\Microsoft.NET directory, I can only see up to v4.0.30319.

I will try that tool and post the update.

Regards,
JC
"In the C:\Windows\Microsoft.NET directory, I can only see up to v4.0.30319."


That is correct.
"4.0", "4.5", "4.5.1", "4.5.2" and "4.6" are all inplace updates. It only keeps and runs that latest one installed and they are all backward compatible.
So yes, there is only a single folder there.

Also can you take a screenshot of your OutSystemsApplication Pool advanced settings?

It should be like something like this (note i'm on my home machine, so it can look a bit different than in your server IIS)



(As you see in my screenshot it only says 4.0 there, but I can guarantee that I'm running 4.6 at the moment :)

Regards,
João Rosado

Hi Joao,

Yep I also have the same thing. So I can assume that I am running v4.5. So now, I just need to know why the extension compiled in v4.5 is not working in our instance.

Regards,
JC
Does this mean it is missing in the extension or missing in my environment?

JC 
Seems that you are having missing or corrupt dll. Try UNINSTALL and do the fresh install and check might be its a microsoft way... 

João Rosado wrote:
In Platform 9 the requirement is already 4.5.1+, so if you are Platform 9 there is no way it is not using an older version of the framework. And any dll built for 4.5 is compatible with this, since the .net framework it is backward compatible.
 
Hi João.

If Platform 9 requires .NET Framework 4.5.1 why is Integration Studio still creating new extensions targeting .NET Framework 3.5 instead of 4.5.1?



(I'm using Integration Studio 9.0.1.35)


The "OutSystems Platform 9 - Side Effects and Breaking Changes" document says:

"When upgrading to OutSystems Platform 9, applications are upgraded to use .NET 4.5.1. This upgrade is automatic, but since there are breaking changes introduced by the .NET Framework, it can affect custom configurations, extensions, or external libraries."
 
But all my Platform 9.0.1 extensions are also targeting .NET Framework 3.5.
That document is correct, "Applications are upgraded".
Extensions can still target minimum 3.5 for now, but they will in practice run in 4.5.1 regardless of what they target.
You are free to raise the target framework of the extensions manually.

That was made to keep upgrade to Platform 9 easy. Minimum requirements and forced upgrade of extensions will be done in another major version.

Regards,
João Rosado
Anyway, regarding the actual issue on the thread.

JC, the screeshot doesn't look that bad, it's normal to have those errors in the bottom pane.



Missing dependencies are shown as yellow question marks in the top tree and red marks on the right pane.
Cant see your complete tree in the screenshot though, can you collapse it ?


Also noticing that in your first post the error says it's failing to load "Foxit.PDF.Printing.40.x64.DLL" but in your screenshot you are inspecting a "evohtmltopdf.dll".

Regards,
João Rosado
Hi Joao,
My mistake. This is the correct screen below.



Regards,
JC
Ok, lets just make sure you are using the correct version of the dependency walker.



It needs to be for the x64 version to analyse a x64 dll.

Regards,
João Rosado
Hi Joao,

I have downloaded the x86 one. I will retry using x64.

Regards,
JC
Hi Joao,

I did not get to see the error in dependency walker using the x64 one. Now any other suspects on why the extension isn't working as per the error: "An attempt was made to load a program with an incorrect format."

Regards,
JC
Hi again,

The most common reason for that error is when mixing x86 and x64 dll's.
(even though the error is really generic so it's not always that)

So ...first make sure in the application pool advanced settings the "Enable 32 bits apllications" is set to "false", like my screenshot above.

Then make sure all the libaries you added to the extension are only the x64 versions.

Regards,
João Rosado