我正在通过命令行而不是在Visual Studio 2013中构建项目.注意,我已将项目从Visual Studio 2012升级到2013.项目在IDE中构建良好.另外,我首先完全卸载了VS2012,重新启动并安装了VS2013.我拥有的唯一Visual Studio版本是2013 Ultimate.
ValidateProjects:
39>path_to_project.csproj(245,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
39>Done Building Project "path_to_project.csproj" (Clean target(s)) -- FAILED.
Run Code Online (Sandbox Code Playgroud)
以下是有问题的两条线:
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
Run Code Online (Sandbox Code Playgroud)
原来的第二行是v10.0,但我手动将其更改为v12.0.
$(VSToolsPath)从我看到的扩展到v11.0(VS2012)文件夹,显然已不存在了.路径应该是v12.0.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\
Run Code Online (Sandbox Code Playgroud)
我尝试在系统环境变量表中指定VSToolsPath,但外部构建实用程序仍使用v11.0.我尝试在注册表中搜索,但没有提到任何内容.
遗憾的是,我没有看到任何简单的方法来获得使用的确切命令行.我使用构建工具.
思考?
c# web-applications build visual-build-professional visual-studio-2013
我有一个可以在我的本地机器上构建的项目,但是,当我得到TFS来构建它时,我收到以下错误 -
SGEN:尝试加载格式不正确的程序集:
在阅读了关于这个主题的许多其他帖子后,大多数人只是说我需要将构建类型更改为x86或任何CPU,而不是x64,但在尝试了无数组合之后,这不是解决方案.我的程序也是一个Windows服务,因此将应用程序池设置为允许32位应用程序(如其他人所建议的)也不是解决方案.
我尝试从Visual Studio 2013发布Web项目,但使用Web部署不断收到此错误.
Web部署任务失败.未知的ProviderOption:DefiningProjectFullPath.已知的ProviderOptions是:skipInvalid.
我按照本指南设置自己的NuGet私有服务器,但使用的是Visual Studio 2010.
我已经成功添加了NuGet.Server包Package Manager Console,但是当我想构建WebApplication时,我遇到了错误:
名称空间'NuGet'中不存在类型或命名空间名称'Server'(您是否缺少程序集引用?)
软件包安装中没有错误,但是我发现NuGet.Server项目的参考文件夹中没有添加错误,为什么会这样?
编辑:进一步调查包内容,我看到NuGet.Server没有libfor net40.我可能需要派生NuGet.Server源并编译它net40来解决这个问题.
这是我的日志来自Package Manager Console:
PM> Install-package nuget.server
Attempting to resolve dependency 'NuGet.Core (? 2.10.1)'.
Attempting to resolve dependency 'Microsoft.Web.Xdt (? 2.1.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (? 8.0.1)'.
Attempting to resolve dependency 'RouteMagic (? 1.3.0)'.
Attempting to resolve dependency 'WebActivatorEx (? 2.1.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (? 1.0.0.0)'.
Installing …Run Code Online (Sandbox Code Playgroud)