I've made demo application to test all new features of asp vNext and Roslyn but I can't reproduce what I saw on presentations: editing controller's viewbag content and refresh the page in order to see the new viewbag, why?
Roslyn must "re-build" the controller and then If I press f5 I have to see the new content isn't it? Is there an option to activate that feature?
I'm sure this is the viewbag used for the view because when I stop and re-launch the projet, all is OK.
Maybe it's because roslyn is not selected as compiler but vNext needs roslyn in order to run sooo I'm troubled :-)
here is the controller I've edited:
public IActionResult About()
{
ViewBag.Message = "Your application description page. coooooool";
return View();
}
and the corresponding view:
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information.</p>
I'm sure this is roslyn because I can put that code in the application without any problem:
string s = nameof(Console.Write);
This is the KVM config:
C:\Program Files (x86)\Microsoft Visual Studio 14.0>kvm list
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
1.0.0-beta1 CLR amd64 C:\Users\clement\.kre\packages
1.0.0-beta1 CLR x86 C:\Users\clement\.kre\packages
1.0.0-beta1 CoreCLR amd64 C:\Users\clement\.kre\packages
1.0.0-beta1 CoreCLR x86 C:\Users\clement\.kre\packages
* 1.0.0-beta2 CoreCLR x86 C:\Users\clement\.kre\packages default
Thanks in advance for your help!
Use the start without debugging option (ctrl+F5)
As per my experience with this feature that this will not work in debug mode. You can do following thing.
Start site on particular port.
Edit Controller and Save
Refresh the page and it will work.
Note: I have tested this in VS 2015 CTP 5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With