Microsoft 开发人员网络 > 论坛主页 > MSBuild > Error creating assembly manifest: access is denied
提出问题提出问题
 

已答复Error creating assembly manifest: access is denied

  • 2006年5月24日 20:52Joel Poiron 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

    Hello,

    I'm having problems running a Team Build when I give my assemblies a strong name.  The team build works great unless I sign my assemblies.  When I do that I get a "vbc : error BC30140: Error creating assembly manifest: Access is denied."

    Here is the error text from the build log:

    Target Common:
    __________________________________________________
    Project "D:\Build\Flin Flon\Release\Sources\FlinFlon.sln" is building "D:\Build\Flin Flon\Release\Sources\Common\Common.vbproj" (default targets):

    Target PrepareForBuild:
    Creating directory "D:\Build\Flin Flon\Release\Binaries\Release\".
    Creating directory "obj\Release\".
    Target CoreResGen:
    Processing resource file "My Project\Resources.resx" into "obj\Release\IRC.FlinFlon.Common.Resources.resources".
    Target CoreCompile:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,
    System.Data,System.Diagnostics /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
    /rootnamespace:IRC.FlinFlon.Common /doc:obj\Release\Common.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\""
    /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll,
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /keyfile:FlinFlonCommon.snk /optimize+ /out:obj\Release\Common.dll
    /resource:obj\Release\IRC.FlinFlon.Common.Resources.resources /target:library Common.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb"
    "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb"

    vbc : error BC30140: Error creating assembly manifest: Access is denied.

    Done building target "CoreCompile" in project "Common.vbproj" -- FAILED.

    Done building project "Common.vbproj" -- FAILED.

     

    Any help would be greatly appreciated,

    Joel

答案

  • 2006年7月13日 20:07msdnmonk 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    Try running "sn -k keyPair.snk"  if you get an error then you are having trouble calling the sn.exe utility.  It has something to do with the keys and delayed signing.

    For some reason windows ocassionally changes the permissions in the folder C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys.

    Write access is required for the sn.exe to work and for builds depending on it to work.

    I hope this helps.  Took me like 3 days to figure out.

全部回复

  • 2006年6月13日 10:34loffe1978 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

    We have been getting the same error on our BuildServer(with CruiseControl) the last week and I've not found much about it on the internet.

    Our CruiseControl-task uses MSBUILD to compile the solution and it always fails on a particular project with the exception mentioned above.

    I just tried moving all solution files to my development computer and it compiles just fine so there must be something wrong with our BuildServer.

    /Johan

     

  • 2006年7月13日 20:07msdnmonk 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    Try running "sn -k keyPair.snk"  if you get an error then you are having trouble calling the sn.exe utility.  It has something to do with the keys and delayed signing.

    For some reason windows ocassionally changes the permissions in the folder C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys.

    Write access is required for the sn.exe to work and for builds depending on it to work.

    I hope this helps.  Took me like 3 days to figure out.
  • 2006年7月13日 20:35Joel Poiron 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

    It worked!
    Now I can finally start using an automated build.

    Thank you very much for your hard work.

    Joel

  • 2006年7月23日 15:33loffe1978 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    We switched from user to machine based signing and that also solved the problem.

    /johan