在sn.exe上构建失败

时间:2012-11-11 06:05:36

标签: c# visual-studio-2010 mathdotnet

我正在尝试构建一个用C#(Math.NET Iridium)编写的(看似没有维护的)自由软件项目。

此错误导致构建失败:

Error 1 The command ""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\sn.exe" -Vr *,"c061a3ec32cc0c6f" "C:\Users\dharmatech\Documents\mathnet-iridium - a\src\app\MathNet.Iridium\Library\..\..\..\..\config\personal_test_public.snk"" exited with code 1. C:\Users\dharmatech\Documents\mathnet-iridium - a\src\app\MathNet.Iridium\Library\Iridium.csproj 252 5 Iridium

有关如何解决该错误的任何建议?

1 个答案:

答案 0 :(得分:3)

问题在于维持铱星的人已经修改了iridium.csproj来测试dll。

在记事本中打开位于“.. \ mathnet-iridium-master \ mathnet-iridium-master \ src \ app \ MathNet.Iridium \ Library \ Iridium.csproj”的csproj并删除之间的部分(第235行) :

! - MATHNET-BEGIN-TESTSIGNING -

! - MATHNET-END-TESTSIGNING -

保存csproj并重新构建。

有关信息,csproj如下:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{26FC15DE-EFDA-403A-8284-1E2A4AE8A9D8}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>MathNet.Numerics</RootNamespace>
    <AssemblyName>MathNet.Iridium</AssemblyName>
    <ApplicationIcon>
    </ApplicationIcon>
    <SignAssembly>false</SignAssembly>
    <AssemblyOriginatorKeyFile>Properties\mathnet_public.snk</AssemblyOriginatorKeyFile>
    <DelaySign>false</DelaySign>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>2.0</OldToolsVersion>
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>..\..\..\..\build\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <UseVSHostingProcess>true</UseVSHostingProcess>
    <OutputType>Library</OutputType>
    <AssemblyName>MathNet.Iridium</AssemblyName>
    <RootNamespace>MathNet.Numerics</RootNamespace>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>..\..\..\..\build\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DocumentationFile>..\..\..\..\build\Release\MathNet.Iridium.xml</DocumentationFile>
    <OutputType>Library</OutputType>
    <AssemblyName>MathNet.Iridium</AssemblyName>
    <DebugSymbols>false</DebugSymbols>
    <RootNamespace>MathNet.Numerics</RootNamespace>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Combinatorics.cs" />
    <Compile Include="Complex.cs" />
    <Compile Include="ComplexPolynomial.cs" />
    <Compile Include="ComplexRational.cs" />
    <Compile Include="Constants.cs" />
    <Compile Include="Distributions\Continuous\BetaDistribution.cs" />
    <Compile Include="Distributions\Continuous\CauchyLorentzDistribution.cs" />
    <Compile Include="Distributions\Continuous\ChiSquareDistribution.cs" />
    <Compile Include="Distributions\Continuous\ContinuousUniformDistribution.cs" />
    <Compile Include="Distributions\Continuous\ChiDistribution.cs" />
    <Compile Include="Distributions\Continuous\RayleighDistribution.cs" />
    <Compile Include="Distributions\Continuous\StudentsTDistribution.cs" />
    <Compile Include="Distributions\Continuous\ErlangDistribution.cs" />
    <Compile Include="Distributions\Continuous\ExponentialDistribution.cs" />
    <Compile Include="Distributions\Continuous\FisherSnedecorDistribution.cs" />
    <Compile Include="Distributions\Continuous\GammaDistribution.cs" />
    <Compile Include="Distributions\Continuous\LaplaceDistribution.cs" />
    <Compile Include="Distributions\Continuous\LognormalDistribution.cs" />
    <Compile Include="Distributions\Continuous\NormalDistribution.cs" />
    <Compile Include="Distributions\Continuous\ParetoDistribution.cs" />
    <Compile Include="Distributions\Continuous\StableDistribution.cs" />
    <Compile Include="Distributions\Continuous\StandardDistribution.cs" />
    <Compile Include="Distributions\Continuous\TriangularDistribution.cs" />
    <Compile Include="Distributions\DiscreteDistribution.cs" />
    <Compile Include="Distributions\Discrete\ArbitraryDistribution.cs" />
    <Compile Include="Distributions\Discrete\BernoulliDistribution.cs" />
    <Compile Include="Distributions\Discrete\BinomialDistribution.cs" />
    <Compile Include="Distributions\Discrete\HypergeometricDistribution.cs" />
    <Compile Include="Distributions\Discrete\DiscreteUniformDistribution.cs" />
    <Compile Include="Distributions\Discrete\GeometricDistribution.cs" />
    <Compile Include="Distributions\Discrete\PoissonDistribution.cs" />
    <Compile Include="Distributions\Discrete\ZipfDistribution.cs" />
    <Compile Include="Distributions\IDiscreteGenerator.cs" />
    <Compile Include="Distributions\IContinuousGenerator.cs" />
    <Compile Include="Distributions\IContinuousProbabilityDistribution.cs" />
    <Compile Include="Distributions\ContinuousDistribution.cs" />
    <Compile Include="Distributions\IDiscreteProbabilityDistribution.cs" />
    <Compile Include="Equations\ScalarIterator.cs" />
    <Compile Include="Equations\Solver.cs" />
    <Compile Include="IAlmostEquatable.cs" />
    <Compile Include="Integration\Algorithms\DoubleExponentialTransformation.cs" />
    <Compile Include="Integration\Algorithms\SimpsonRule.cs" />
    <Compile Include="Integration\Algorithms\TrapeziumRule.cs" />
    <Compile Include="Integration\Integrate.cs" />
    <Compile Include="Interpolation\Algorithms\AkimaSplineInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\BarycentricInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\ChebyshevFirstKindPolynomialInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\ChebyshevSecondKindPolynomialInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\CubicHermiteSplineInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\CubicSplineInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\EquidistantPolynomialInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\LimitedOrderPolynomialInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\LimitedOrderRationalInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\LinearSplineInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\PolynomialInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\RationalPoleFreeInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\RationalInterpolation.cs" />
    <Compile Include="Interpolation\Algorithms\SplineInterpolation.cs" />
    <Compile Include="Interpolation\Interpolation.cs" />
    <Compile Include="Interpolation\InterpolationMethod.cs" />
    <Compile Include="Interpolation\SplineBoundaryCondition.cs" />
    <Compile Include="LinearAlgebra\Algorithms\Orthogonal.cs" />
    <Compile Include="LinearAlgebra\ComplexMatrix.cs" />
    <Compile Include="LinearAlgebra\ComplexVector.cs" />
    <Compile Include="LinearAlgebra\IMatrix.cs" />
    <Compile Include="LinearAlgebra\IVector.cs" />
    <Compile Include="LinearAlgebra\Vector.cs" />
    <Compile Include="NumberTheory\IntegerTheory.cs" />
    <Compile Include="Properties\LocalStrings.cs" />
    <Compile Include="RandomSources\CryptographicRandomSource.cs" />
    <Compile Include="RandomSources\ObjectModel\RandomByteSourceAdapter.cs" />
    <Compile Include="Searching.cs" />
    <Compile Include="Sorting.cs" />
    <Compile Include="OnDemandComputation.cs" />
    <Compile Include="RandomSources\AdditiveLaggedFibonacciRandomSource.cs" />
    <Compile Include="RandomSources\MersenneTwisterRandomSource.cs" />
    <Compile Include="RandomSources\RandomSource.cs" />
    <Compile Include="Interpolation\Interpolation1D.cs" />
    <Compile Include="Interpolation\InterpolationAlgorithm.cs" />
    <Compile Include="Interpolation\PolynomialInterpolationAlgorithm.cs" />
    <Compile Include="Interpolation\RationalInterpolationAlgorithm.cs" />
    <Compile Include="IRealFunction.cs" />
    <Compile Include="LinearAlgebra\CholeskyDecomposition.cs" />
    <Compile Include="LinearAlgebra\EigenvalueDecomposition.cs" />
    <Compile Include="LinearAlgebra\LUDecomposition.cs" />
    <Compile Include="LinearAlgebra\Matrix.cs" />
    <Compile Include="LinearAlgebra\NamespaceDoc.cs" />
    <Compile Include="LinearAlgebra\QRDecomposition.cs" />
    <Compile Include="LinearAlgebra\SingularValueDecomposition.cs" />
    <Compile Include="Natural.cs" />
    <Compile Include="Number.cs" />
    <Compile Include="Polynomial.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Quaternion.cs" />
    <Compile Include="RandomSources\SystemRandomSource.cs" />
    <Compile Include="RandomSources\XorShiftRandomSource.cs" />
    <Compile Include="Rational.cs" />
    <Compile Include="Ratios.cs" />
    <Compile Include="SampleList.cs" />
    <Compile Include="Set.cs" />
    <Compile Include="SiConstants.cs" />
    <Compile Include="SiPrefixes.cs" />
    <Compile Include="SpecialFunctions.cs" />
    <Compile Include="SpecialFunctions\Algorithms\BetaRegularizedAlgorithm.cs" />
    <Compile Include="SpecialFunctions\Algorithms\DigammaAlgorithm.cs" />
    <Compile Include="SpecialFunctions\Algorithms\ErrorFunctionAlgorithm.cs" />
    <Compile Include="SpecialFunctions\Algorithms\FactorialAlgorithm.cs" />
    <Compile Include="SpecialFunctions\Algorithms\GammaAlgorithm.cs" />
    <Compile Include="SpecialFunctions\Algorithms\GammaRegularizedAlgorithm.cs" />
    <Compile Include="Statistics\Accumulator.cs" />
    <Compile Include="Statistics\DescriptiveStatistics.cs" />
    <Compile Include="Statistics\Histogram.cs" />
    <Compile Include="Transformations\ComplexFourierTransformation.cs" />
    <Compile Include="Transformations\InternalFFT.cs" />
    <Compile Include="Transformations\RealFourierTransformation.cs" />
    <Compile Include="Transformations\TransformationConvention.cs" />
    <Compile Include="Trigonometry.cs" />
    <Compile Include="Tuple.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Properties\mathnet_public.snk" />
  </ItemGroup>
  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- MATHNET-BEGIN-TESTSIGNING -->
  <Target Name="AfterBuild">
    <CallTarget Targets="TestSign" />
  </Target>
  <PropertyGroup>
    <NL>%0D%0A</NL>
    <QUOT>%22</QUOT>
  </PropertyGroup>
  <PropertyGroup>
    <RootPath>$(MSBuildProjectDirectory)\..\..\..\..\</RootPath>
    <ConfigPath>$(RootPath)config\</ConfigPath>
    <StrongNameTestKeyPrivateFullName>$(ConfigPath)personal_test_private.snk</StrongNameTestKeyPrivateFullName>
    <StrongNameTestKeyPublicFullName>$(ConfigPath)personal_test_public.snk</StrongNameTestKeyPublicFullName>
    <ProjectGuid>{26FC15DE-EFDA-403A-8284-1E2A4AE8A9D8}</ProjectGuid>
    <RootNamespace>MathNet.Numerics</RootNamespace>
  </PropertyGroup>
  <Target Name="TestSign">
    <GetFrameworkSdkPath>
      <Output TaskParameter="Path" PropertyName="FrameworkSdkPath" />
    </GetFrameworkSdkPath>
    <Error Condition="'$(FrameworkSdkPath)'==''" Text="Framework SDK not available." />
    <CreateItem Include="$(FrameworkSdkPath)bin\sn.exe" Condition="'@(StrongNameExe)'==''">
      <Output TaskParameter="Include" ItemName="StrongNameExe" />
    </CreateItem>
    <Error Condition="!Exists('@(StrongNameExe)')" Text="Strongname Tool not available." />
    <Exec Command="$(QUOT)@(StrongNameExe)$(QUOT) -k $(QUOT)$(StrongNameTestKeyPrivateFullName)$(QUOT)" Condition="!Exists($(StrongNameTestKeyPrivateFullName))" />
    <Exec Command="$(QUOT)@(StrongNameExe)$(QUOT) -p $(QUOT)$(StrongNameTestKeyPrivateFullName)$(QUOT) $(QUOT)$(StrongNameTestKeyPublicFullName)$(QUOT)" Condition="!Exists($(StrongNameTestKeyPublicFullName))" />
    <CreateItem Include="$(StrongNameTestKeyPrivateFullName)" Condition="'@(StrongNameTestKeyPrivate)'==''">
      <Output TaskParameter="Include" ItemName="StrongNameTestKeyPrivate" />
    </CreateItem>
    <Error Condition="!Exists('@(StrongNameTestKeyPrivate)')" Text="Test-signing private key not found (expected at @(StrongNameTestKeyPrivate)). Execute 'CreateNewPersonalTestKey.bat' once to generate one." />
    <Exec Command="$(QUOT)@(StrongNameExe)$(QUOT) -Vr *,$(QUOT)c061a3ec32cc0c6f$(QUOT) $(QUOT)$(StrongNameTestKeyPublicFullName)$(QUOT)" />
    <Message Text="$(NL)Test-Signing the target assembly $(TargetPath):$(NL)" />
    <Exec Command="$(QUOT)@(StrongNameExe)$(QUOT) -TS $(QUOT)$(TargetPath)$(QUOT) $(QUOT)@(StrongNameTestKeyPrivate)$(QUOT)" />
  </Target>
  <!-- MATHNET-END-TESTSIGNING -->
</Project>