C# - Compiler Error Message - CS0433 - Type 'Resources.labels' Exists In Both?
Dec 2, 2010
I just upgraded my blog [URL] to BlogEngine 1.6.1 (from 1.6.0) in order to use the reCaptcha extension. I upgraded my local code from 1.6.0 to 1.6.1, then published via FTP through WebMatrix. After the upgrade, I am getting this error:
Compiler Error Message: CS0433:
The type 'Resources.labels' exists in both
'c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot9fd92f8745a2ba06assemblydl3a64307f6f14811b8_0291cb01App_GlobalResources.DLL'
and
'c:windowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot9fd92f8745a2ba06App_GlobalResources.md7pit6m.dll'
The source file and line number where it breaks varies, but it is always the same basic message. What differs is the "md7pt66m" section of the App_GlobalResources.md7pit6m.dll (the second file path in the error message). I was able to fix the error locally by deleting the Temporary ASP.NET Files, but I can't do this on my hosting server (GoDaddy). Is there something I can do to fix the error? Based on suggestions from the codeplex discussion page, I have edited web.config file in order to cycle the app pool, and renamed BlogEngine.Core.dll to BlogEngine.Core2.dll and then back in order to restart the blog. I have also added batch="false" to the <compilation> tag in web.config (based on this post). I have turned custom errors off, so you can see the error on my site now.
Description: An error occurred during the compilation of a resource required to service this request. review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'Resources.Labels' exists in both 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
ootd9ace1d695732362assemblydl398f3595ee41180f9_c5bbcb01App_GlobalResources.DLL' and 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files ootd9ace1d695732362App_GlobalResources.btptzh7p.dll'
I upgraded my web application from visual studio 2003 to 2008. When I want to create a report in visual studio 2008 and receiving this error at runtime. I am able to compile but when runnning thats when I am getting this error. How can I solve this problem?
Server Error in '/IRPSDEV' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both
'c:WINDOWSassemblyGAC_MSILCrystalDecisions.Web10.5.3700.0__692fbea5521e1304CrystalDecisions.Web.dll' and 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesirpsdev9e97e0a994a2ecdassemblydl3151eb571�0df56e1_6064c201CrystalDecisions.Web.DLL'
Source Error:
[Code]....
Line 161: Line 162: [System.Diagnostics.DebuggerNonUserCodeAttribute()] Line 163: private global::CrystalDecisions.Web.CrystalReportViewer @__BuildControlCrystalReportViewer1() { Line 164: global::CrystalDecisions.Web.CrystalReportViewer @__ctrl; Line 165:
Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesirpsdev9e97e0a994a2ecdApp_Web_customsapprovedcalimsreport.aspx.cdcab7d2.qc0hdu8q.0.cs Line: 163 Show Detailed Compiler Output:
I am using VS 2010 with an ASP.Net web application (FW: 3.5). When I run the app in VS, I get the following message:
c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files oote7d09027703efd1App_Web_commandmodule.aspx.98f065d9.hwdz-ui2.0.cs(150): error CS0433: The type 'ASP.commandmodule_command_master' exists in both 'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files oote7d09027703efd1App_Web_command.master.98f065d9.5f4zhfs0.dll' and 'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files oote7d09027703efd1App_Web_ltl_wu4_.dll'
I have deleted the temporary files/folders and as soon as I run the app, I get the same message and the files reappear. This is a show stopper and I do not know where to turn. I have searched the web, but the only thing I found was suggestion to delete the folders, which did not work.
I've just gone thru a large-ish project and renamed A LOT of namespace directives. Everything works fine on my developer box - deploy it to stage and I get:
Compiler Error Message: CS0433: The type 'ASP.usercontrols_pageheader_ascx' exists in both 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files oot89252a5f7305b927App_Web_hodsbmv3.dll' and ' c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files oot89252a5f7305b927App_Web_pageheader.ascx.6bb32623.bs4iljip.dll'
Yuck. Very similar to this: Deployment Project dlls cause 'type x exists in both' errors, but must be coming from a different cause.
I have none of the problems I've seen mentioned in other articles (App_Code / CodeFile directive). Worked out why it works on my machine: the website has no problem when it is in a vdir. If I remove the "PageHeader" usercontrol from the masterpage it lives on everthing is fine. If I rename "PageHeader" everything is fine. Updated: renaming the usercontrol doesn't help.
I'd had a look at the assemblies mentioned in the error in reflector; App_Web_hodsbmv3.dll contains dynamic classes for all the usercontrols in my project. App_Web_pageheader.ascx.6bb32623.bs4iljip.dll' contains the same code just for the PageHeader usercontrol. Why would ASPX decide to create the same class in two assemblies?
I have been reading many other posts on this and can not find the resolution to my issue. My problem is that i'm trying to create a visual studio project for a application that was created years ago with no project. So I have a class file in the app_code directory and I have set it's build action to "Compile" because one of my aspx pages did not find the class that was being accessed. After doing this and running the application I get the CS0433: The type '*********' exists in both error. Both paths go through the temp asp net files. The developer of this app has this call in a aspx page
MyUtils utils = new MyUtils();
Then in the global.asax he has
MyUtils Util = new MyUtils(); This is where the error occurs.
In a MVC2 project I moved a file from App_code to Content folder, compile it. Then move it back again to App_Code and then changer its Build Action to "Compile". Now I get this error and I don't know how to fix this to make my program work again:
CS0433: The type 'Helper' exists in both 'c:Users...AppDataLocalTempTemporary ASP.NET Files oot00d4b7d2553f9cApp_Code.zowyklar.dll' and 'c:Users...AppDataLocalTempTemporary ASP.NET Files oot00d4b7d2553f9cassemblydl35c6d353719f85663_cde9cb01MyProject.DLL'
I have started getting this very strange error first on the development server and then on production and almost out of ideas,
Platform: Windows 2003 sp2 ASP.NET 2.0 IIS 6.0 No Ajax on the page.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'ASP.pdfcalendar2_ascx' exists in both 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesepwfactivator4018c8c986d178b5App_Web_qtq_qvda.dll' and 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesepwfactivator4018c8c986d178b5App_Web_zcht2x1u.dll'
Source Error:
[Code]....
Source File: c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesepwfactivator4018c8c986d178b5App_Web_searchcriteria.aspx.cdcab7d2.uuer7iw7.0.cs Line: 1022
I added a web reference to a web service to my web project. I can add an instance of the web service in my code and everything appears to work fine. But if I try to debug my code I get a complie error stating that the Type is not defined. What am I doing wrong?
Description: An error occurred during the compilation of a resource required to service this request. review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'WSQSPExport.OrderImport' is not defined.
Source Error:
[Code]....
Line 336: Dim boolResult As Boolean = True Line 337: Dim strException As String Line 338: Dim objQSPExport As New WSQSPExport.OrderImport Line 339: Dim reader As XmlReader Line 340: Dim sr As System.IO.StreamReader Source File: F:WebsxxxFarmsxxxWebApp_Codecls_ExportQSP.vb Line: 338
I am using windows 7, my application is working fine in visual studio but when i host it and browse it through my browser getting the following error. Sometime back it worked fine but recently it started giving this error. Server Error in '/InfraICHR' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC2000: compiler initialization
I am a recent convert to ASP and a fairly total n00b, which means that though I've worked with web technologies for all my life, I have no idea how ASP handles them and I'm learning step by step so I beg for some patience as my many questions may be trivial.
For example, I've followed a couple of online tutorials on creating basic authentication via web.config, however I have run into some trouble. Here is my setup:
[Code]....
and some HTML:
[Code]....
However, after compiling, the browser tells me this:
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS1061: Type `ASP.views_login_index_aspx' does not contain a definition for `ProcessLogin' and no extension method `ProcessLogin' of type `ASP.views_login_index_aspx' could be found (are you missing a using directive or an assembly reference?)
Compilation Error Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CVT1106: cannot write to file
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30451: Name 'SendMail' is not declared.
I have a ASP.NET (C#) web page in which I want to enumerate a dictionary in a code render block:
<% foreach (Dictionary<string, string> record in parsedData) { %> <div>...Some HTML Code...</div> <% } %>
But I get an error like:
Compiler Error Message: CS0246: The type or namespace name 'Dictionary' could not be found (are you missing a using directive or an assembly reference?)
How do I import System.Collections.Generic into the page itself? Here is my page directive:
I am new to asp... I tried to the below script referring to a tutorial which gives the error Compiler Error Message: BC30205: End of statement expected.
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30451: Name 'SubIds' is not declared.Source Error:
Line 41: 'End If Line 42: Dim dv As DataView Line 43: SubIds As String = "", Line 44: SelectedDetails As String() = Session("SubClassIds").ToString().Split(",") Line 45: divShowClassList.Visible = True
CS0103: The name 'lblRegion' does not exist in the current context
Source Error:
[Code]....
Line 31: {Line 32: Line 33: lblRegion.Text = dt.Rows[0]["RegionName"].ToString();Line 34: lblCountry.Text = dt.Rows[0]["CountryName"].ToString();Line 35: lblCountryCode.Text = dt.Rows[0]["CountryCode"].ToString();
this is source code: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net; using System.Xml; public partial class CSharp : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Get IP Address string ipaddress; ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (ipaddress == "" || ipaddress == null) ipaddress = Request.ServerVariables["REMOTE_ADDR"]; DataTable dt = GetLocation(ipaddress); if (dt != null) { if (dt.Rows.Count > 0) { lblCity.Text = dt.Rows[0]["City"].ToString(); lblRegion.Text = dt.Rows[0]["RegionName"].ToString(); lblCountry.Text = dt.Rows[0]["CountryName"].ToString(); lblCountryCode.Text = dt.Rows[0]["CountryCode"].ToString(); } else { } } } private DataTable GetLocation(string ipaddress) { //Create a WebRequest WebRequest rssReq = WebRequest.Create("[URL]xml/" + ipaddress); //Create a Proxy WebProxy px = new WebProxy("[URL]+ ipaddress, true); //Assign the proxy to the WebRequest rssReq.Proxy = px; //Set the timeout in Seconds for the WebRequest rssReq.Timeout = 2000; try { //Get the WebResponse WebResponse rep = rssReq.GetResponse(); //Read the Response in a XMLTextReader XmlTextReader xtr = new XmlTextReader(rep.GetResponseStream()); //Create a new DataSet DataSet ds = new DataSet(); //Read the Response into the DataSet ds.ReadXml(xtr); return ds.Tables[0]; } catch { return null; } } }
I usually only write in ASP, so I am not very familiar with this script. Can anyone tell me how to how to request a querystring so I can use it to pull the image location. Like this.
I'm accessing a Masterpage property from a regular page by doing the following:
[Code]....
I get the following error message:
Compiler Error Message: CS0246: The type or namespace name 'SecondMasterPage' could not be found (are you missing a using directive or an assembly reference?)
My base class file is a file called BaseClass.cs in my App_Code directory. Other functions in there work without errors. Why?
I created a web application using visual studio 2010 / MVC2 / MSSQL 2008 and it runs fine in my laptop. However when I run the application in the hosting provider it shows the error message below:
Compiler Error Message: CS0308
The hosting provider is [URL] and the link to my web application is [URL] I would like to know how to solve this issue? If anyone know PLEASE let me know how to troubleshoot / fix this issue. Also in case the problem is on the hosting provider, let me know if you know of a free or very affordable hosting provider with support for MVC 2 and MSSQL 2008.