Page 1 of 2

Attributes bug

Posted: Tue 19 Aug 2014 16:54
by Joe Smith
Hi,

I've developed an assembly with some custom DataAnnotations attributes and added it to my ED project (NHibernate).

Some of this attributes have 2 or 3 constructor arguments.
For examples, I have a "RequiredIfAttribute(String, Comparison, Object)"; now, the first time I add it everything works fine; but if I close the project, open it again and try to assign the attribute to a class field, its signature looks like "RequiredIfAttribute(String, Object)". The missing "Comparison" argument is an enum created by me in the same assembly.

If I go to Model->Settings->Attributes and click Refresh in the lower panel, the attribute constructor signature got fixed.

Please help.

Re: Attributes bug

Posted: Thu 21 Aug 2014 12:31
by Shalex
We cannot reproduce the problem at the moment in our environment. A test project created basing on your description has been just sent to the email specified in your forum profile. Please specify the exact steps we should follow using it to reproduce the issue.

Re: Attributes bug

Posted: Mon 27 Oct 2014 20:44
by Joe Smith
Shalex wrote:We cannot reproduce the problem at the moment in our environment. A test project created basing on your description has been just sent to the email specified in your forum profile. Please specify the exact steps we should follow using it to reproduce the issue.
Dear Alex,
I've replied to your email about this issue, please let me know something about it.
Thank you.

Re: Attributes bug

Posted: Tue 28 Oct 2014 07:59
by Shalex
We confirm receiving your email. We will process it as soon as possible.

Re: Attributes bug

Posted: Thu 06 Nov 2014 13:57
by Shalex
The bug with reading all constructor parameters for attributes when opening model is fixed in Entity Developer 5.7.480.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).

Re: Attributes bug

Posted: Mon 10 Nov 2014 23:35
by Joe Smith
Shalex wrote:The bug with reading all constructor parameters for attributes when opening model is fixed in Entity Developer 5.7.480.
I'm sorry but the bug is not fixed.

You can easily verify this on the test project you mailed some times ago: as you can see in the "DataModel1.hbml" file, Class1.Peporty1 has the ClassLibrary1.RequiredIfAttribute with the "comparison" set to "More" but when if you open the project, it's gone.
So, it seems that now ED correctly reads all of the attribute constructor parameters but the enum one still gets lost on project load.

Re: Attributes bug

Posted: Tue 11 Nov 2014 13:35
by MariiaI
You can easily verify this on the test project you mailed some times ago: as you can see in the "DataModel1.hbml" file, Class1.Peporty1 has the ClassLibrary1.RequiredIfAttribute with the "comparison" set to "More" but when if you open the project, it's gone.
The issue is not reproducible in our environment with this project and latest build of Entity Developer 5.7.480.

Please try reinstalling Entity Developer:
- uninstall Entity Developer and other Devart products, which can use common assemblies (if there are any);
- clear the Program Files (x86)\Devart\dotConnect, Program Files (x86)\Devart\Entity Developer and Program Files (x86)\Common Files\Devart\dotConnect, Program Files (x86)\Common Files\Devart\Entity Developer folders;
- clear the Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\Devart folder (this directory depends on the version of Visual Studio being used);
- remove all Devart.* and policy.*.Devart.* files from the GAC;
- install Entity Developer and other Devart products, if necessary (run installation package as administrator).
Make sure, that during uninstalling/installing all Visual Studio instances are closed.

If this doesn't help, please send us new test project, so that we are able to reproduce this issue in our environment and find the solution for you in a shortest time.

Re: Attributes bug

Posted: Tue 11 Nov 2014 16:15
by Joe Smith
I've tried to uninstall and reinstall ED following your instructions, I've installed it on a VM too but the bug is always there.
You can see it in the sample project you sent me some months ago; you can download it here:

https://dl.dropboxusercontent.com/u/724 ... c30213.zip

If you open the file DataModel1.hbml in a text editor, you can see that Class1.Property1 has the ClassLibrary1.RequiredIfAttribute and the "comparison" PropertyValue is set to "More" (it's an enum) but if you open the project in ED, it's gone. Same result if you try to set it back again, save and reopen.

I hope this can help you fix the problem.

Re: Attributes bug

Posted: Wed 12 Nov 2014 09:15
by MariiaI
Joe Smith wrote:If you open the file DataModel1.hbml in a text editor, you can see that Class1.Property1 has the ClassLibrary1.RequiredIfAttribute and the "comparison" PropertyValue is set to "More" (it's an enum) but if you open the project in ED, it's gone.
Could you please specify whether you are encountering this issue when opening the model in a standalone version of Entity Developer or the one integrated in Visual Studio.

Re: Attributes bug

Posted: Wed 12 Nov 2014 13:11
by Joe Smith
MariiaI wrote:Could you please specify whether you are encountering this issue when opening the model in a standalone version of Entity Developer or the one integrated in Visual Studio.
Standalone version. I don't use the Visual Studio add-in.

Re: Attributes bug

Posted: Thu 13 Nov 2014 08:38
by MariiaI
Joe Smith wrote:Standalone version. I don't use the Visual Studio add-in.
Thank you for the response. We have fixed this issue. The fix will be included in the next public build of Entity Developer, which we plan to release in about 1-2 weeks. We will inform you when it is available for download.

Re: Attributes bug

Posted: Fri 21 Nov 2014 06:13
by MariiaI
The bug related to resetting enum arguments of custom attributes in the standalone version is fixed.
New build of Entity Developer 5.7.490 is available for download!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=30797.

Re: Attributes bug

Posted: Thu 27 Nov 2014 20:36
by Joe Smith
The problem seems to be fixed.
Thank you.

Re: Attributes bug

Posted: Wed 08 Jun 2016 16:55
by Joe Smith
MariiaI wrote:The bug related to resetting enum arguments of custom attributes in the standalone version is fixed.
New build of Entity Developer 5.7.490 is available for download!
This bug is back again in the latest release (6.0.11). Please fix it ASAP because it's a really annoying one.
Thank you.

Re: Attributes bug

Posted: Fri 10 Jun 2016 15:24
by Shalex
We cannot reproduce the issue at the moment.

Please upgrade to the newest (6.0.20) build of Entity Developer. If this doesn't help, try to reproduce the problem with the model \ConsoleApplication94\DataModel1.hbml from the test project topic30213.zip we sent to you on Aug 21, 2014. Notify us about the result.