调试页面时使用本地路径的 Visual Studio [英] Visual Studio using local path when debugging pages
问题描述
当我在 VS2010 中调试 Silverlight 项目的页面时,它会将浏览器发送到 file:///C:/Users/Chris/Documents/Visual Studio 2010/Projects/Growing/Growing/Bin/Debug
而不是 http://localhost/
.有谁知道这是怎么回事?我不记得为此更改过任何类型的设置,也不知道从哪里更改回来.
When I debug a page of my Silverlight project in VS2010 it sends the browser to file:///C:/Users/Chris/Documents/Visual Studio 2010/Projects/Growing/Growing/Bin/Debug
rather than http://localhost/
. Does anyone know what happened with this? I don't remember changing any kind of settings for that and have no idea where to change it back.
推荐答案
查看 Web.csproj 文件中的设置.如果您在记事本中打开它(或在解决方案中将其卸载并右键单击、编辑...),您应该能够看到 VisualStudio 设置.我的猜测是您可能需要更新这些设置.
Take a look at the settings in your Web.csproj file. If you open it in notepad (or unload it within the solution and right click, edit...), you should be able to see VisualStudio settings. My guess is that you may need to update those settings.
这是我从本地主机运行的 SL 项目之一的设置.
Here are the settings for one of my SL projects that runs from the localhost.
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>52878</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost/ExternalWeb</IISUrl> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
这篇关于调试页面时使用本地路径的 Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!