MSDN > 論壇首頁 > MSBuild > Error creating assembly manifest: access is denied
發問發問
 

已答覆Error creating assembly manifest: access is denied

  • Wednesday, 24 May, 2006 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

解答

  • Thursday, 13 July, 2006 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.

所有回覆

  • Tuesday, 13 June, 2006 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

     

  • Thursday, 13 July, 2006 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.
  • Thursday, 13 July, 2006 20:35Joel Poiron 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

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

    Thank you very much for your hard work.

    Joel

  • Sunday, 23 July, 2006 15:33loffe1978 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    We switched from user to machine based signing and that also solved the problem.

    /johan