有没有办法在每次构建时加载DLL时都能避免iisexpress启动延迟?

时间:2023-01-18 01:08:32

I am using VS2010 and IIS Express. When I do a build there are long delays while all the dlls load up. On my rather slow machine it's usually 3-4 minutes.

我正在使用VS2010和IIS Express。当我进行构建时,所有dll加载时会有很长的延迟。在我相当慢的机器上,通常是3-4分钟。

'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods Assembly'
Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting
Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready
The thread '<No Name>' (0x1100) has exited with code 0 (0x0).
Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting
Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready
The thread '<No Name>' (0xc18) has exited with code 0 (0x0).
Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting
Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll'
The thread '<No Name>' (0xdf0) has exited with code 0 (0x0).
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll'
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Tasks.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Tasks.v4.0.dll'
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'
Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting
Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.Design.dll'
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mobile\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll'
Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting
Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\977c2a31\7c0f0d28\App_Web_aohydr2s.dll', Symbols loaded.
The thread '<No Name>' (0xe38) has exited with code 0 (0x0).

Is there some way I could preload these or leave IIS running. The Microsoft ones don't change from one week to another but it takes a few minutes of me watching them load in the output window every time I make a small change to my MVC C# code and want to check out the changes with a build and deploy.

有什么方法可以预加载这些或让IIS运行。微软的一周不会改变,但是每次我对MVC C#代码进行一些小改动并且想要通过构建检查更改时,我需要花几分钟看着它们在输出窗口加载。部署。

2 个解决方案

#1


1  

There is a way to configure debugging to run on local IIS: 有没有办法在每次构建时加载DLL时都能避免iisexpress启动延迟?

有一种方法可以配置调试以在本地IIS上运行:

Just make sure you have the same radio buttons selected in your configuration. And you'll need to create a web-site in your IIS: 有没有办法在每次构建时加载DLL时都能避免iisexpress启动延迟?

只需确保在配置中选择了相同的单选按钮。您需要在IIS中创建一个网站:

And add another line to your Hosts file:

并在Hosts文件中添加另一行:

127.0.0.1       amv.local

This way every time you start debugging, you will not need to start a new page. And you will not need to remember what port you have assigned to your debug site.

这样,每次开始调试时,都不需要启动新页面。您无需记住已分配给调试站点的端口。

#2


0  

You could try starting IIS Express yourself and have it act like IIS. So configure it to run and then in your web project, tell it you are using IIS, but configure for the details you setup IIS Express.

您可以尝试自己启动IIS Express并使其像IIS一样运行。因此,将其配置为运行,然后在您的Web项目中,告诉它您正在使用IIS,但配置您设置IIS Express的详细信息。

Now just keep in mind you'll have to have IIS express run in the same directory you develop in, so that you don't have to deploy every time to see your changes.

现在请记住,您必须在开发的同一目录中运行IIS Express,这样您就不必每次都要部署以查看更改。

Check out this post too: Configure IIS Express for external access to VS2010 project

也请查看此文章:配置IIS Express以便外部访问VS2010项目

#1


1  

There is a way to configure debugging to run on local IIS: 有没有办法在每次构建时加载DLL时都能避免iisexpress启动延迟?

有一种方法可以配置调试以在本地IIS上运行:

Just make sure you have the same radio buttons selected in your configuration. And you'll need to create a web-site in your IIS: 有没有办法在每次构建时加载DLL时都能避免iisexpress启动延迟?

只需确保在配置中选择了相同的单选按钮。您需要在IIS中创建一个网站:

And add another line to your Hosts file:

并在Hosts文件中添加另一行:

127.0.0.1       amv.local

This way every time you start debugging, you will not need to start a new page. And you will not need to remember what port you have assigned to your debug site.

这样,每次开始调试时,都不需要启动新页面。您无需记住已分配给调试站点的端口。

#2


0  

You could try starting IIS Express yourself and have it act like IIS. So configure it to run and then in your web project, tell it you are using IIS, but configure for the details you setup IIS Express.

您可以尝试自己启动IIS Express并使其像IIS一样运行。因此,将其配置为运行,然后在您的Web项目中,告诉它您正在使用IIS,但配置您设置IIS Express的详细信息。

Now just keep in mind you'll have to have IIS express run in the same directory you develop in, so that you don't have to deploy every time to see your changes.

现在请记住,您必须在开发的同一目录中运行IIS Express,这样您就不必每次都要部署以查看更改。

Check out this post too: Configure IIS Express for external access to VS2010 project

也请查看此文章:配置IIS Express以便外部访问VS2010项目