Run ASP.NET project outside of visual studio [dupl

2019-08-02 14:30发布

This question already has an answer here:

I have an ASP.NET project in visual studio which works with IIS Express. I want to build and run the project in the browser without opening visual studio. Is it possible? Remember that I don't want to deploy it to IIS.

EDIT: I corrected my command based on the provided answers. This is my command:

@ECHO off
SET CurrentDir="%CD%"
SET IISRoot="%ProgramFiles(x86)%\IIS Express\"
CD /D %IISRoot%
START http://localhost:7710/
IISExpress /path:%CurrentDir%\ProjectFolder\ /port:7710

1条回答
做自己的国王
2楼-- · 2019-08-02 14:39

Of couse you can. To build it just run

 C:\ Windows\Microsoft.NET\Framework\v4.0.30319\MSbuild.exe

If you use different version of framework just check the correct path

To run it call

  iisexpress /path:c:\myapp\ /port:9090
查看更多
登录 后发表回答