Access denied on BizTalkAssembly Add

Oct 28, 2010 at 12:15 PM

I’m trying to add assembly to BizTalk application using task:

<MSBuild.ExtensionPack.BizTalk.BizTalkAssembly Application="$(Application)" Force="true" Gac="true" MachineName="$(COMPUTERNAME)" TaskAction="Add" Assemblies="@(DeployStaff)" />

Msbuild fails with error:

D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(29,5): error : UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\levt\Local Settings\Temp\BT\PID2604\BizTalkAssembly\31703b743c49ea5a4f1f09d60d07f9c9\Microsoft.Practices.EnterpriseLibrary.Logging.dll' is denied.\r D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(29,5): error :

I’ve checked that I have full control on assembly in 'C:\Documents and Settings\levt\Local Settings\Temp\BT\PID2604\BizTalkAssembly\31703b743c49ea5a4f1f09d60d07f9c9\Microsoft.Practices.EnterpriseLibrary.Logging.dll'

As well I’ve managed to successfully add the assembly to the BizTalk application running on my host using my credentials.

I’m wondering what I’m doing wrong?

 

Coordinator
Oct 28, 2010 at 1:33 PM

That error isn't coming from the task. can you post more of your sample / log.

 

Mike

Oct 28, 2010 at 3:37 PM

 

Hi Mike,

Thank you for response.

My MSBuild script looks as follows:

<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>

   <TPath>$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks</TPath>

   <TPath Condition="Exists('$(MSBuildExtensionsPath)\ExtensionPack\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildExtensionsPath)\ExtensionPack\Common\MSBuild.ExtensionPack.tasks</TPath>

</PropertyGroup>

<Import Project="$(TPath)"/>

<PropertyGroup>

   <Application>References</Application>

</PropertyGroup>

<Target Name="Default">

   <ItemGroup>

     <Apps Include="References"/>

     <DeployStaff Include="..\..\..\Microsoft\EnterpriseLibrary\Microsoft.Practices.EnterpriseLibrary.Logging.dll"/>

   </ItemGroup>

  

   <MSBuild.ExtensionPack.BizTalk.BizTalkApplication TaskAction="Create" Applications="$(Application)" Force="true"/>

 

   <MSBuild.ExtensionPack.BizTalk.BizTalkAssembly Application="$(Application)" Force="true" Gac="true" MachineName="$(COMPUTERNAME)" TaskAction="Add" Assemblies="@(DeployStaff)" />

 

</Target>

</Project>

 

Complete build log is:

D:\BuildPOC\dbm_DataIntegration\BTA\Sample>msbuild Sample.proj

Microsoft (R) Build Engine Version 3.5.30729.1

[Microsoft .NET Framework, Version 2.0.50727.3615]

Copyright (C) Microsoft Corporation 2007. All rights reserved.

 

Build started 10/28/2010 5:33:35 PM.

Project "D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj" on node 0 (default targets).

Application: References - Create

Application: References - Create

GAC Assembly: Microsoft.Practices.EnterpriseLibrary.Logging.dll on: LEVT-DT

Adding resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") to application "References"...

Serialized BizTalk assembly "Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from "D:\BuildPOC\Microsoft\EnterpriseLibrary\Microsoft.Practices.EnterpriseLibrary.Logging.dll".

Validating resources (count=1)...

* Validating resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")...

Performing change requests...

Calling BeginTypeChangeRequest for all selected resource types...

PerformingBeginChangeRequest

Updating resource (-Type="System.BizTalk:BizTalkAssembly" -Luid="Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") in store.

* Performing change request on type "System.BizTalk:BizTalkAssembly" (count=1)...

PerformingEndChangeRequestsWithRollBack

* Performing EndTypeChangeRequest for resource type "System.BizTalk:BizTalkAssembly".

D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(18,5): error : UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\levt\Local Settings\Temp\BT\PID4412\BizTalkAssembly\31703b743c49ea5a4f1f09d60d07f9c9\Microsoft.Practices.EnterpriseLibrary.Logging.dll' is denied.\r

D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(18,5): error :

Done Building Project "D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj"

(default targets) -- FAILED.

 

Build FAILED.

 

"D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj" (default target) (1) ->

(Default target) ->

D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(18,5): error : UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\levt\Local Settings\Temp\BT\PID4412\BizTalkAssembly\31703b743c49ea5a4f1f09d60d07f9c9\Microsoft.Practices.EnterpriseLibrary.Logging.dll' is denied.\r

D:\BuildPOC\dbm_DataIntegration\BTA\Sample\Sample.proj(18,5): error :

 

   0 Warning(s)

   1 Error(s)

 

Time Elapsed 00:00:07.09

 

D:\BuildPOC\dbm_DataIntegration\BTA\Sample>

Coordinator
Oct 28, 2010 at 4:02 PM

In the end i guess the resource type is not supported. I'll try get this in for the next release.