Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Unassigned: Partial declarations of 'ViewName' must not specify different base classes [139]

$
0
0
When I have partials views that start with underscore and full view that is the same name, but without underscore. I.e. "_Details.cshtml" and "Details.cshtml", the classes generated are with the same name: Details
and therefore throwing compile-time exception:

```
Partial declarations of '....Details' must not specify different base classes ..\Details.generated.cs
```

![Image](http://i.imgur.com/ZZleIgO.png)

If I rename generated classes for partial views to include underscore in their name, issue goes away and I can compile.

But I need to do that on every file regeneration, which is slightly annoying. Anything I can do to fix this, without partial views renaming?
Comments: David, yep, exactly that issue. Only we specified our namespaces in web.config, next to views, so in views we only have "@model Details" without full namespace. I guess specifying full namespace for the model class should fix this? (sorry, not at work at the moment, don't have access to check myself)

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>