Answered by:
.xsd File

Question
-
User2012297617 posted
Following this example: http://www.codeproject.com/Articles/166291/Generate-a-report-using-Crystal-Reports-in-Visual
I can't reference the .xsd file on my class. I'm getting "Error 1 The type or namespace name 'dsCheck' could not be found (are you missing a using directive or an assembly reference?) C:\Users\TEST\documents\visual studio 2010\Projects\DIR\DIR\check.aspx.cs 21 13 projectname"
What am I missing? The .xsd file is in my app_code directory.
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace projectName
{
public partial class check : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument rptCheck = new ReportDocument();
dsCheck ds = new dsCheck(); // .xsd file name <-- ERROR
}
}
}
Thursday, August 30, 2012 9:27 PM
Answers
-
User1077185331 posted
Hi,
If you working with Web Application project then app_code directory will not work. App_code directory work only website project only.
also verify below points...
right click on .xsd file and check property - Build should content not any other.
right click on aspx page which u use and check property - build should be compile.
Also try to rename app_code folder with some new name.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 30, 2012 10:39 PM
All replies
-
User1077185331 posted
Hi,
If you working with Web Application project then app_code directory will not work. App_code directory work only website project only.
also verify below points...
right click on .xsd file and check property - Build should content not any other.
right click on aspx page which u use and check property - build should be compile.
Also try to rename app_code folder with some new name.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 30, 2012 10:39 PM -
User2012297617 posted
Thank you. Actually, I did move the .sxd file out othe app_data folder and it worked. I meant app_data, not app_code.
Thanks for your response. It's just one of those. :P
Thursday, August 30, 2012 10:42 PM -
User-2009597737 posted
I am in the same situation. Moved the .xsd outside the App_data. Have the XSD /RPT and relevant ASPX/Cs in the same folder. Sitll get the error:
I tried what is suggested, simply does not work!
Must be something very simple I am missing.
Monday, July 8, 2013 2:54 PM