简体   繁体   English

从VS2012升级到VS2013后,SGEN无法工作

[英]SGEN doesn't work after upgrading from VS2012 to VS2013

When I compile my c# solution under VS2013 (Version 12.0.21005.1 REL) it cannot build part of projects with error message: 当我在VS2013(版本12.0.21005.1 REL)下编译我的c#解决方案时,它无法使用错误消息构建部分项目:

Error 32 The command "“C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1A\\Bin\\NETFX 4.0 Tools\\sgen.exe” /a:"Project.dll" /f /v" exited with code 3. Project 错误32命令““ C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows \\ v8.1A \\ Bin \\ NETFX 4.0 Tools \\ sgen.exe” /a:"Project.dll“ / f / v”退出,并带有代码3.项目

Post build event: “$(FrameworkSDKDir)\\Bin\\NETFX 4.0 Tools\\sgen.exe” /a:"$(TargetPath)" /f /v 发布后事件:“$(FrameworkSDKDir)\\ Bin \\ NETFX 4.0 Tools \\ sgen.exe”/ a:“$(TargetPath)”/ f / v

Indeed, folder "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1A\\Bin\\NETFX 4.0 Tools" doesn't exists: "\\Bin" contains folder "NETFX 4.5.1 Tools" only. 确实,文件夹“ C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows \\ v8.1A \\ Bin \\ NETFX 4.0 Tools”不存在:“ \\ Bin”仅包含文件夹“ NETFX 4.5.1 Tools”。

Target framework of project: ".NET Framework 4". 项目目标框架:“。NET Framework 4”。

solution (by Microsoft): 解决方案(由Microsoft):

It is best practice to use the $(SDK40ToolsPath) property to get the .NET SDK binaries path rather than manually building the path with the $(FrameworkSDKDir) property. 最佳实践是使用$(SDK40ToolsPath)属性获取.NET SDK二进制文件路径,而不是使用$(FrameworkSDKDir)属性手动构建路径。 Using “$(SDK40ToolsPath)sgen.exe” should work in Visual Studio 2013 and earlier versions. 使用“ $(SDK40ToolsPath)sgen.exe”应在Visual Studio 2013及更早版本中有效。

$(FrameworkSDKDir) value in VS macros (post build event) references invalid path VS宏中的$(FrameworkSDKDir)值(生成后事件)引用无效路径

I experienced this error today. 我今天遇到了这个错误。 The project I am working on is currently being maintained in VS2012. 我正在处理的项目目前正在VS2012中维护。 On my new install, I have VS2013 (installed first) and VS2012. 在我的新安装中,我有VS2013(首先安装)和VS2012。 I got this error building in VS2013. 我在VS2013中构建了这个错误。

The problem was the folder where sgen.exe was being run from doesn't exist on my machine. 问题是在我的机器上不存在运行sgen.exe的文件夹。 On my machine, I have $(FrameworkSDKDir)\\Bin\\NETFX 4.5.1 Tools\\ but not $(FrameworkSDKDir)\\Bin\\NETFX 4.0 Tools\\ folder. 在我的机器上,我有$(FrameworkSDKDir)\\Bin\\NETFX 4.5.1 Tools\\但不是$(FrameworkSDKDir)\\Bin\\NETFX 4.0 Tools\\文件夹。

To resolve the issue, I created a NETFX 4.0 Tools\\ in the parent source control director and checked it in. This way, the reference is no longer dependant on each user's machine. 为解决此问题,我在父源控件控制器中创建了一个NETFX 4.0 Tools \\并将其签入。这样,引用不再依赖于每个用户的计算机。 My post build is now "$SolutionDir\\..\\..\\NETFX 4.0 Tools\\sgen.exe" /force "$(TargetPath)" 我的帖子版本现在是"$SolutionDir\\..\\..\\NETFX 4.0 Tools\\sgen.exe" /force "$(TargetPath)"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从VS2010升级到VS2013(或VS2012)后,无法打开Visual Studio C#解决方案,错误消息“不支持给定路径的格式” - Can not open Visual Studio C# solution after upgrading from VS2010 to VS2013 (or VS2012), error message “The given path's format is not supported” 从VS 2012升级到VS 2013后Web服务无法正常工作 - WebServices not working after upgrading from VS 2012 to VS 2013 代码合同似乎不适用于VS2012 - Code Contracts doesn't seem to work on VS2012 AppFabric DataCacheFactory()初始化在VS2013中挂起,在VS2010和VS2012中正常工作 - AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and VS2012 错误“在VS2013中无法找到类型或命名空间名称'DotNetOpenAuth',但不是VS2012 - Error “The type or namespace name 'DotNetOpenAuth' could not be found” in VS2013 but not VS2012 为什么VS2012和VS2013之间的InvokeRequired属性值不同? - Why InvokeRequired property value differed between VS2012 and VS2013? 从VS 2012升级到VS 2013后,Web发布活动/本地调试失败 - Web Publish activity/ Local Debugging fails after upgrading from VS 2012 to VS 2013 从vs2013升级到vs2017后无法加载文件或程序集'System.Web.Http,Version = 4.0.0.0' - Could not load file or assembly 'System.Web.Http, Version=4.0.0.0' after upgrading from vs2013 to vs2017 适用于VS2012或2013的Apex zune - Apex zune for VS2012 or 2013 将项目从VS2010迁移到VS2012后无法继承接口 - can't inherit interface after migrating project from VS2010 to VS2012
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM