Unable to find the report in the manifest resources. please build the project, and try again.

09.13.07

I was reorganizing a project and I moved a crystal report after that I received this error at runtime "Unable to find the report in the manifest resources. please build the project, and try again." No amount of building could fix this problem. I eventually had to open up the project file in note pad and edit the entries in the xml/MSBUILD.

Here is what a Crystal Report should look like in your MSBUILD script.

<Compile Include="CrystalReport1.cs">
    <AutoGen>True</AutoGen>
    <DesignTime>True</DesignTime>
    <DependentUpon>CrystalReport1.rpt</DependentUpon>
    <SubType>Component</SubType>
</Compile>
<EmbeddedResource Include="CrystalReport1.rpt">
    <Generator>CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator</Generator>
    <LastGenOutput>CrystalReport1.cs</LastGenOutput>
</EmbeddedResource>

After you correct the entry Rename the file Build then rename it again to the old name and build again.