How do I rename entity framework .edmx file - asp.net-mvc

I have a new MVC 4 project developed by a third party. I want to rename the .edmx file before making some other changes and going to production. I can rename the file itself but the .tt files do not change.

I need to rename my edmx, the designer, diagram and both T4 template files. This is what I did -
Unload the project in VS, edit, rename all above files to whatever you have to. The first part of the name of all these files should be same.
Open project directory in Windows explorer and manually rename all above files. Names should exactly match with what you entered in project file in step 1.
Open both tt files, find and replace the original edmx file name there.
Open EDMX file in a text editor, find and replace with
Reload the project, right click both the tt files one at a time and Run Custom tool. This will regenerate any missing files.

Related

Copied Delphi projects doesn't use new directory

Delphi Rio. I have a project I have worked on called PasteParser. I am now wanting to create a new project called Clarity which is similar to PasteParser. So outside of Delphi, I copy the PasteParser entire directory structure to a directory called Clarity. I start Delphi, and open the project CALLED PasteParser in the Clarity directory. I right click on the project name, and select rename. I save, close the project, and reopen...The project now has the right name, and I am thinking all is good. I move a few buttons around, compile and then run. What comes up is the ORIGINAL program. What I am finding is that even though I have a new directory, and a new project, the project seems to have hard-coded the PasteParser directory into the files the the project uses. I look at Clarity Project Source, and none of the files have a hard coded directory.
Why is the Clarity project still using the Main.pas, etc. files from the PasteParser project?
*** FOLLOWUP: The only place (to my knowledge) which shows what files are in the project is the .dpr file. Here is the file contents. Note that the glib_ files are correct in their location. The remaining files do NOT have a directory listed, so they should be using the Clarity directory, yet they are not.
Here is the View/Project Source listing...
program Clarity;
uses
Vcl.Forms,
MainPas in 'MainPas.pas' {Main},
ParserUtils in 'ParserUtils.pas',
ParserGlobals in 'ParserGlobals.pas',
helpPas in 'helpPas.pas' {help_form},
FormatsWinPas in 'FormatsWinPas.pas' {FormatsForm},
ParseContacts in 'V1\ParseContacts.pas',
ParseOpps in 'V1\ParseOpps.pas',
ParseSalesActivities in 'V1\ParseSalesActivities.pas',
ParseSR in 'V1\ParseSR.pas',
Parse_IB_TABLE in 'V2\Parse_IB_TABLE.pas',
StatusBar_Utils in 'StatusBar_Utils.pas',
RB_Class in 'RB_Class.pas',
glib_excel in 'D:\VCL_RIO\MISC\GLIB2\glib_excel.pas',
glib_globals in 'D:\VCL_RIO\MISC\GLIB2\glib_globals.pas',
glib_utils in 'D:\VCL_RIO\MISC\GLIB2\glib_utils.pas',
glib_ORCL in 'D:\VCL_RIO\MISC\GLIB2\glib_ORCL.pas';
Try to delete all *.dproj.local, *.identcache, *.dsk from the new project directory
The only way I could get this to work is by opening my project, and then in the projects window (which lists all of my pas/dfm files), right click on each of the pas files and choose 'Save As', and giving it the new location.

C# StyleBundle doesn't include linked files

VisualStudio 2019, I have two projects in a solution which essentially need to share a single CSS. I have the physical file added to project A, and then I added the same file as a "link" file in Project B. This way only 1 file needed to be updated.
I have my bundleConfig set up properly, but the linked file is never included in the bundle in Project B.
I didn't see any options for doing so in the bundle config. Any other option besides duplicating a physical file?

CoreData: Opening a standalone .xcdatamodeld file and changing current model version

I have a standalone .xcdatamodeld file which I want to edit as a standalone file, not inside a Xcode project.
I know I can edit specific .xcdatamodel files if I right click in the .xcdatamodeld directory and click "Show Package Contents". I can even create new .xcdatamodel files from the top menu (Editor > Add Model Version...).
However, I cannot change the current model version of the .xcdatamodeld file. This option does not show in the file inspection on the right panel.
As far as I know the name of the current version is stored in a plist file named .xccurrentversion inside the .xcdatamodeld directory.
Anyone knows how could I change this from inside Xcode?
I have had this happen before.
To fix it I just opened the file in vim (or textedit/subethaedit/your text editor of choice) and fixed the model version myself.
Make sure you do a search through the document for any references to the model version. I also believe that it may be mentioned in the .plist files that define your project/workspace, so you probably want to do a search in those files as well.

Sharing same (.edmx model) in multiple projects

I have created a database and converted the same in edmx/model in one of my ASP.NET sample projects.
Now I am creating another project in which I want to use the same .edmx/model. I try to copy the edmx model in second project and then adding up(Add existing item),
But the .edmx file is not showing up in the options,but I am getting the designer.cs. Am I am missing something here?
Is it possible to use the same .edmx in more than one project?
You should simply place your edmx model and all generated classes to separate assembly and share the assembly.
If you don't see .EDMX in Add Existing Item dialog make sure that you don't have filter for code files enabled. You need to show all files or data files to see .EDMX file.

Textmate and add existing files

I don't understand why when I add files to my project using add existing files from project try it does not copy the file to my project, it just copies the reference to the file.
In TextMate, a project is nothing more than a collection of references to files you can edit simultaneously. It enables you to have them open in a drawer and as tabs as you will most certainly know already. But a TextMate project is not intended to be a file manager. More information on handling files inside a project can be found at the TextMate manual.
Add the folder to your project drawer on the left then you will be able to drag the files from there into your Rails project.
I was running to the same problem with trying to add existing files to a folder in my project, it would not change the reference.

Resources