ASP.NET vNext-动态编译代码对我不起作用 [英] ASP.NET vNext - compile code dynamically not working for me
问题描述
我已经在这里完成了本教程的学习: http://www .asp.net/vnext/overview/aspnet-vnext/getting-started-with-aspnet-vnext-and-visual-studio
I've run through the tutorial on this here: http://www.asp.net/vnext/overview/aspnet-vnext/getting-started-with-aspnet-vnext-and-visual-studio
我正在执行第2部分的步骤7-在浏览器仍然打开的情况下,打开Class1.cs并将消息文本更改为来自ClassLibrary1的新消息!".
I am following step 7 in section 2 - "With the browser still open, open Class1.cs and change the message text to "New message from ClassLibrary1!".
不幸的是,在更改代码后,刷新浏览器时它与以前相同.我必须重新编译才能使更改生效.
Unfortunately after making the code change, when I refresh the browser it is the same a before. I have to recompile for the change to take effect.
任何想法为何?我想看到魔术发生了!
Any ideas why? I want to see the magic happen!
Windows 7 64位 Microsoft Visual Studio专业版14 CTP 版本14.0.21730.1 DP Microsoft .NET Framework 版本4.5.50938
Windows 7 64bit Microsoft Visual Studio Professional 14 CTP Version 14.0.21730.1 DP Microsoft .NET Framework Version 4.5.50938
project.json:
project.json:
{
"dependencies": {
"Helios": "0.1-alpha-build-0585",
"Microsoft.AspNet.Mvc": "0.1-alpha-build-1268",
"Microsoft.AspNet.Identity.Entity": "0.1-alpha-build-1059",
"Microsoft.AspNet.Identity.Security": "0.1-alpha-build-1059",
"Microsoft.AspNet.Security.Cookies": "0.1-alpha-build-0506",
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0520",
"Microsoft.AspNet.StaticFiles": "0.1-alpha-build-0443",
"Microsoft.Data.Entity": "0.1-alpha-build-0863",
"Microsoft.Data.Entity.SqlServer": "0.1-alpha-build-0863",
"Microsoft.Framework.ConfigurationModel.Json": "0.1-alpha-build-0233",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0-alpha",
"Classlibrary1": ""
},
"commands": {
/* Change the port number when you are self hosting this application */
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
},
"configurations": {
"net45": {
"dependencies": {
"System.Data": "",
"System.ComponentModel.DataAnnotations": ""
}
},
"k10": {
}
}
}
保罗
推荐答案
您可能正在运行调试器.文件监视程序无法与附加的调试器一起使用.为什么?长话短说:IIS(快速)将重新启动以拾取程序集更改,因此不能与附加的调试器一起使用,因为它会终止您的调试会话.
You are probably running with the debugger attached. The file watcher doesn't work with the debugger attached. Why? Long story short: IIS (express) is restarted to pick up assembly changes, so that would not work with the debugger attached because it would kill your debugging session.
无需调试即可启动网站,然后更改代码文件并刷新-发生了魔术.
Start the website without debugging, then change a code file and refresh - magic happens.
以后的使用Ctrl + F5
或Debug -> Start without debugging
这篇关于ASP.NET vNext-动态编译代码对我不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!