2

I wrote an extension for big proprietary platform - DocsVision. This platform works using .NET 3.5 SP1, but I wrote my extension, using .NET 4 (I think, why not?)

Later, when DocsVision used Internet Explorer as host - I was added .config file to IE's directory with startup tag to support runtime of .NET 4 and all works good.

But now, in new version, there is new host - Navigator.exe with there own .config files:

Navigator.exe.config

<?xml version="1.0" encoding="utf-8" ?>
 <configuration>
  <configSections>
   <sectionGroup name="docsvision.platform.wpf.navigator" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
    <section name="navigator" type="DocsVision.Platform.Wpf.Navigator.Configuration.NavigatorConfigurationSection, DocsVision.Platform.Wpf.Navigator, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7148afe997f90519"  allowExeDefinition="MachineToLocalUser" />
   </sectionGroup>
  </configSections>
  <docsvision.platform.wpf.navigator>
   <navigator>
    <connection />
   </navigator>
  </docsvision.platform.wpf.navigator>
  <runtime>
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <!-- Probing path is used for fast loading of ngen assembly images -->
    <probing privatePath="Components;SystemCards;BaseObjects;Workflow;TakeOffice" />
   </assemblyBinding>
  </runtime>
 </configuration>

user.config

<?xml version="1.0" encoding="utf-8"?>
 <configuration>
  <docsvision.platform.wpf.navigator>
   <navigator>
    <connection DisableVersionMismatchNotification="false" LangName="" />
    <view ShowArchivedItems="false" ShowColorLabels="true" ShowDeletedItems="false"
            ShowNavigationPane="true" ShowPreviewPane="false" ShowStatusBar="true" />
   </navigator>
  </docsvision.platform.wpf.navigator>
 </configuration>

So, my .dll .NET 4 can't load, because of mixed mode. If I add to Navigator.exe.config the follow classic lines:

<startup useLegacyV2RuntimeActivationPolicy="true">
 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

my .dll will loaded correct and all my extension works, but it will have some problems in GUI and exceptions (on loading some other DLL) in other parts of platform.

What I do wrong and how can I use my extension without bugs in platform?

P.S. My DLLs firstly loads using COM, so I have this: Navigator.exe with all DLLs

So, there is two domains into application. But when I try to do smthng action with my extension - there is an error of .NET 4 dlls loading. Why???

Community
  • 1
  • 1
  • Well, I know Framework 2.0, 3.0, 3.5 build on each other. So if any of those Framework files are damaged or you've referenced the latest Framework and it is still trying to make a call in an earlier framework can cause issues. – Greg Nov 28 '12 at 16:05

0 Answers0