Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild error MSB4018 The "SignTask" task failed unexpectedly. In VS2015

when you compile a new project the following error appears:

Severity    Code    Description Project File    Line    Suppression State
Error   MSB4018 The "SignTask" task failed unexpectedly.
System.Security.Cryptography.CryptographicException: Acesso negado.

   at Microsoft.DriverKit.Build.Shared.CreateCertificate.CryptAcquireContext(String keyContainerName, String providerName, PROV providerType)
   at Microsoft.DriverKit.Build.Shared.CreateCertificate.CreateSelfSignedCertificate()
   at Microsoft.DriverKit.Build.Tasks.SignTask.AutoGenerateTestCertificate()
   at Microsoft.DriverKit.Build.Tasks.SignTask.AutoPickTestCertificate()
   at Microsoft.DriverKit.Build.Tasks.SignTask.GenerateCommandLineCommands()
   at Microsoft.Build.Utilities.ToolTask.Execute()
   at Microsoft.DriverKit.Build.Tasks.TrackedVCToolTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() BrunoGysinDriver    C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets   1348    

I tried several times but nothing found

Anyone know a solution?

like image 700
user3281305 Avatar asked Mar 25 '16 16:03

user3281305


1 Answers

It works! I had the same problem, running on administrator mode works!

like image 61
Rui Campião Avatar answered Oct 05 '22 07:10

Rui Campião