简体   繁体   English

Visual Studio Web测试

[英]Visual Studio web testing

I come from a world of PHP (Laravel) and have faced no issues with testing the API or webpage like this before. 我来自PHP世界(Laravel),以前没有像这样测试API或网页时遇到任何问题。 Every time I would make a change I'd simply refresh the page, and it would show me the result of my changed actions. 每次进行更改时,我都会刷新页面,它会向我显示更改操作的结果。

This does not seem to be the case with my new experience with VS as it seems I have to run F5 or Ctrl + F5 every time I make a simple change to the program. 我对VS的新体验似乎不是这种情况,因为每次对程序进行简单更改时,我都必须运行F5Ctrl + F5 To make things even more annoying, it is always opening a new tab with each program run. 为了使事情更加烦人,它总是在每次运行程序时打开一个新选项卡。

Is this simply the way "VS is", or am I missing something? 这是“ VS is”的简单方法吗,还是我错过了什么?

It doesn't have anything to do with VS. 它与VS没有任何关系。 PHP is a script language, it doesn't get compiled before running like c# does. PHP是一种脚本语言,在像c#一样运行之前不会被编译。 You have to do a build of the project in order for the DLLs to be up-to-date 您必须对项目进行构建,以使DLL是最新的

I am going to assume you're using IIS express and ASP.NET. 我将假设您正在使用IIS Express和ASP.NET。

Right click on Project and then choose View in Browser. 右键单击“项目”,然后选择“在浏览器中查看”。

You'll need to do a build though if you make any changes to the C# but not if making changes to CSS/Javascript (excluding things like SASS etc) 如果您对C#进行了任何更改,则需要进行构建,但是如果对CSS / Javascript进行了更改,则无需进行构建(不包括SASS等内容)

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

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