使用 TFS Build 执行 dotfuscator 4.5 任务期间出现错误(使用 TFS 2008 进行 Team Build)

发布于 2024-09-06 19:42:31 字数 2853 浏览 3 评论 0原文

我通过 TFS Build 又名 Team Build 调用 dotfuscator 任务,取自 -=Team Build 的 Dotfuscator 任务 =- 并收到以下错误:

Build FAILED.


(AfterCompile target) -> 

error MSB4061: The "Dotfuscate" task could not be instantiated from the assembly "C:\Program Files\MSBuild\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Tasks.dll". 

error MSB4061: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

error MSB4061:    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

error MSB4061:    at System.Windows.Forms.Form.ShowDialog()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.b()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.a()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate..ctor()
error MSB4060: The "Dotfuscate" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.

    0 Warning(s)
    2 Error(s)

dotfuscator 中与 dotfuscator 相关的代码如下:

  <!---
  All Dotfuscation Stuff here...
  -->

  <PropertyGroup>
    <ConfigPath>$(SolutionRoot)\..\$(BuildDefinitionPath)\BuildType\dotfuscator.xml</ConfigPath>
    <!--<InputPath>$(OutDir)</InputPath>-->
    <InputPath>\\Dev-6\TempBuild\Output\</InputPath>
  </PropertyGroup>

  <ItemGroup>
    <InputAssembly Include="$(InputPath)\*.dll;$(InputPath)\*.exe" Exclude="$(InputPath)\*.vshost.exe"/>
  </ItemGroup>

  <Target Name="AfterCompile">

    <!--Perform obfuscation steps after assemblies are compiled.-->

    <Dotfuscate InputAssemblies="@(InputAssembly)" Properties="$(DotfuscatorProperties)" ConfigPath="$(ConfigPath)">
      <Output TaskParameter="MappingFile" ItemName="DotfuscatorMappingFile"/>
      <Output TaskParameter="ReportFiles" ItemName="DotfuscatorReportFiles"/>
      <Output TaskParameter="OutputAssemblies" ItemName="DotfuscatedAssemblies"/>
      <Output TaskParameter="SatelliteAssemblies" ItemName="DotfuscatedSatelliteAssemblies"/>
      <Output TaskParameter="DebugSymbols" ItemName="DotfuscatedDebugSymbols"/>
    </Dotfuscate>
  </Target>
  <!-- End of dotfuscation Stuf....-->

我正在使用以下 dotfuscator 任务:

<Import Project="$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Targets" />

构建机器已安装 dotfuscator professional。它功能齐全,手动使用时工作正常。

请帮助解决这个问题。

问候

I am invoking dotfuscator task via TFS Build a.k.a Team Build , taken from -=Dotfuscator Task with Team Build =-and receiving the following error:

Build FAILED.


(AfterCompile target) -> 

error MSB4061: The "Dotfuscate" task could not be instantiated from the assembly "C:\Program Files\MSBuild\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Tasks.dll". 

error MSB4061: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

error MSB4061:    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

error MSB4061:    at System.Windows.Forms.Form.ShowDialog()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.b()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.a()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate..ctor()
error MSB4060: The "Dotfuscate" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.

    0 Warning(s)
    2 Error(s)

THe code relevant to dotfuscator in dotfuscator is as follows:

  <!---
  All Dotfuscation Stuff here...
  -->

  <PropertyGroup>
    <ConfigPath>$(SolutionRoot)\..\$(BuildDefinitionPath)\BuildType\dotfuscator.xml</ConfigPath>
    <!--<InputPath>$(OutDir)</InputPath>-->
    <InputPath>\\Dev-6\TempBuild\Output\</InputPath>
  </PropertyGroup>

  <ItemGroup>
    <InputAssembly Include="$(InputPath)\*.dll;$(InputPath)\*.exe" Exclude="$(InputPath)\*.vshost.exe"/>
  </ItemGroup>

  <Target Name="AfterCompile">

    <!--Perform obfuscation steps after assemblies are compiled.-->

    <Dotfuscate InputAssemblies="@(InputAssembly)" Properties="$(DotfuscatorProperties)" ConfigPath="$(ConfigPath)">
      <Output TaskParameter="MappingFile" ItemName="DotfuscatorMappingFile"/>
      <Output TaskParameter="ReportFiles" ItemName="DotfuscatorReportFiles"/>
      <Output TaskParameter="OutputAssemblies" ItemName="DotfuscatedAssemblies"/>
      <Output TaskParameter="SatelliteAssemblies" ItemName="DotfuscatedSatelliteAssemblies"/>
      <Output TaskParameter="DebugSymbols" ItemName="DotfuscatedDebugSymbols"/>
    </Dotfuscate>
  </Target>
  <!-- End of dotfuscation Stuf....-->

I am using the following dotfuscator task:

<Import Project="$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Targets" />

The build machine has dotfuscator professional installed. Its fully functional and works fine when used manually.

Kindly help in this problem.

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰◇生如夏花灿烂 2024-09-13 19:42:31

这通常是由在不同帐户下运行的构建服务引起的。 Dotfuscator 要求在初始执行期间为其运行的每个用户帐户接受 EULA。

您可以使用您的构建所使用的帐户登录构建服务器,运行 Dotfuscator 并接受 EULA。完成此操作后,该帐户下的未来执行将正常运行。

如果您无法使用构建服务凭据登录构建服务器,PreEmptive 技术支持可以为您提供替代方法来解决此问题。您可以通过 [email protected] 联系支持人员,或直接提交支持票证http://preemptive.com/support

This is usually caused by the build service being run under a different account. Dotfuscator requires acceptance of the EULA during it's initial execution for each user account it runs under.

You can log into the build server using the account that your build is using, run Dotfuscator and accept the EULA. Once you have done that future executions under that account will function just fine.

If you are unable to log in to the build server with the build service credentials PreEmptive technical support can provide you with an alternate method to work around this. You can contact support at [email protected] or file a support ticket directly at http://preemptive.com/support .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文