Book a Demo

Author Topic: error open file after code generation  (Read 7659 times)

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
error open file after code generation
« on: June 14, 2016, 07:14:37 am »
Hi,

after code generation in C# from package I see message "...completed", but the error message is shown:

"An error occurred opening file .... cs"

and no C# file cs is generated.

Any suggestions?

thanks, jumbie.

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: error open file after code generation
« Reply #1 on: June 15, 2016, 04:24:13 am »
The position of problem is identified:

steps:

1. I have created some CLASS model in Package, generation code in C# is OK.
2. Then I have I created MDA Default Template (with no changes in template)
3. I have created new Package by MDA transformation with this Default Template.
4. Generating code on new Package failed, the error occurred

Is it bug or something wrong in these steps?

jumbie
« Last Edit: June 15, 2016, 03:40:34 pm by jumbie »

VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: error open file after code generation
« Reply #2 on: June 15, 2016, 10:05:26 am »
Make sure that you have sufficient rights on the path you're passing in for code generation.
For example: "C:\MyClass.cs" may fail on Windows.
Try "C:\Temp\MyClass.cs"

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: error open file after code generation
« Reply #3 on: June 15, 2016, 03:03:18 pm »
Thanks,
but the difference is between the packages, the path is the same,
first package is made manually (generating OK)
the second is made by MDA Default Template (generating failed)
the path is the same.

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: error open file after code generation
« Reply #4 on: June 15, 2016, 03:40:12 pm »
... and generating code after MDA C# template (built in EA) is also OK.

Can anybody try these steps to make me sure the problem is not at me?

Thanks.


VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: error open file after code generation
« Reply #5 on: June 15, 2016, 05:05:26 pm »
What are the steps you've followed to make a copy of an MDA template ?

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: error open file after code generation
« Reply #6 on: June 15, 2016, 06:05:45 pm »

1. Open Package / MDA Transformation / MDA templates

2. Create new template by button New Transformation Type (up), then enter value ( = the name of new template).

The new template with default template is created...






jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: error open file after code generation
« Reply #7 on: June 16, 2016, 03:18:35 pm »
I have repaired the EA, no success,
then reinstalling the EA,
 the problem disappeared..

jumbie.