Hi Guys, I've followed your upgrade steps... and removed the PersistentAttribute usage in AssemblyInfo.cs. Does that attribute usage need to be replaced with another one? Because now I get the error: Xtensive.Storage.DomainBuilderException : [Persistent] attribute isn't applied on type 'MyModel.EntityBase', or assembly 'MyModel......." Updated at 14.05.2010 21:48:15Ok, I came up with an absolutely genius workaround :wink: I created a new DO4 Model project and moved all my code files in there. Anyway, apparently there is a problem with the NotNullConstraint. I kept getting weird PS2 exceptions until I isolated the NotNullConstraint to be the cause, and commented out all usages. Maybe other constraints are affected too, but I don't use them in my project yet.
This thread was imported from our support forum. The original discussion may contain more detailed answer. |
Alex (Xtensive) wrote:> Xtensive.Storage.DomainBuilderException : [Persistent] attribute isn't applied on type 'MyModel.EntityBase', or assembly 'MyModel......." It seems we forgot fix the error message: "[Persistent] attribute" must be excluded from it. > Anyway, apparently there is a problem with the NotNullConstraint. I'll forward this report to PostSharp team - we use standard OnMethodBoundaryAspect for validation, so possibly the cause is inside PostSharp. If you could send us some project allowing to reproduce the issue, this would help a lot. olorin wrote:I have the same problem with latest build. My feeling is that the csproj are different : creating a new project works, but trying to use a project for DO 4.2 fails. I've seen there is a new import (first one), in a project created with the template.
Have precise instructions on how to migrate a DO4.2 project? Dmitri Maximov (Xtensive) wrote:We are working on this and going to publish the instructions as well as the Project upgrade tool (http://blog.dataobjects.net/2010/05/pro ... -tool.html) shortly. Alex (Xtensive) wrote:Precise instruction:
That's it. Project Upgrade Tool will handle both previous and described settings properly - i.e. if format will be changed further (that's likely), it will be able to automatically upgrade your projects. Alex (Xtensive) wrote:I just finished writing project upgrade tool - it is in attachment. It handles everything I described here automatically + adds all necessary references; moreover, it is capable of upgrading solutions using previous versions of DO4 to new v4.3 format. Typical usage: > ProjectUpgrader.exe -sln=MySolution.sln - upgrades your solution (UI will be shown, so operation won't start immediately) > ProjectUpgrader.exe -u MyProject.csproj - upgrades\updates your project (UI will be shown, so operation won't start immediately) > ProjectUpgrader.exe -? - help for console mode commands. Improved DO4 installer (not available yet) adds it to Tools menu in Visual Studio 2010. For now you can add it to External Tools manually - all the settings you need should be clear from this dump:
"ToolOpt"=dword:0000001a = "Redirect standard output to Output window". The issue is fixed - please install today's build. You'll need to install a new version of PostSharp as well (it's bundled). Confirmed. Thank you! Olorin, if appropriate in your case... I created a project using the DO4 template and moved my class files there. P.S. Project templates shipped with v4.3 already contains described changes, as well as samples. olorin wrote: mahdness: Thanks for the tip, I've created a new project and compared the csproj to spot the differences. Alex: Thanks, what I was missing was step 3. You should add this to the blog, so that others don't have this problem. |