VS Express 安装中缺少几个系统库
Several system libraries missing in a VS Express install
我在尝试解决问题时遇到了问题。我在 VS 2013 中开发了一个网站,并尝试使用 teamcity 将网站设置为在服务器上持续集成。
我已经在我的电脑上测试过 teamcity,并使用 VS2013 安装完美编译。
在服务器上,我一切正常...除了编译。为了编译网站,我在服务器上安装了VS Express。问题是,服务器上出现了一个新错误:
System.Net.Http.Formatting 和
System.Web.Http
...都不见了。
他们是因为一些错误而失踪了吗?因为我使用的是 VSExpress 而不是 VS2013?
实际错误是:
Security\ApiAuthentication.cs(7, 23): error CS0234: The type or namespace name 'Formatting' does not exist in the namespace 'System.Net.Http' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(12, 18): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(21, 49): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(32, 48): error CS0246: The type or namespace name 'HttpActionContext' could not be found (are you missing a using directive or an assembly reference?)
我在本地安装了 VS Community 2013,在基础安装中存在 System.Net.Http
命名空间,但 System.Net.Http.Formatting
不存在。这与 System.Web
与 System.Web.Http
相同。
在安装 Microsoft.AspNet.WebApi.Core NuGet 包时都按预期出现并且可以被引用。
您是否尝试过在编译前向您的 TeamCity 构建添加 NuGet Restore 步骤?奇怪的是,如果没有适当的 NuGet 恢复,这些是您看到的唯一错误。也许是构建订单问题/红鲱鱼?
我在尝试解决问题时遇到了问题。我在 VS 2013 中开发了一个网站,并尝试使用 teamcity 将网站设置为在服务器上持续集成。
我已经在我的电脑上测试过 teamcity,并使用 VS2013 安装完美编译。
在服务器上,我一切正常...除了编译。为了编译网站,我在服务器上安装了VS Express。问题是,服务器上出现了一个新错误:
System.Net.Http.Formatting 和
System.Web.Http
...都不见了。
他们是因为一些错误而失踪了吗?因为我使用的是 VSExpress 而不是 VS2013?
实际错误是:
Security\ApiAuthentication.cs(7, 23): error CS0234: The type or namespace name 'Formatting' does not exist in the namespace 'System.Net.Http' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(12, 18): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(21, 49): error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Security\ApiAuthentication.cs(32, 48): error CS0246: The type or namespace name 'HttpActionContext' could not be found (are you missing a using directive or an assembly reference?)
我在本地安装了 VS Community 2013,在基础安装中存在 System.Net.Http
命名空间,但 System.Net.Http.Formatting
不存在。这与 System.Web
与 System.Web.Http
相同。
在安装 Microsoft.AspNet.WebApi.Core NuGet 包时都按预期出现并且可以被引用。
您是否尝试过在编译前向您的 TeamCity 构建添加 NuGet Restore 步骤?奇怪的是,如果没有适当的 NuGet 恢复,这些是您看到的唯一错误。也许是构建订单问题/红鲱鱼?