简体   繁体   English

VS2015 MVC没有编译经验

[英]VS2015 MVC No compile experience

It was my understanding that with the new compiler it is possible to run code without restarting an ASP.NET MVC project, eg the no-compile experience. 我的理解是,使用新的编译器可以在不重新启动ASP.NET MVC项目的情况下运行代码,例如无编译体验。

For example changing the model or controller requires restarting the entire project, which can take quite some time in VS2013 (especially with Code First). 例如,更改模型或控制器需要重新启动整个项目,这在VS2013中可能需要相当长的时间(特别是使用Code First)。

Is this, basically edit&continue for ASP.NET, now possible in VS2015? 这是基本上编辑和继续ASP.NET,现在可以在VS2015中使用吗? I tried CTP5 but could not get this working. 我试过CTP5但是无法正常工作。

Edit: The actual question 编辑:实际问题

Does VS2015, or will it, support edit and continue or a similar experience (not having to restart for model/controller changes) for ASP.NET MVC? VS2015或它是否支持ASP.NET MVC的编辑和继续或类似的体验(不必重新启动模型/控制器更改)?

Does VS2015, or will it, support edit and continue or a similar experience (not having to restart for model/controller changes) for ASP.NET MVC? VS2015或它是否支持ASP.NET MVC的编辑和继续或类似的体验(不必重新启动模型/控制器更改)?

Visual Studio Edit and Continue is available and works for ASP.Net all the way back to version 2010 with constraints (IIS Express etc...). Visual Studio Edit and Continue可用,适用于ASP.Net一直回到2010版本的约束(IIS Express等...)。

Is this, basically edit&continue for ASP.NET 这是,基本上编辑和继续ASP.NET

No. Scott Hanselman did a very detailed explanation of all the new features in vNext in this blog post Introducing ASP.NET vNext . 不,Scott Hanselman在此博客文章介绍ASP.NET vNext中对vNext中的所有新功能做了非常详细的解释。

Excerpt: 摘抄:

One of the great aspects of environments like node or rails is that they are "no compile." 节点或轨道等环境的一个重要方面是它们“无法编译”。 Just change some code and hit refresh. 只需更改一些代码并点击刷新即可。 With the next version of ASP.NET you get the power and throughput of the .NET runtime plus the "Roslyn" compiler-as-a-service for a "no-compile compile." 使用ASP.NET的下一个版本,您将获得.NET运行时的功能和吞吐量以及“无编译编译”的“Roslyn”编译器即服务。 That means means during development time you can just change your C# classes and hit Refresh in the browser. 这意味着在开发期间您可以更改C#类并在浏览器中点击Refresh。 It's the power of .NET with the dynamism of a refresh-and-go development experience. 它具有.NET的强大功能,具有刷新和开发体验的活力。

and

NOTE : This isn't ASP.NET Websites, or Razor View compilation - this is the whole thing, compiled in memory. 注意 :这不是ASP.NET网站或Razor View编译 - 这是在内存中编译的全部内容。 You can use Visual Studio for development, or text editors like Sublime, or freakin' Notepad. 您可以使用Visual Studio进行开发,或使用Sublime或freakin'Notepad等文本编辑器。 (Of course, if you want assemblies on disk, you can do that too.) (当然,如果你想要磁盘上的程序集,你也可以这样做。)

and

See my web app's bin folder in the screenshot below? 在下面的屏幕截图中查看我的网络应用程序的bin文件夹? There's no assemblies in there because the assemblies never exist on the disk. 那里没有组件,因为磁盘上的组件永远不存在。 It's actually faster and easier to have the compiler do all the work in memory. 实际上,编译器在内存中完成所有工作更快更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM