我正在尝试.NET 4使用MSBuildWeb Deploy 构建和部署项目,并且TeamCity我在本地开发机器上运行TeamCity实例时工作正常(最终),但是当我尝试使用相同设置设置新的TeamCity实例时得到以下错误:
\Microsoft.Common.targets(2249, 9): error MSB3086: Task could not find "sgen.exe"
using the SdkToolsPath
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A".
Make sure the SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft Windows SDK
is installed
Run Code Online (Sandbox Code Playgroud)
我正在运行Windows Server 2008,并安装了.NET 4,包括(我相信)MSBuild 4.我也安装了Windows SDK 7.1,因为其他线程建议这可能是问题,但仍然没有运气.任何想法或建议将不胜感激.
谢谢
.net msbuild teamcity windows-server-2008 microsoft-web-deploy
我刚刚将VS2008/.NET 3.5 SP1项目升级到VS2010和.NET 4.我有一个后期构建事件,它调用SGEN来生成XmlSerializers程序集.
每当我尝试运行它时,我都会收到以下错误.
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\sgen.exe" /debug /force /verbose /c:"platform:x86" "C:\path\to\SomeAssembly.dll"
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: An attempt was made to load an assembly with an incorrect format: c:\path\to\someassembly.dll.
- Could not load file or assembly 'file:///c:\path\to\someassembly.dll'
or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
If you would like …Run Code Online (Sandbox Code Playgroud) 我们有一个在Visual Studio 2010中运行的ASP.Net Web应用程序,目标是.Net 3.5.它是由TFS 2010构建的.这个Web应用程序有几个Web引用,因此构建会创建一个相关的XmlSerializers DLL.但是,此DLL是.Net 4.0程序集.
当我从构建运行此Web应用程序时,我收到错误:
无法加载文件或程序集"BLAH_BLAH_WEB_APPLICATION_NAME.XmlSerializers"或其中一个依赖项.此程序集由比当前加载的运行时更新的运行时构建,无法加载.
我们正在使用在TFS 2008下工作的msbuild .proj文件(使用构建定义中的"升级模板").我看到了这个问题,而这一个,但使用特定的SGEN生成步骤那些提.我们不是.此外,建议的解决方案涉及硬编码7.0A SGen的路径,这只是......丑陋.
有没有办法强制TFS 2010构建将此XmlSerializers DLL编译为.Net 3.5程序集?