[原创]VS2017社区版开发WIN10驱动,取消强行测试签名。关键字:error MSB4018: “SignTask”解决办法
发表于:
2019-1-28 00:26
9602
[原创]VS2017社区版开发WIN10驱动,取消强行测试签名。关键字:error MSB4018: “SignTask”解决办法
看雪怎么回事,分享知识不加雪币还扣雪币,搞不懂。
error MSB4018: “SignTask”解决办法。网上搜不到办法的,足以证明我是原创。
在安装wdk包的时候会俏俏生成一个一天过期不更新的测试证书并安装在个人证书里面。
通过cmd -> certmgr.msc可以看到。
在配置->Driver Signing SignMode SignMode改为Off,全部关掉都是没效果的。猜测是社区版的原因。社区版只用于开源和学生用。
我尝试换一个签名证书还是会签测试名。所以我会认为是社区版的原因。
网上找不到解决办法,只有自己想办法。
首先我通过certmgr.msc把测试证书删掉,编译出错。
error MSB4018: “SignTask”任务意外失败。
双击进入错误。
<SignTask Condition="'@(DriverSign->Count())' > 0" SignMode ="$(SignMode)" BuildingInIDE ="$(BuildingInsideVisualStudio)" ProjectFileName ="$(MSBuildProjectName) " Sources ="@(DriverSign)" DriverType ="$(DriverType)" GenerateCertificate ="$(GenerateTestCertificate)" CertificateStoreName ="$(CertificateStoreName)" SubjectName ="$(SubjectName)" TrackerLogDirectory ="$(DriverTestSignTrackerLogDirectory)" TestCertificate ="$(TestCertificate)" Password ="$(Password)" OSList ="$(Inf2CatWindowsVersionList)" Inf2CatToolPath ="$(Inf2CatToolPath)" UseDebugLibraries ="$(UseDebugLibraries)" UserRootDirectory ="$(UserRootDir)" Platform ="$(Platform)" SignedOutputDirectory ="$(OutDir)" TargetOS ="$(TargetVersion)" CertificateToExport ="$(CertificateOutputPath)" FileDigestAlgorithm ="%(DriverSign.FileDigestAlgorithm)" AdditionalOptions ="%(DriverSign.AdditionalOptions)"
DiagnosticMode ="$(DiagnosticMode)" TLogReadFiles ="@(DriverSignTLogReadFiles)" TLogWriteFiles ="@(DriverSignTLogWriteFiles)" ToolExe ="$(DriverSignToolExe)" ToolPath ="$(DriverSignToolPath)" TrackFileAccess ="$(TrackFileAccess)" MinimalRebuildFromTracking ="$(DriverTestSignMinimalRebuildFromTracking)" ToolArchitecture ="$(DriverSignToolArchitecture)" TrackerFrameworkPath ="$(DriverSignTrackerFrameworkPath)" TrackerSdkPath ="$(DriverSignTrackerSdkPath)"> </SignTask>
文件头注释了一段话让我意识到这个文件的重要性。
<!-- *********************************************************************************************** WindowsDriver.Common.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have created a backup copy. Incorrect changes to this file will make it impossible to load or build your projects from the command-line or the IDE.
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)