代码之家  ›  专栏  ›  技术社区  ›  Steve Johnson

使用tfs build执行dotfuscator 4.5任务期间出错(使用tfs 2008进行团队生成)

  •  1
  • Steve Johnson  · 技术社区  · 16 年前

    我正在通过tfs build a.k.a team build调用dotfuscator任务,它取自 -=Dotfuscator Task with Team Build =- 接收到以下错误:

    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。它功能齐全,手动使用时工作正常。

    请帮忙解决这个问题。

    当做

    1 回复  |  直到 16 年前
        1
  •  2
  •   rIPPER    16 年前

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

    You can log into the build server using the account that your build is using, run Dotfuscator and accept the EULA. 一旦你完成了以后在那个帐户下的执行,就可以正常工作了。

    如果您无法使用生成服务凭据登录到生成服务器,抢占式技术支持可以为您提供一种替代方法来解决此问题。您可以通过support@preemptive.com与支持部门联系,或直接在 http://preemptive.com/support .

    推荐文章