This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've got to dash out now, but will follow this up tomorrow. I just added a new entity to my model and all hell broke loose ! I'm getting a whole bunch of errors saying "The type or namespace anme 'xxxx' could not be found as well as Inconsistent accessibility: property type 'System.Linq.IQueryable<xxxx.xxxx> is less accessible than property 'xxxx.UnitofWork.xxx' Looking in Model.cs there are no definitions for any of the entities at all, just the Iquerable properties. I'm using the nightly build from 23rd March. Any Idea where to start looking ?? |
|
|
Check the Visual Studio Output window. Also, did LightSpeed display a message about validation errors when you saved the model? |
|
|
The output Window just repeats the errors in the error list, and as far as I am aware, there weren't any validation errors. I;ve gone back to the model and done "update From Source' and it says that everything is up to date, but there is still no code in Model.cs defining the entities. If I drag a new entity on to the design surface, it only creates the public System.Linq.IQueryable<Thing> Things code and nothing else. Could I have inadvertantly turned some setting off somewhere ?? |
|
|
OK, I restored an earlier copy of the solution, checked it all ran OK, then did the same thing. I dragged a table from the server explorer on to the design surface and did a re-build and the same thing happened - all the code that was there defining the entities has gone. There were no validation errors or anything. I didn't save the changes and just closed the solution, opened it up again, but all the code weas still missing with the same bunch of errors refering tro the entities that are no longer there..... |
|
|
Just created a blank solution and dragged 5 tables from the explore on to the design surface. All looked OK. Did a build and get the same problem. The copy that I restored above was using the release version of 2.2 and the test I did uses the nightly build from 23rd Runtime version 2.0.50727. I'm thinking it;s something to do with my database maybe, so will create a new database and do the same test. |
|
|
Send us the "before" and "after" .lsmodel files and we'll take a look. |
|
|
OK, sending to your email address in the next 5 mins or so. |
|
|
We have run up the "before" and "after" models here and both of them appear to be generating code okay. (Your "after" model will not compile because the class you have added contains a property with the same name as the class name, to which C# has some footling objection, but that doesn't stop the code being generated.) Given that this now appears to be happening to all your models, even new ones, it sounds as though your LightSpeed installation may be borked in some way, though I am not sure what could have happened to cause it to generate a LINQ unit of work but no entities. Could you post the contents of C:\Program Files\Mindscape\LightSpeed 2.2\Tools\Designer\Templates\C#\Base.vm please? Also please send us a directory listing of that directory. Thanks! |
|
|
Here you go... vm file as below ----------------------------------------------------------------------------------------------------------------------------- using System; --------------------------------------------------------------------------------------------------------------------------------------------- Directory listing : 10/02/2009 01:46 p.m. 650 Base.vm24/02/2009 05:44 p.m. 1,017 DataContext.vm 17/02/2009 02:21 p.m. 4,794 DataContracts.vm 05/12/2008 01:39 p.m. 1,521 Entity.vm 21/11/2008 12:38 p.m. 212 FieldNames.vm 12/02/2009 05:53 p.m. 1,341 FieldProperties.vm 12/02/2009 04:41 p.m. 1,097 Fields.vm 13/01/2009 09:25 a.m. 2,384 Procedures.vm 11/12/2008 02:00 p.m. 821 RelationshipProperties.vm 05/12/2008 01:39 p.m. 846 Relationships.vm 12/02/2009 04:41 p.m. 1,827 ValueObjectType.vm 12 File(s) 16,510 bytes
|
|
|
That all looks okay... I'm a bit stumped. One last thing to check: if you select your .csproj file in Solution Explorer, and look at its properties in the Properties grid, is there a box labelled LightSpeed Template File, and if so what is in it? If that box is empty... Could you zip up the .csproj file and the contents of the Templates\C# directory and mail them to me directly please, so I can have another go at reproducing the problem? Then I'd suggest you uninstall LightSpeed, make sure that the installation directly is cleaned out, and reinstall. (Wow, now I feel like a real tech support person *grin*. "Have you tried turning it off and then on again?") |
|
|
Oh, one more thing. Could you, with the Visual Studio output window open, right-click the .lsmodel file and choose Run Custom Tool, and let us know if anything appears in the output window? Thanks. |
|
|
OK, the uninstall and re-install fixed it. Whahay ! When I uninstalled, there were two Lightspeed 2.2’s in the list of installed programs. I think I must have forgotten to uninstall 2.2 before I installed the nightly build - apologies (blame it on being woken up around 3 in the morning by a small child with teething problems), but it didn’t complain. Could you possibly add a check to the install for previous versions to prevent such numptyness or is there one there and it didn’t work ? I am presuming that was the cause of all my problems, but it manifested itself in a very strange way. There was nothing left hanging about in the GAC by the way. Many thanks for looking into the problem |
|
|
"I think I must have forgotten to uninstall 2.2 before I installed the nightly build" In the good old days (i.e. last week), we used to force you to uninstall before upgrading. We recently addressed this so that it would automatically uninstall the previous version as part of the upgrade process. Unfortunately, if you have an installation installed using the old installer, and want to upgrade using the new installer, you must still uninstall first, but the new installer will not detect this condition nor force you to do so. (I am not sure of the details but I gather that the way MSI/WiX handles upgrade detection makes it hard for us to teach the new installer to detect old-skool installations.) You probably won't be the last person to be bitten by this particular issue -- sorry we haven't been able to make it more robust. Note that this is an issue only when the existing version was installed using the old installer -- now you are on the new installer it shouldn't happen again. |
|
|
Thanks for the explanation. Strange that it was only one aspect of the designer that seemed to be affected. In all other ways, it was functioning perfectly. Maybe put a big red label on the front of the new install telling people to make sure they have uninstalled previous versions for the benefit of the sleep deprived |
|