-
Notifications
You must be signed in to change notification settings - Fork 224
Html.RenderPartialAsync("") shows an error in editor #1254
Comments
Super odd.... That extension methods exists in the same namespace as the base RenderPartialAsync method. I'll have to try it out once my VS updates. |
@NTaylorMullen - the error is on |
Ooo i see. Ya gotta fix this guy. |
Can you figure out what the safe fix is for this for preview 1? |
Issue here is that our code generation is compatible with 1.0.0 Mvc but not 2.0.0 Mvc. We render: DefineSection("Foo", async (__razor_section_writer) => {
}); Which works in 1.0.0. However, in 2.0.0 our define section method looks like this: public virtual void DefineSection(string name, RenderAsyncDelegate section) Where public delegate Task RenderAsyncDelegate(); The most minimal fix for this for preview1 would be to create an overload to DefineSection in What do you guys think? |
I'd vote for the minimal fix for preview1. |
This guy right here. Is this a pages-specific issue or do we need to fix this for pages and views? |
Pages and Views |
So if I understand correctly, the fix here is to add a dummy This will be targeted by the design time codegen, but will have no purpose at runtime. |
Exactly. |
IF we really wanted we could have the runtime impl do other stuff:
|
- This enables 2.0.0 code generation to not error. aspnet/Razor#1254
Went with option 2 |
- This enables 2.0.0 code generation to not error. aspnet/Razor#1254
- This enables 2.0.0 code generation to not error. aspnet/Razor#1254
👍 🔥 🥈 |
Using VS2017 d15prerel (15.3 26423.1-Preview)
Add the following to a Razor file:
You get a squigglie indicating the overload doesn't exist:
You can however "Go to definition" on the method and it finds it OK. Also, runtime works fine.
The text was updated successfully, but these errors were encountered: