0

I have the following code in my master page file

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.Master.cs" Inherits="Web.Site1, V1" %>

I have the following error

The type 'Web.Site1' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\64948957\cd9589ec\assembly\dl3\7c1855b4\03471781_3a47d101\V1.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\64948957\cd9589ec\assembly\dl3\9fffc304\b40ca480_3a47d101\V2.DLL

From the error message it would seem that asp.net cannot differentiate between the assembly DLLs if they contain a class with the same name and namespace even though the assembly is specified in the "inherits" declaration in my master page ".master" file.

Specifying a type in a web.config file is working correctly and can be seen using a similar format in a question I have asked previously here: https://stackoverflow.com/a/34599735/884132

"namespace, assembly"

It is suggested here: https://stackoverflow.com/a/1917005/884132 that specifying the assembly and namespace names using the same format for the inherits property as the type property in the web.config will work.

Is this actually true and does the inherits property support providing an assembly name?

Community
  • 1
  • 1
Dizzle
  • 1,026
  • 13
  • 26

1 Answers1

0

All you have to do here is to clean up (delete files) the "Temporary ASP.NET Files" folder and recompile the project. You can also check the solution posted: Asp.net temporary file cleanup

Community
  • 1
  • 1
TejSoft
  • 3,213
  • 6
  • 34
  • 58