Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access denied error when building from source #17534

Closed
OdeToCode opened this issue Dec 3, 2019 · 1 comment

Comments

@OdeToCode
Copy link

@OdeToCode OdeToCode commented Dec 3, 2019

Following the instructions in the build from source WIki on a Win10 machine. Running restore completes with no errors. Running build generates the following 4 errors.

Build FAILED.

ALINK : error AL1078: Error signing assembly -- Access is denied. [C:\Users\scott\repos\AspNetCore\src\Middleware\Localization\sample\LocalizationSample.csproj]
ALINK : error AL1078: Error signing assembly -- Access is denied. [C:\Users\scott\repos\AspNetCore\src\Middleware\Localization\testassets\LocalizationWebsite\LocalizationWebsite.csproj]
ALINK : error AL1078: Error signing assembly -- Access is denied. [C:\Users\scott\repos\AspNetCore\src\Mvc\test\WebSites\RazorPagesWebSite\RazorPagesWebSite.csproj]
ALINK : error AL1078: Error signing assembly -- Access is denied. [C:\Users\scott\repos\AspNetCore\src\Components\test\testassets\BasicTestApp\BasicTestApp.csproj]
    0 Warning(s)
    4 Error(s)

Digging into the logs, I can see al.exe running with the following command line for the first error:

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\al.exe 
  /culture:es-ES /delaysign- 
  /keyfile:C:\Users\scott\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.19574.1\tools\snk/AspNetCore.snk
  /out:C:\Users\scott\repos\AspNetCore\artifacts\obj\LocalizationSample\Debug\netcoreapp5.0\es-ES\LocalizationSample.resources.dll 
 /template:C:\Users\scott\repos\AspNetCore\artifacts\obj\LocalizationSample\Debug\netcoreapp5.0\LocalizationSample.dll
 /embed:C:\Users\scott\repos\AspNetCore\artifacts\obj\LocalizationSample\Debug\netcoreapp5.0\LocalizationSample.My.Resources.Startup.es-ES.resources

With the sysinternals tools, I can see the ACCESS DENIED error popping up when al.exe tries to create a file: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\eecbfdd95d7ed9110d5942eb026463f1_7990d07d-81f1-4e2e-a733-048b6f7c81bc.

@pranavkm

This comment has been minimized.

Copy link
Member

@pranavkm pranavkm commented Dec 5, 2019

There's a workaround listed here: dotnet/corefx#3784 (comment). Since this issue isn't specific to AspNetCore, we'll use the other issue to track addressing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.