I'm getting this error at runtime when the view is compiled:
error CS0433: The type 'System.Web.Mvc.SelectList' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\83441352\576b4e92\assembly\dl3\430af4c5\72b075f3_d77bc901\System.Web.Mvc.DLL' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
I added a call to SelectList in my view today, so I can't say if what I did yesterday can explain it: I installed MVC RC, then after hitting the RouteUrl regression, I decided to revert back to MVC beta.
I'm with the VS local server. I deleted the temp folder and it changes nothing.
Note that I tried the same with a brand new MVC sample generated by VS. This one works well. So I don't know what produces that in my own project. I compared both web.config files and they are the same.
visualhint
Member
10 Points
25 Posts
"System.Web.Mvc.SelectList exists in both assemblies" error
Jan 29, 2009 02:33 PM|LINK
I'm getting this error at runtime when the view is compiled:
error CS0433: The type 'System.Web.Mvc.SelectList' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\83441352\576b4e92\assembly\dl3\430af4c5\72b075f3_d77bc901\System.Web.Mvc.DLL' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
I added a call to SelectList in my view today, so I can't say if what I did yesterday can explain it: I installed MVC RC, then after hitting the RouteUrl regression, I decided to revert back to MVC beta.
I appreciate your help, I'm stuck.
Scout7
Member
76 Points
212 Posts
Re: "System.Web.Mvc.SelectList exists in both assemblies" error
Jan 29, 2009 02:50 PM|LINK
The first thing I would try is stopping IIS and then deleting everything in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'
see if that makes any difference first.
visualhint
Member
10 Points
25 Posts
Re: "System.Web.Mvc.SelectList exists in both assemblies" error
Jan 29, 2009 03:06 PM|LINK
I'm with the VS local server. I deleted the temp folder and it changes nothing.
Note that I tried the same with a brand new MVC sample generated by VS. This one works well. So I don't know what produces that in my own project. I compared both web.config files and they are the same.
visualhint
Member
10 Points
25 Posts
Re: "System.Web.Mvc.SelectList exists in both assemblies" error
Jan 29, 2009 03:25 PM|LINK
My reference to system.web.mvc in my project was not set as "Copy Local = true" anymore. When setting it as such, it works back as normal.
I can't explain why not copying it creates a conflict between the GAC and this assembly that I was not even copying...
visualhint
Member
10 Points
25 Posts
Re: "System.Web.Mvc.SelectList exists in both assemblies" error
Jan 29, 2009 03:26 PM|LINK
My reference to system.web.mvc in my project was not set as "Copy Local = true" anymore. When setting it as such, it works back as normal.
I can't explain why not copying it creates a conflict between the GAC and this assembly that I was not even copying...
(Sorry for double post, the forums told me this was not posted the first time)