开发者

Spark View Engine "An assembly with the same simple name" error

I am trying out the Spark view engine with ASP MVC but get the error below when displaying a view. The view references model objects that are in a different assembly to the main web application (MyApp.Model.dll). I am stuck on the cause or resolution to this.

Dynamic view compilation failed. 0,0): error CS1704: An assembly with the same simple name 'MyApp.Model, Ver开发者_Go百科sion=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side.


It sounds like you're referencing the same assembly multiple times in your view. Instead of using the <use assembly=""> element you might want to use the <use namesace=""> element


Craig I got the same problem, if I modify some class in assembly X and do a build, I got this error at runtime for the assembly X.

But after a "rebuild" (not "build") it's working.

For me it has been in the middle of a project. It comes maybe from an update ?

Matthieu

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜