4

I have been working on my thesis report and use TXC as my editor. Everything was fine until there was a BSOD on my computer for unknown reason. After restarting the computer I realised that the TXC is no longer able to read my project file. Here is the screenshot of the error.

1

Is there any reason why this happens and how can I possibly fix this issue ?

Rene Duchamp
  • 1,491

1 Answers1

3

From the TeXnicCenter FAQ on project files:

What's the ressource overhead when working with projects?

There is nearly none. TeXnicCenter only creates two files for each project:

<project>.tcp: This is the project file. It is very small, because it contains only information about the main file of the project and whether the project requires BibTeX and/or MakeIndex. All the other information displayed in the structure view is generated by the TeXnicCenter parser from the main file.

<project>.tps: This is the project session file, which stores information about the files, that where opened in the editor, last time the user worked at the project.

Both files are in INI-file format, so that they a readable/editable with a text editor.

Both files together will require less than 2kB in most cases, so there is no reason, not to use the project support.

The format of <project>.tcp is very basic and has the following format/contents:

[FormatInfo]
Type=TeXnicCenterProjectInformation
Version=4

[ProjectInfo] MainFile=Master.tex UseBibTeX=0 UseMakeIndex=0 ActiveProfile=LaTeX > PDF ProjectLanguage=en ProjectDialect=US

It's clear that it contains a number of default flags associated with some master/main file. In contrast, the actual session is saved in <project>.tps, and have a more detailed view/format:

[FormatInfo]
Type=TeXnicCenterProjectSessionInformation
Version=2

[Frame0] Flags=0 ShowCmd=1 MinPos.x=-1 MinPos.y=-1 MaxPos.x=-1 MaxPos.y=-1 NormalPos.left=4 NormalPos.top=26 NormalPos.right=1362 NormalPos.bottom=445 Class=LaTeXView Document=ch01_introduction.tex

[Frame0_View0,0] TopLine=1394 Cursor=117985

[Frame1] Flags=0 ShowCmd=1 MinPos.x=-1 MinPos.y=-1 MaxPos.x=-1 MaxPos.y=-1 NormalPos.left=4 NormalPos.top=26 NormalPos.right=1362 NormalPos.bottom=445 Class=LaTeXView Document=ch02_methodology.tex

[Frame1_View0,0] TopLine=4 Cursor=1146

...

[SessionInfo] FrameCount=18 ActiveFrame=0

[Bookmarks] ch01_introduction.tex=437

So, for each tab that was open, it stores the filename, the location of the cursor, as well as some information on bookmarks using a [Frame0]...[Frame_View0,0]...[Frame1]...[Frame_View0,0]... layout.

You have the following choices, assuming that your <project>.tps file is intact:

  1. Try to recreate <project>.tcp from the above layout;
  2. Create a new, blank project and copy the contents of <project>.tps into the newly-created session file;
  3. Recreate the project from scratch.

Sadly enough it happens that these files become corrupted during crashes. It's happened to me once before. So I usually keep a backup.

Werner
  • 603,163
  • No experience on TC, can't we build on .tex files if the project files are lost. – texenthusiast Aug 21 '13 at 02:33
  • @texenthusiast: Yes, you can open the main .tex file and build it. Projects are just a way of keeping things organized (specifically regarding the files that are open and at what point). It's a nice-to-have, but not essential to compiling files. – Werner Aug 21 '13 at 03:00
  • So can the .pdf be generated in this case also with .tex files with.tcp files corrupted/missing – texenthusiast Aug 21 '13 at 03:05
  • 1
    @texenthusiast: Yup. As mentioned, the .tcp (and .tps) is just to keep things organized from a session point-of-view. – Werner Aug 21 '13 at 03:07
  • @Werner : yeah I had a BSOD just before I compiled and only then the project got corrupted. I always will create a backup. It's a good habit to do that. – Rene Duchamp Aug 24 '13 at 20:18