Attributes bug
Attributes bug
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.
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
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
Dear Alex,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.
I've replied to your email about this issue, please let me know something about it.
Thank you.
Re: Attributes bug
We confirm receiving your email. We will process it as soon as possible.
Re: Attributes bug
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).
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
I'm sorry but the bug is not fixed.Shalex wrote:The bug with reading all constructor parameters for attributes when opening model is fixed in Entity Developer 5.7.480.
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
The issue is not reproducible in our environment with this project and latest build of Entity Developer 5.7.480.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.
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
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.
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
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.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.
Re: Attributes bug
Standalone version. I don't use the Visual Studio add-in.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.
Re: Attributes bug
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.Joe Smith wrote:Standalone version. I don't use the Visual Studio add-in.
Re: Attributes bug
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.
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
The problem seems to be fixed.
Thank you.
Thank you.
Re: Attributes bug
This bug is back again in the latest release (6.0.11). Please fix it ASAP because it's a really annoying one.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!
Thank you.
Re: Attributes bug
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.
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.