【问题标题】:Problems building a cloned project using GIT for Visual Studio 2012使用 GIT for Visual Studio 2012 构建克隆项目的问题
【发布时间】:2013-06-22 20:23:09
【问题描述】:

我开始了一个新的解决方案并创建了三个子项目:

  1. 域(类库)
  2. Web (ASP.Net MVC 4)
  3. 单元测试项目

之后,我只是使用 GIT for Visual Studio 2012 update 2 将我的文件推送到 GitHub 存储库。

文件被推送就好了(bin文件夹没有被推送)。

我去了另一台电脑,成功克隆了仓库。

我尝试构建项目并收到以下错误消息:

Error   15  The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) D:\Source\Repos\[Project Folder]\MyApp.Web\App_Start\BundleConfig.cs    2   18  MyApp.Web
Error   16  The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) D:\Source\Repos\[Project Folder]\MyApp.Web\Global.asax.cs   7   18  MyApp.Web
Error   17  The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)  D:\Source\Repos\[Project Folder]\MyApp.Web\App_Start\BundleConfig.cs    9   44  MyApp.Web

请注意,这些都是全新的空白项目,它们在第一台计算机上构建没有问题。此处显示的所有错误都在 Web 项目中,因为它是解决方案的启动项目。

我假设 Bin 文件夹中的某些文件是强制性的(不是从我的第一台电脑推送的)。

知道如何解决这个问题,因为我们正在让更多的员工参与到该项目中,并且只需要他们克隆 repo 以使一切正常工作!

问候

【问题讨论】:

  • 您是否将解决方案文件夹中的包文件夹提交到您的存储库?
  • 不,我没有。我可以从 Visual Studio 中做到这一点吗?

标签: asp.net-mvc git visual-studio asp.net-mvc-4 visual-studio-2012


【解决方案1】:

您可以启用NuGet package restore 或提交解决方案中已安装包中的二进制文件。

【讨论】:

    猜你喜欢
    • 2014-07-08
    • 2012-08-24
    • 1970-01-01
    • 1970-01-01
    • 2017-05-13
    • 2019-02-23
    • 1970-01-01
    • 2012-06-19
    • 1970-01-01
    相关资源
    最近更新 更多