0

我在codeplex上创建了一个新的测试 asp.net Web 应用程序项目,以将文件上传到我的appharbor 域。但是构建失败了

我目前正专注于解决第一个问题

命名空间“System.Web”中不存在类型或命名空间名称“优化”

我已经安装了 Optimaztion 软件包。我可以在参考中看到 dll。我在 dll 属性中设置copylocal为。true但仍然得到同样的错误

Build log的视图如下

       "D:\temp\qruzvbcw.ri3\input\MyProjectFiles.sln" (default target) (1) ->
       "D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj" (default target) (2) ->
       (CoreCompile target) -> 
         App_Start\BundleConfig.cs(5,18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         App_Start\AuthConfig.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\Manage.aspx.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\OpenAuthProviders.ascx.cs(4,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\Register.aspx.cs(8,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\RegisterExternalLogin.aspx.cs(4,7): error CS0246: The type or namespace name 'DotNetOpenAuth' could not be found (are you missing a using directive or an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\RegisterExternalLogin.aspx.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         App_Start\RouteConfig.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Global.asax.cs(5,18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         ViewSwitcher.ascx.cs(8,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         App_Start\BundleConfig.cs(12,44): error CS0246: The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\Manage.aspx.cs(71,28): error CS0246: The type or namespace name 'OpenAuthAccountData' could not be found (are you missing a using directive or an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]
         Account\OpenAuthProviders.ascx.cs(37,28): error CS0246: The type or namespace name 'ProviderDetails' could not be found (are you missing a using directive or an assembly reference?) [D:\temp\qruzvbcw.ri3\input\MyProjects\MyProjects.csproj]

    18 Warning(s)
    13 Error(s)

Time Elapsed 00:00:00.62

我还能做什么

我无法在我的codeplex 项目源中看到 bin 文件夹

4

2 回答 2

0

从 Codeplex 存储库来看,您似乎没有添加应用程序所需的 NuGet 包。将包添加到您的存储库,或考虑使用NuGet 包还原在构建应用程序时自动获取包。

于 2013-07-12T07:56:23.177 回答
0

我的项目:VS 2012 Web Express MVC 4,引导布局,版本控制 TFS。

在网站功能完成后,我添加了帐户控制器、模型和相关视图。许多参考资料/包都丢失了。我可以通过 Nuget 添加其中的一些,但是修复最后几个讨厌的错误是右键单击解决方案资源管理器中的解决方案并更新 Nuget 包。

我会将此添加为评论,但我没有足够的代表点。

于 2013-08-29T14:12:05.740 回答