Erro abrir projeto: Invalid Resouce file: Duplicate resouce

Delphi

21/07/2009

Olá amigos,
estou tentando abrir meu projeto que está no servidor.

Entao ao abrir aparece dois erros e depois abre normal:

1) Invalid resource file: Duplicate resource (Type:,Name:)

2) Error creating form: Duplicate resource (Type:,Name:)

Já viram isso?

Att
Mario


Aldus

Aldus

Curtidas 0

Respostas

Vand3rson

Vand3rson

21/07/2009

Talvez tenha um arquivo .res duplicado dentro da pasta de seu projeto.


GOSTEI 0
Guinther

Guinther

21/07/2009

Já, muitas vezes. Aqui vai a solução.


(From CodeGear NewsGroups by Clay Shannon)

Duplicate resource
Possible Cause of Error
1. You may have a unit or a class within a unit that has the same name as a
unit or class that already exists within the visible scope of the program.
It could be one of Delphi´s or another of your own units that you have
duplicated.
2. You may be using components that have same-named resources in their .DCR
files.
3. You may have attempted to manually add a resource to your projects .RES
file.

Quick Fix
1. Locate the duplicate unit or class name, and then rename it. To do this
with a unit, follow these steps:
a. With the unit highlighted, select File | Save As....
b. Provide a unique name for the unit.
c. Modify the references to the unit to reflect the new name. If it is a
class name that is the culprit, simply edit it directly in the code window.
2. If the components are your own, or if you have the source code to them,
inspect the .DCR files to see which two elements have the same name. Rename
one of the resources and try again. To rename a resource using Delphi´s
Image Editor, follow these steps:
a. Select Tools | Image Editor.
b. Select File | Open.
c. Navigate to and then open the resource file (.DCR).
d. In the tree-view, navigate to the element you need to change.
e. With the element highlighted, right-click on it and select Rename from
the context menu.
f. Enter a new name.
g. Select File | Exit, and then Yes to save the change you made.
3. If you want to add additional resources, use a separate resource file,
giving it a name that does not conflict with the project name or any of the
unit names. Add your custom resource file(s) to Delphi. For example, to add
a resource file you have created named Whatever.res, enter a line like:

{$R Whatever.Res}

Additional Information
1. Pare your Uses clauses of any units that are no longer needed.
3. The project´s resource file, which is automatically created by Delphi, is
not intended to be modified. See EResNotFound.
If all else fails, try deleting all the *.DSM, *.DOF, and *.DSK files.
See Error Creating Form: Duplicate resource [Type:,Name:].


GOSTEI 0
POSTAR