简体   繁体   English

Visual Studio 2012中的Web项目调试和编码

[英]Web project Debugging & Coding in Visual Studio 2012

I have a web project in Visual Studio. 我在Visual Studio中有一个Web项目。

When at work i can start the project in debug mode (F5), and set break points. 在工作时,我可以以调试模式(F5)启动项目,并设置断点。 Edit the Code Behind or asp controls. 编辑“隐藏代码”或“ asp控件”。 When pressing F5, this will refresh and my new code will be represented. 当按F5键时,将刷新并显示我的新代码。

At my home computer i can edit, i can press F5, but my changes will not be shown. 在我的家用计算机上,我可以进行编辑,可以按F5键,但是不会显示我的更改。 And the debugger will step through the code like it does not realize that it has come some new code. 调试器将逐步检查代码,就像它没有意识到已经引入了一些新代码一样。

Has anyone experienced this before? 有谁之前经历过这个吗? This is not the first time I have seen this, but i cant for the life of me figure out how to make it refresh.... 这不是我第一次看到这种情况,但是我终生无法弄清楚如何使其恢复活力。

Any pointers will be welcome :) 任何指针都将受到欢迎:)

Edit: 编辑:

Could this by any chance have something to do about the project type? 难道这与项目类型有关吗? Or the compilation of the web project? 还是Web项目的编译?

I figured out why this worked as it did. 我想出了为什么这样做会如此。

The project type i had chosen for my project was ASP.NET WEb Forms Application. 我为我的项目选择的项目类型是ASP.NET Web表单应用程序。 This implies that the project will compile and be run from an DLL file. 这意味着该项目将编译并从DLL文件运行。

To rebuild this everytime there is made a change is not possible, so it doesn't. 每次进行更改都无法重建,因此无法更改。

I changed the project type and buildt a Web Site instead. 我更改了项目类型,而是建立了一个网站。 This kind of project does not compile into a DLL, but is rather run on the fly from the files that i code. 这种项目不会编译成DLL,而是从我编写的文件中即时运行。 Because of this i can make changes to my files, hit f5 and it will automatically reload with the new content. 因此,我可以对文件进行更改,按f5键,它将自动重新加载新内容。

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

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