We previously generated a model for our database. Afterwards, when we made changes to the tables and their constraints; then try to re-generate the entities in the object mapping tool we always get the following error:
Unable to Generate
The following files cannot be written to.
The files or their directory may be write protected.
Please unprotect them before continuing
[the list of TableName.cs and TableNameDataRow.cs here]
this only happens for newly added tables in the database, but changes in existing mapped tables are regenerated properly. We looked into the directory where the model is located, and all the files were read/write and we noticed that the files that the error message has listed do not exist yet. the directory's security settings are ok.
when we tried to generate a new model based on the updated database, the object mapping tool generates the new model with no problems. but again, if we add new tables into the database and re-generate...same problem!
We're using VS2005 Team System + SP1 and SQL Server 2005 + no sp
Windows XP + SP2 + All latest Updates, P4 3.2Ghz 1gb ram 120gb hdd
Visual Source Safe 2005; Ideablade DevForce v3.5.1.1
We are also using Resharper 2.51 (but we uninstalled this from our machines just to be sure, but this error is still occurring)
we tried re-generating the model in our other development machines,
and this happens in all our development machines;
Is there a workaround to this? or any known causes?
Thanks in advance.