Thursday, September 13, 2007

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

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 .csproj file in note pad and edit the items 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. It might work if you just delete the code behind and then rebuild, but I didnt't try this.

 

#     Comments [0]  
kick it on DotNetKicks.com