We have a project that was built in the 3.5 version of the .Net Framework. We updated this project to be on the 4.0 version of the .Net Framework, and after we worked through all of the issues we noticed significant lag during the web service initialization.
We reverted the project back to the 3.5 Framework and that fixed our lag issues. We have a second project that relies on the use of 4.5 Framework dlls, therefore the second project needs to be built in the 4.5 version.
I know that this question has been asked before, and that the answer has always been that it isn't possible - but it IS possible, because we actually had this exact structure working following the steps available on the msdn forum below, but instead utilizing the <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"> runtime instead of the shown 4.0 only.
The issue is that we re-added a brand new service call to our webservice, and now when we attempt to access the project reference, it throws an error that it was accessing a project that was built on a newer version, giving the BadImageFormatException.
This exact error was discussed in the forum above, and stated that you needed to include the standard 2.0 reference AND the 4.0 reference in the <startup> section as <supportedRuntime>'s, and we have both of them in.
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
I believe the issue is that the app.config is NOT loading both runtimes. I think that this is happening because if we switch the order of the supportedRuntimes like below....
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v2.0.50727"/>
</startup>
We begin to get errors anytime we attempt to access any 3.5 Framework references.
Now, the order the supportedRuntime's are added IS important - in the second set of code, it would prefer using the 4.5 version over the 3.5 Framework, but it SHOULD utilize the 3.5 Framework when it can, correct? I could be way off base here, but like I said we had this working -- unfortunately I didn't create a label for my codeset, so I can't just go back to the working codeset.
Can anyone think of anything I could be missing, or can anyone tell me if it's possible to specifically tell a set of code to utilize the 4.5 Framework in vb.Net?