Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal report file does not get deployed to server in ASP.NET MVC

I am using a crystal reports through crystal report viewer server side control in a webform.

I am using a webform because the crystal report viewer provides an easy way to export to PDF and to Excel.

My problem is that when I deploy to the server, the crystal report .rpt file does not get copied to the target folder.

My solution structure looks like this:

Solution
 |-Content
 |-Controllers
 |-Models
 |-Views
 |-etc...
 |-Reports
    |-Default.aspx
    |-Report.rpt

On the server, the Report.rpt file is missing after I publish.

like image 659
Andrew Avatar asked Apr 15 '10 06:04

Andrew


1 Answers

If you right click on the Report.rpt file in Solution explorer and view the properties, make sure that the "Build Action" is set to Content. I believe by default it is set to Embedded resource.

like image 89
Luke Avatar answered Sep 18 '22 07:09

Luke