Build fails for CA Gen .NET Proxy with nested group views (errors CS0029, CS0022, CS1503)
search cancel

Build fails for CA Gen .NET Proxy with nested group views (errors CS0029, CS0022, CS1503)

book

Article ID: 205114

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

Create the following server

      *   +->   S1                                12/15/2020  08:12
      *   !       EXPORTS:
      *   !         Group View (2) g1
      *   !           Group View (2) g2
      *   !             Work View g ief_supplied (Transient, Export
      *   !                         only)
      *   !               count
      *   !
      *   !     PROCEDURE STATEMENTS
      *   !
     1*   !  +=>FOR SUBSCRIPT OF g1 FROM 1 TO LAST OF g1 BY 1
     2*   !  !  +=>FOR SUBSCRIPT OF g2 FROM 1 TO LAST OF g2 BY 1
     3*   !  !  !   
     4*   !  !  !  SET g ief_supplied count TO SUBSCRIPT OF g1 +
     4*   !  !  !              SUBSCRIPT OF g2 
     5*   !  !  !   
     2*   !  !  +--
     1*   !  +--
      *   +---

 

Generating and installing a .NET proxy produces the following errors:

     2>CSC : warning CS1616: Option 'CryptoKeyFile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
     2>src\L1\S1ExportWrapper.cs(224,26): error CS0029: Cannot implicitly convert type 'int' to 'int[]' [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
     2>src\L1\S1ExportWrapper.cs(227,13): error CS0022: Wrong number of indices inside []; expected 2 [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
     2>src\L1\S1ExportWrapper.cs(241,51): error CS1503: Argument 1: cannot convert from 'int[]' to 'int' [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
     2>src\L1\S1ExportWrapper.cs(244,68): error CS0022: Wrong number of indices inside []; expected 2 [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
     2>Done Building Project "C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj" (default targets) -- FAILED.
     1>Done Building Project "C:\Gen\Models\86\sample.ief\proxy\NET\L1.proxy.csproj" (Rebuild target(s)) -- FAILED.

Build FAILED.

       "C:\Gen\Models\86\sample.ief\proxy\NET\L1.proxy.csproj" (Rebuild target) (1) ->
       "C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj" (default target) (2:3) ->
       (CoreCompile target) -> 
         CSC : warning CS1616: Option 'CryptoKeyFile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]


       "C:\Gen\Models\86\sample.ief\proxy\NET\L1.proxy.csproj" (Rebuild target) (1) ->
       "C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj" (default target) (2:3) ->
       (CoreCompile target) -> 
         src\L1\S1ExportWrapper.cs(224,26): error CS0029: Cannot implicitly convert type 'int' to 'int[]' [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
         src\L1\S1ExportWrapper.cs(227,13): error CS0022: Wrong number of indices inside []; expected 2 [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
         src\L1\S1ExportWrapper.cs(241,51): error CS1503: Argument 1: cannot convert from 'int[]' to 'int' [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]
         src\L1\S1ExportWrapper.cs(244,68): error CS0022: Wrong number of indices inside []; expected 2 [C:\Gen\Models\86\sample.ief\proxy\NET\L1.interfaces.csproj]

    1 Warning(s)
    4 Error(s)

Environment

Release : 8.6
Component : CA Gen Generator, Proxy.

Resolution

The fundamental problem here is that the Gen Server Manager that the proxy is being generated for is not allowed to have nested repeating group views.
Support created a simple server PStep with nested repeating group views and the generation of its Server Manager with Consistency Check (CC) enabled at generation time failed with this ERROR message:
ERROR : ICCBR13E A Procedure Step with either window or cooperative packaging must not contain nested repeating group views in its import or export view set.

The .NET proxy generation/build then failed with the same messages as reported i.e. CS0029, CS0022 etc
Granted that perhaps it would be expected for a similar CC ERROR message to be shown for the Proxy Generation, and that is maybe something Engineering can address in the future.

So the solution to this problem is to remove the nested repeating group views in the server PStep and then regenerate the .NET proxy.

Additional Information

CA Gen 8.6 > Reference > Messages > Consistency Check Messages > Messages ICCAB01W - ICCDX01E > ICCBR13E