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

ALINK : error AL1078: Error signing assembly -- Access is denied. #3784

Closed
CIPop opened this issue Oct 12, 2015 · 8 comments
Closed

ALINK : error AL1078: Error signing assembly -- Access is denied. #3784

CIPop opened this issue Oct 12, 2015 · 8 comments

Comments

@CIPop
Copy link
Member

@CIPop CIPop commented Oct 12, 2015

Getting build errors on Win10 + VS2015:

ALINK : error AL1078: Error signing assembly -- Access is denied. [s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj]

From the log:

   175>GenerateSatelliteAssemblies:
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\it".
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ja".
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ko".
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\ru".
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\zh-Hans".
         Creating directory "s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\zh-Hant".
         C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\AL.exe /culture:de /delaysign+ /keyfile:s:\c1\packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/MSFT.snk /out:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\de\Microsoft.CSharp.resources.dll /template:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\Microsoft.CSharp.dll /embed:s:\c1\bin/obj/Windows_NT.AnyCPU.Debug\Microsoft.CSharp\Microsoft.CSharp.Resources.Strings.de.resources

   175>ALINK : error AL1078: Error signing assembly -- Access is denied. [s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj]
   175>Done Building Project "s:\c1\src\Microsoft.CSharp\src\Microsoft.CSharp.csproj" (BuildAndTest target(s)) -- FAILED.

msbuild.log.txt

@brendanrempel

This comment has been minimized.

Copy link

@brendanrempel brendanrempel commented Oct 18, 2015

This error seems really rare, but I'm getting it too in my project. One thing I noticed is that it only happens when I add non English resx files. I take them out and the problem goes away. Running as administrator doesn't matter.

Hope someone finds the root cause.

@CIPop

This comment has been minimized.

Copy link
Member Author

@CIPop CIPop commented Oct 27, 2015

This is not rare on my box: I get this almost 1/2 the times I build using build.cmd outside of a VC2015 x86 command prompt.

@VSadov

This comment has been minimized.

Copy link
Member

@VSadov VSadov commented Jan 26, 2016

This is not related to Microsoft.CSharp, which is a library for supporting language features such as dynamic, while ALINK is a build time tool.

@VSadov

This comment has been minimized.

Copy link
Member

@VSadov VSadov commented Jan 26, 2016

I am closing this since this is clearly not the right repo.
Will try to find where ALINK bugs should go.

@VSadov VSadov closed this Jan 26, 2016
@jbialobr

This comment has been minimized.

Copy link

@jbialobr jbialobr commented Sep 24, 2016

@hrumhurum

This comment has been minimized.

Copy link

@hrumhurum hrumhurum commented Jun 4, 2018

Experienced this very issue on a clean Windows 10 Pro install.

The only extra thing I can think of: I ticked the "Encrypt" checkbox for one of my folders. Ticking that checkbox at the first time causes Windows OS to generate some cryptographic keys for NTFS file encryption. This can be a contributing factor for an issue to manifest itself.

The exact sequence looks like so:

  1. Install Windows 10 Pro x64 Version 1803 (OS Build 17134.81)
  2. Execute dism /online /Enable-Feature /FeatureName:NetFx3
  3. Create and empty Keys folder at C:\Users%USERNAME%\Documents
  4. Create a text file C:\Users\%USERNAME%\Documents\Keys\1.txt with content 123
  5. Go back to C:\Users\%USERNAME%\Documents and encrypt the Keys folder (Properties -->General --> Advanced... -> Encrypt contents to secure data)
  6. Install Visual Studio 2017
  7. Try to build some .NET 2.0 Windows Forms project that uses key signing in .snk file format
    (a possible contributing factor: build an existing project to avoid the generation of an assembly signing key first)

Building for .NET Framework 2.0 seems to be an important condition as I get this error only for .NET Framework 2.0 projects. All F# projects produce the assembly signing error not matter what .NET versions they target. A particular failing one was F# 4.1 (FSharp.Core, 4.4.1.0) targeting .NET Framework 4.5.

The fix for me was to add myself to the list of permissions of C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys folder with Full Control. A side note: I'm a participant of Administrators group and it was there with Full Control but it wasn't enough.

@disant1

This comment has been minimized.

Copy link

@disant1 disant1 commented Jul 13, 2018

Thanks. This way work good(win 10, VS 2013):

The fix for me was to add myself to the list of permissions of C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys folder with Full Control. A side note: I'm a participant of Administrators group and it was there with Full Control but it wasn't enough.

@hrumhurum

This comment has been minimized.

Copy link

@hrumhurum hrumhurum commented Feb 26, 2019

I just have hit this issue once again. This time it happened at a virtual machine environment.

So I have a repro for this issue as VMware image file.

Is anybody interested? Should I prepare the file and steps to reproduce?

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