Good morning,
I have a question regarding this error:
"Clean Failed < 1sec // UnauthorizedAccessException: Access to the path 'Azure.Core.dll' is denied."`
Here is a error message:
"Workload updates are available. Run dotnet workload list\` for more information.
███╗ ██╗██╗ ██╗██╗ ██╗███████╗
████╗ ██║██║ ██║██║ ██╔╝██╔════╝
██╔██╗ ██║██║ ██║█████╔╝ █████╗
██║╚██╗██║██║ ██║██╔═██╗ ██╔══╝
██║ ╚████║╚██████╔╝██║ ██╗███████╗
╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
NUKE Execution Engine version 9.0.4 (Windows,.NETCoreApp,Version=v8.0)
╬══════════
║ Clean
╬══
10:25:29 \[ERR\] Target Clean has thrown an exception
System.UnauthorizedAccessException: Access to the path 'Azure.Core.dll' is denied.
at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
at Nuke.Common.IO.AbsolutePathExtensions.DeleteDirectory(AbsolutePath path) in /_/source/Nuke.Utilities/IO/AbsolutePath.Delete.cs:line 34
at Nuke.Common.IO.AbsolutePathExtensions.CreateOrCleanDirectory(AbsolutePath path) in /_/source/Nuke.Utilities/IO/AbsolutePath.Create.cs:line 30
at Build.\<get_Clean\>b__14_1()
at Nuke.Common.Execution.BuildExecutor.\<\>c.\<Execute\>b__4_2(Action x) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 120
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection\`1 previouslyExecutedTargets, Boolean failureMode) in /_/source/Nuke.Build/Execution/BuildExecutor.cs:line 120
╬══════════════════════
║ Errors & Warnings
╬═════════════
\[ERR\] Clean: Target Clean has thrown an exception
════════════════════════════════════════════
Target Status Duration
────────────────────────────────────────────
DownloadBim4Everyone Skipped // OnlyWhen: !\_bim4EveryonePath.DirectoryExists()
Clean Failed \< 1sec // UnauthorizedAccessException: Access to the path 'Azure.Core.dll' is denied.
Restore NotRun
Compile NotRun
────────────────────────────────────────────
Total \< 1sec
════════════════════════════════════════════
Build failed on 17/03/2025 10:25:29. (╯°□°)╯︵ ┻━┻
What I've already done:
- Granted administrator permissions to all files in:
C:\\Users\\dpisarski.nuget
C:\\TEST_APP
- Created a folder with the file
Azure.Core.dll
and specified its location:
C:\\TEST_APP\\RevitCoreConsole\\lib\\net8.0 with the file Azure.Core.dll
Additionally, I added the path in the \_build.csproj file to indicate where this file is located.
"„
<kbd>` <Reference Include="Azure.Core">`
`<HintPath>lib\net8.0\Azure.Core.dll</HintPath>`
`</Reference>”`
fille code „\_build.csproj”
\`
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<IsPackable>false</IsPackable>
<PlatformTarget>x64</PlatformTarget>
<OutputPath>..\bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\dosymep.Navisworks.FileInfo.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\dosymep.Navisworks.FileInfo.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autodesk.Fe.DesignAutomation.Revit"
Version="2022.0.2" />
<PackageReference Include="Autodesk.Revit.Sdk.Refs.2016" Version="1.1.1" />
<PackageReference Include="Autodesk.Revit.Sdk.Refs.2022" Version="1.1.1" />
<PackageReference Include="Azure.Core" Version="1.45.0" />
<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
<PackageReference Include="Azure.Security.KeyVault.Certificates"
Version="4.7.0" />
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.7.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.24.0" />
<PackageReference Include="Chuongmep.Revit.Api.RevitAPI" Version="2022.0.0" />
<PackageReference Include="dosymep.Nuke.RevitVersions" Version="2.0.1" />
<PackageReference Include="mg.revit-shared-utilities" Version="2021.1.2.20800" />
<PackageReference Include="Microsoft.Azure.WebJobs.Core" Version="3.0.41" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.10.0" />
<PackageReference Include="Microsoft.ML" Version="4.0.2" />
<PackageReference Include="Nuke.Components" Version="9.0.4" />
<PackageReference Include="Revit.RevitApiUI.x64" Version="2022.0.0" />
<PackageReference Include="Revit_API_x64" Version="2024.0.2" />
<PackageReference Include="Serilog.Sinks.Autodesk.Revit" Version="2.0.1" />
<PackageReference Include="System.Configuration.ConfigurationManager"
Version="8.0.0" />
<Reference Include="System.Web" />
<Reference Include="Azure.Core">
<HintPath>lib\net8.0\Azure.Core.dll</HintPath>
</Reference>
</ItemGroup>
</Project>`</kbd>
- Ran PowerShell as an administrator.
- Checked with Process Explorer to ensure the file is not in use.
- Even created a system variable for the file Azure.Core.dll.
- Created a manifest file, but then it wouldn't start at all.
<?xml version="1.0" encoding="utf-8"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> </assembly>`
7 Reinstall all Nuke extends.
It occurred to me to try modifying the NUKE library to specifically point to the path in my project for the file Revit.Core.dll
. Maybe create an exception or something?