Visual Studio 2008 - .Net Error: "The Type 'foo' Exists In Both "temp1.dll" And "temp2.dll" (pt 2)
Apr 7, 2010
Solution,I had also moved ashx and asmx files at the same time as this. The Class attribute of the WebService/WebHandler directives were pointed at the wrong namespace. The moral of the story is to make sure you view the markup for all as*x files you change the namespace for by right-clicking on them and choosing "View Markup".
I'm experiencing the same problem as in this question and this link, but none of the answers fixed my problem. (edit: Setting the web.config batch attribute works, but that's a coverup, not a solution)
The problem I'm having is with a User Control that I moved from the root directory to a subdirectory within the same Web Application project. It used to work fine before I moved it. When I moved it it started giving me the error message.
It's saying that the class name exists in two dll files in Temporary ASP.NET Files. Sure enough, when I open Reflector, it's in two dlls.
If I rename the class and ascx file, everything works fine. No usages of the original name exist within any of the files in my entire application. When I rename the file, I opened all of the dll files in Temporary ASP.NET Files with Reflector, and no references to the original class name exists.
So where's this phantom reference coming from how can I fix this?
Edit: I literally grepped every file in my working directory for the solution and my temp directory for the old class name and deleted every file that contained it. I then renamed back to the original, broken name and I still get the error.
Server Error in '/' 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 ssage: CS0433: The type 'ASP.dashboard_badusercontrol_ascx exists in both 'c:Docunts and SettingsmeLocal
SettingsTempTemporary ASP.NET Files oot3c2b7e1f2e8a7620App_Web_badusercontrol.ascx.a57ad085.iljdmp1p.dll' and 'c:Docunts and SettingsmeLocal SettingsTempTemporary ASP.NET Files oot3c2b7e1f2e8a7620App_Web_bhdqaimy.dll'
Source Error:
Line 1098: Line 1099:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 1100: private[code].....
Edit:Ok, so I did some more testing on what works and doesn't work.Let's say the original file name was "BadUserControl.ascx" in namespace "MyNamespace".
I moved the file to a directory called "NewDirectory" and changed the namespace to "MyNamespace.NewDirectory". There are no copies of "BadUserControl.ascx" anywhere else on my HDD. I double-checked my TFS history to ensure the ONLY difference is the addition of ".NewDirectory" to the namespace in the markup and code-behind files.
Inside of this namespace are two other user controls named "OtherUserControl" and "AnotherUserControl".
This situation fails:
I have 2 Register directives:
These situations work:
1) I keep "BadUserControl.ascx" named as is.
I have 1 Register directive on a page in the same namespace:
<%@ Register src="BadUserControl.ascx" tagname="BadUserControl" tagprefix="uc1" %>
2) I change "BadUserControl.ascx" to "GoodUserControl.ascx"
I have 2 Register directives:
<%@ Register src="GoodUserControl.ascx" tagname="GoodUserControl" tagprefix="uc1" %>
<%@ Register src="OtherUserControl.ascx" tagname="OtherUserControl" tagprefix="uc2" %>
3) 2 Register directives without BadUserControl.ascx at all:
<%@ Register src="AnotherUserControl.ascx" tagname="AnotherUserControl" tagprefix="uc1" %>
<%@ Register src="OtherUserControl.ascx" tagname="OtherUserControl" tagprefix="uc2" %>
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.
Is there any tool for Visual Studio 2008 which can reformat ASPX code to make it more presentable (eg insert line breaks, format the lines so they wrap when necessary, etc)?
I started an app in VS2008. I did it as a web site. I installed VS 2010 (yay) today. I wanted to start over as a web project. I made a Master Page. I made content pages. One of my content pages has a form on it. Super simple text boxes and submit.
I added a folder called App_Code and placed my class files there by doing Add New Item and pasting the code into the new class. I have person and persons. The persons collection class references person. In the same folder, the persons class finds the person class. Up one level in a page's code behind, I am gettingthe error
The type or namespace name 'person' could not be found (are you missing a using directive or an assembly reference?)
For giggle, I move person.cs up a folder. Still cannot find the person. Persons collection class still CAN find person. My code behind cannot find it.
A little reading tells me I have to set that folder as an app folder in IIS. I am running Windows 7 ersonal... I cannot find IIS. If not there, I ask myself what they heck is my app running under?
for being such a noob. Anyone know what is going on here?
Error 13 The type or namespace name 'DisplayTrackingController' could not be found (are you missing a using directive or an assembly reference?) c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files emp773b35cbe8ac7005App_Web_wzekhp-n.0.cs 190 People
Although I have deleted this file from my project. why I am getting this error? and what is this file App_Web_wzekhp-n.0.cs
i m developing an application in which i need to capture image via webcam and storing in db.
but i found Error the type or namespace name 'CaptureSource' could be found(are you missing a using directive assembly reference ) ,when i want to use it.i got this code and video from silverlight website
i try both visual studio 2010 and blend 3 still same error
I had to reload vwd 2008 express and sql 2008 express on my laptop. After loading cannot launch vwd, get this error message. Can anyone please suggest a remedy "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."
Now i'm using visual studio 2008 for my web application project development. I had more than 80 forms and more than 20 modules include with it. Today morning i working with my applicatons normally. Suddenly i cant debug my applications but when i tried to run the webform by View in Browser option, The seperate form shows the page and output. And i cant dubug or Run my Whole project manually. When i tried to debug the applications, suddenly the below error pop-up will displayed without any debuging.
The Operation Could not be completed. unspecified error
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. make sure the user has a local user profile on the computer. The connection will be closed.
When i compile my vs2008 solution which is a web application in debug mode i keep getting message box displayed which says that it cannot connect "whatever.designer.cs". Can
The type sp.DBOperations' exists in both c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files ootaf585a885de14bd0assemblydl3966aa64b5c4f1868_c3eeca01sp.DLL' and 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files ootaf585a885de14bd0App_Code.m9kl32ja.dll'
can Visual Studio 2008 be All-In-One tool to integrate source code continuously from team members, build, unit test?
Having used Visual Studio Team Edition 2005, unit testing each method within VS itself. I strongly believe that it is feasible to add-on tools. Example ankhsvn tool to use SVN from Visual studio [URL]
In my investigating i have come across number of tools(shown below) to use with Visual Studio 2008 professional
Development tool:- Visual Studio 2008 professional using Subversion as source control tool. Continuous Integration:- Hudson or Cruise control Build tool:- NAnt Testing:- NUnit, Selinium As Visual Studio 2008 can be used for unit testing I think NUnit is out of consideration.
In the same way i would like to have any other tools/add-ons to Visual studio to implement continuous integration, building and unit testing. This process should be automated such a way source code between team members is continuously integrated, built and unit testing is done as configured.
Objective is to use few number of tools as add-on to Visual Studio or achieve most from Visual studio itself (example unit testing). Visual Studio should be all in one tool.
I am aware that Team Foundation Server best suits my requirement, but it is out of scope due to its cost.
When i was building my project in my local machine it was giving me the below error...."Error 1706:An installation package for the product Microsoft Visual Studio 2008 Shell(integrated mode)ENU cannot be found!!!Try the installation again using a valid copy of the installation package 'vs_shell.msi'"
Background: I use SQL server 2005 developer edition and visual studio 2008. Visual studio 2008 is running on a local machine with Vista business edition. SQL server is running on a remote server using Windows server 2003. Both computers are within the same domain.
Problem: First, I used the server explorer to connect to the SQL server. Everything works as desired. Then I write code to do the same thing. I keep getting the following error message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)
However, I used the exactly identical connection string as the one used in the server explorer. So connection string should not be the problem. In addition, I tried the test code in MSDN, which tells whether my domainusername can flow the network. It turns out the user name is fine. I also went to the SQL server management studio and found the login for my computer is NVCWeihao while my computer login name is NVCweihao. I am wondering if this uppercase letter really affects the connection.
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?