为什么我的网站项目名称中的括号中有一个数字?

spr*_*t12 7 asp.net web visual-studio-2013

这只是好奇心/烦恼而不是真正的问题.

我有一个使用VS 2013的Web表单网站项目.不知何故,项目名称包括名称中的(1)(2),我已尝试编辑解决方案文件,删除所有其他网站,重建/清理等,仍然无法弄清楚从哪里得到(2).

在此输入图像描述

解决方案文件

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Web
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site", "http://localhost:52806", "{5411FD57-5AFE-4A3A-9474-0DCD64C89003}"
    ProjectSection(WebsiteProperties) = preProject
        UseIISExpress = "true"
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
        Debug.AspNetCompiler.VirtualPath = "/localhost_52806"
        Debug.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Dropbox\Projects\Site\"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_52806\"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/localhost_52806"
        Release.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Dropbox\Projects\Site\"
        Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_52806\"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        SlnRelativePath = "..\..\..\..\..\..\Dropbox\Projects\Site\"
    EndProjectSection
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {5411FD57-5AFE-4A3A-9474-0DCD64C89003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {5411FD57-5AFE-4A3A-9474-0DCD64C89003}.Debug|Any CPU.Build.0 = Debug|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal
Run Code Online (Sandbox Code Playgroud)

Bra*_*don 9

您可能有两个具有相同IIS绑定信息的站点.如果我创建,删除然后重新创建一个网站,这通常会发生在我身上.

找到你的IISExpress文件夹(我的是C:\ Users\brandon\Documents\IISExpress),然后转到config/applicationhost.config

使用重复绑定查找您的站点名称并删除该<site>节点.它看起来像这样

<site name="WEBSITENAME" id="21">
    <application path="/" applicationPool="Clr2IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\Users\...\YourProject" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:SomePortNumber:localhost" />
    </bindings>
</site>
Run Code Online (Sandbox Code Playgroud)


Fre*_*ing 8

我正在使用Visual Studio 2015,我只是删除了.vs我的解决方案根目录中的文件夹.它包含.vs\config\applicationhost.config.vs\mySolutionName\v14\.suo.

编辑其中一个文件,可能删除旧的IIS Express绑定或其他东西,可能是这样做的好方法.但是打击.vs文件夹并重新加载解决方案对我来说很有用.