Compiler Error Message: CS0433

I will start suddenly with a kind of error message (I am new to creating a website in ASP.NET with C #, the file where the error was found is the control file .ascx = user):

Compiler Error Message: CS0433: A Link type exists in both '... \ Temporary ASP.NET Files \ root \ 901650e7 \ 5e27d040 \ App_Code.ybv-vo7n.dll' and '... \ Temporary ASP.NET Files \ root \ 901650e7 \ 5e27d040 \ assembly \ dl3 \ f6cf02ac \ a93eed1d_ab32cd01 \ Project1C.DLL '

Line 10 appears to be associated with an error (colored red). Can you give some pointers? I have problems understanding where to start looking / fixing. Thanks!

Line 9:<ItemTemplate> Line 10:<asp:HyperLink ID="HyperLink1" runat="server" Line 11:NavigateUrl='<%# Link.ToFilms(Eval("FilmsID").ToString()) %>' Line 12:Text='<%# HttpUtility.HtmlEncode(Eval("Nume").ToString()) %>' 
+6
source share
5 answers

I know this is a bit late for an answer, but may help someone else.

Question: I had a similar problem with this scenario:

  • VS2010 WebAppProject (not WebSiteProject)
  • If isolated classes have been allocated in App_Code (the [Build Action] property is set to [Compile])
  • It is created successfully, but when loading the web application in the browser it gives a compilation error CS0433: The type "Namespace.Classname" exists in the directory c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 7e10b43d \ 77c16432 \ App_Code.itpfsoon.dll 'and' c: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET files \ root \ 7e10b43d \ 77c16432 \ assembly \ dl3 \ 2055583c \ 0bc450de_1589ce01 \ WebAppName.DLL ''

Solution: Put the isolated classes for which the [Build Action] property is set to [Compilation] in any folder other than App_Code, since the App_Code folder will be compiled as a separate assembly, having the same class compiled in 2 assemblies ( App_Code and WebApp , which includes all code from App_Code itself).

Help: http://vishaljoshi.blogspot.com/2009/07/appcode-folder-doesnt-work-with-web.html

+8
source

You will have a path similar to the following:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files 

Delete the contents of this entire folder (no harm will be done), then try to clear and rebuild the solution.

+3
source

Context . I had a very similar problem with ASP with DevExpress and Visual Studio 2012. The problem was that our \ bin folder on the server was not cleaned up, so there were DevExpress DLLs from two versions v10.1 and v8.3.

Solution : I just deleted the dll files with the wrong version and it works. Another alternative (better) is to delete all the files in this directory and place the entire folder and files in a new, clear publication.

+2
source

Right-click the application name in Solution Explorer and convert it to a web application.

+1
source

I have a very similar problem with ASP WCF and Visual Studio 2010 service and the new beta. It helps for me if I edit the service code file (app_code). Adding a new line is enough to make VS rebuild the page. Than this "random" error disappears.

0
source

Source: https://habr.com/ru/post/915810/


All Articles