4 Replies Latest reply on Jul 7, 2015 7:24 AM by MaximeHT

    Targeting several Frameworks with ACE configuration

    MaximeHT

      After reading the KB00645 - Specifying the version of .NET framework for PI ACE calculations, I produced an XML configuration file to target the .Net Framework 4.0 for a new ACE dll.

      But our old ACE dll compiled for the .Net Framework 3.5 have stopped working.

      Is there a way to keep all ACE dll running even if their target Framework is 3.5 for the oldest and 4.0 for a new one ?

        • Re: Targeting several Frameworks with ACE configuration
          dng

          Hi Maxime,

           

          The .NET runtimes support backward compatibility, so a PI ACE calculation that was compiled with a target of .NET 3.5 will run if you specify a supported runtime version of v4.0. Can you show us the content of your XML configuration file? In addition,

          • What kind of error did you get from the old ACE dll compiled with .NET 3.5?
          • What status does the PI ACE manager display?
          • What is the extent of the failure? Does it affect a specific context, class, or executable, or do all calculations compiled with .NET 3.5 failed?
          • Did the problem start occurring right after you restart the ACE scheduler after adding the XML configuration file?
          • Can you turn up debugging for the ACE calculation, restart the calculation and look into the PI message logs? Did you see any error messages?
            • Re: Targeting several Frameworks with ACE configuration
              MaximeHT

              Hi Daphne,

               

              Our XML configuration file is the same as describe in the KB00645.

              When I put it on the ACE server a few minutes ago, and restarded an executable/library compiled for .Net Framework 3.5, it worked properly.

              I had an error message this morning while I tried to DEBUG with Visual Studio 2008 (and PIACE Wizard plug-in) the same library compiled to .Net Framework 3.5.

               

              The message was :

              Error while trying to run project : unable to start program "D\:Applis\PIPC_x86\ACE\Scheduler\PIACEClassLibraryHost.exe".

              The debugger's protocol is incompatible with the debuggee.

               

              It seems that the configuration of Visual Studio has to be patched.

                • Re: Targeting several Frameworks with ACE configuration
                  dng

                  Hi Maxime,

                   

                  Did you put the XML configuration file in both the 32-bit and 64-bit directory? What bitness is your machine and what bitness is your ACE calculation compiled in (according to your error message, it is compiled as 32-bit. Can you confirm?) If you explicitly specify both .NET versions (v2.0.50727 and v4.0) in the XML config file, do you run into the same issue? For more information about this error, you can also check out KB00780.

                    • Re: Targeting several Frameworks with ACE configuration
                      MaximeHT

                      Hi Daphne,

                       

                      I put the XML configuration file in "...\PIPC_x86\ACE\Scheduler\" and "...\PIPC_x86\ACE\Scheduler\x86\". We don't have any "ACE" sub-directory in our "...\PIPC64\" directory.

                      Our machines host Windows Server 2008 R2 Enterprise - 64 bits and the target CPU for ACE libraries compilations is "Any CPU".

                      Yesterday, in the XML configuration file, I tried with  <supportedRuntime version="v2.0" .../>, but today it works with the example here below on both ACE Manager side or Visual Studio debuggging mode :

                           <?xml version="1.0" ?>

                      -      <configuration>

                       

                       

                           - <startup>

                       

                       

                            <supportedRuntime version="v2.0.50727" sku=".NETFramework,Version=v2.0" />

                       

                       

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

                       

                            </startup>

                            </configuration>