【问题标题】:Publish website stopped working after upgrading to Visual Studio 2012.2升级到 Visual Studio 2012.2 后发布网站停止工作
【发布时间】:2013-04-09 21:23:48
【问题描述】:

好的,在将我的 Visual Studio 从 2012 升级到 Visual Studio 2012.2 (http://www.asp.net/vnext) 后,我无法发布我的网站。

当右键单击我的 Web 项目并单击“发布网站”时,我得到的窗口也与我使用的不同。但是,我已经像这样设置了我的发布配置文件:

然后我得到依赖错误,正如你在这里看到的(是的,没有讨论 DropBox 物理路径,这不应该是问题):

我可以轻松构建项目,并且在发布到DEBUG模式时我也可以发布。

您可以在此处查看我的 SLN 文件,并且所有链接似乎都是正确的。我唯一的疑问是 Release.AspNetCompiler.TargetPath,因为这是它使用的旧路径。 :

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Client", "Client\", "{E9447A39-3F6B-4603-B476-FB72BDB41015}"
    ProjectSection(WebsiteProperties) = preProject
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5"
        ProjectReferences = "{92655DFC-29BE-4EEE-A211-E96811E113AA}|GKBusiness.dll;{BFD0BEE2-D00B-4F25-A3D4-D6C5351FA6E4}|GKDatabase.dll;{A4A80063-3996-4B53-992A-0ED1C3D78959}|Utils.dll;{D998D4C0-A7C1-495C-A40B-3926F3CF593A}|MathLibrary.dll;{7F454D7D-8AD6-49A2-88C6-6DD569168618}|Common.dll;"
        Debug.AspNetCompiler.VirtualPath = "/Client"
        Debug.AspNetCompiler.PhysicalPath = "Client\"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Client\"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/Client"
        Release.AspNetCompiler.PhysicalPath = "Client\"
        Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Client\"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        VWDPort = "16481"
        DefaultWebSiteLanguage = "Visual C#"
    EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GKBusiness", "GKBusiness\GKBusiness.csproj", "{92655DFC-29BE-4EEE-A211-E96811E113AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GKDatabase", "GKDatabase\GKDatabase.csproj", "{BFD0BEE2-D00B-4F25-A3D4-D6C5351FA6E4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "Utils\Utils.csproj", "{A4A80063-3996-4B53-992A-0ED1C3D78959}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathLibrary", "MathLibrary\MathLibrary.csproj", "{D998D4C0-A7C1-495C-A40B-3926F3CF593A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{7F454D7D-8AD6-49A2-88C6-6DD569168618}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GKTest", "GKTest\GKTest.csproj", "{8BA66640-32FE-4DE1-B527-8986BD3F8713}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2394BF74-243E-4521-9E2C-AEDC2AFB0D97}"
    ProjectSection(SolutionItems) = preProject
        GodeKarakterer.vsmdi = GodeKarakterer.vsmdi
        Local.testsettings = Local.testsettings
        TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
    EndProjectSection
EndProject

我真的不知道出了什么问题。但我当然希望能够发布我的网站!

我已尝试重新启动 Visual Studio、重建解决方案、清理解决方案并重新启动计算机。

感谢 Microsoft - 我很喜欢这次更新.. Grrrr! :-(

【问题讨论】:

  • 您是否复制了 Visual Stuio 2012 创建的新文件夹中的所有外部引用(DLL)?
  • @Obama:什么新文件夹? :-) 没有任何内容被复制到我在 VS 中提供的路径中。
  • 好的,所以请尝试再次重新加载引用,因为保管箱上的共享文件夹可能会导致问题:)

标签: c# visual-studio visual-studio-2012 publishing


【解决方案1】:

我在 Visual Studio 2012 中的发布选项也遇到了一些令人讨厌的问题。

您可能想尝试的一些事情:
- 删除发布配置文件(同时检查文件系统)。
- 清洁解决方案。
- 关闭 Visual Studio。
- 重新启动您的 PC(以终止所有网络服务器进程)。
- 清洁温度。 C:\Windows\Microsoft.Net\Framework\ 下的文件。
- 启动 Visual Studio。
- 构建。
- 重新创建发布配置文件。

【讨论】:

    【解决方案2】:

    我想,您需要永久放弃 Visual Studio 201011,并且不要卸载它们中的任何一个。如果您在其中打开解决方案,您似乎会重新破坏 Visual Studio 2012

    1. 打开开始菜单并输入 "%AppData%" 并输入以进入您的应用程序数据文件夹
    2. 如果您没有被自动放入该文件夹,请转到 “Roaming” 文件夹。
    3. 打开“Microsoft”文件夹。
    4. 打开 “VisualStudio” 文件夹。
    5. 您将看到一个名为 "11.0" 的文件夹,即 VS 2012 文件夹以及 "10.0" VS 2010 文件夹。
    6. 删除或重命名“10.0”文件夹。
    7. 删除或重命名除 "11.0" 文件夹之外的所有其他文件夹。
    8. 重新启动 Visual Studio 2012

    看看你的 Visual Studio 2012 是否可以工作。祝你好运!

    【讨论】:

      猜你喜欢
      • 2010-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多