我有一个包含很多 nuget 包的 .net 4.5 项目,我将其升级到 4.7.2。为了解决包的一些特定更新问题(如) requireReinstallation="true"
,packages.config
我升级了相关包。现在我已经升级了软件包和一些新的软件包,比如
`<package id="System.AppContext" version="4.1.0" targetFramework="net472" />`
........(some other)
<package id="System.Xml.ReaderWriter" version="4.0.11" targetFramework="net472" />
目前,我可以构建它,但是当我尝试使用Generate serialization assembly
选项来构建它时,我在 teamcity (和本地)中遇到了一个错误,例如
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sgen.exe /assembly:C:\buildAgent\work\6b1c1da90609c252\Site\obj\TeamCity\Site.dll /proxytypes
/reference:C:\buildAgent\work\6b1c1da90609c252\packages\AjaxMin.4.48.4489.28432\lib\net20\AjaxMin.dll
[SGen] C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(3463, 5): warning MSB6002: The command-line for the "SGen" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "SGen" into multiple calls with fewer parameters per call.
[SGen] C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(3463, 5): error MSB6003: The specified task executable "sgen.exe" could not be run. The filename or extension is too long
当然我可以禁用Generate serialization assembly
,但我不想要。我认为命令行中参数过多的问题。在我升级项目后,依赖的总数达到了限制。
我该如何解决这个问题?breaking down the call to "SGen" into multiple calls with fewer parameters per call
(如何?)或其他