web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Getting build error in Visual Studio 2022

(3) ShareShare
ReportReport
Posted on by 14
Hi All,
 
I am getting error while compiling a project, which contains one extension class, report design and temp table. Below is the error:
 
The "CopyReferencesTask" task could not be loaded from the assembly Microsoft.Dynamics.Framework.Tools.BuildTasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'Microsoft.Dynamics.Framework.Tools.BuildTasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
 
I have already checked the rnrproj file and it has got the following line:
 


Also, I have checked the folder C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX and it contains the following files, as suggested by Martin Drab in another community post:

 
Can someone please let me know how to resolve the above issue ? 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    239,022 Most Valuable Professional on at
    Can you give us some context, please? For example, were all the elements created in VS 2022? Did it work for you with other reports?
  • BO-13030239-0 Profile Picture
    14 on at
    Hi Martin,
     
    The project is created in VS 2022 as I recall. Is there any way to verify this somewhere? I opened another project, which has also got one extension class and a report temp table, on compiling this one, I am getting below error:

    The "CopyReferencesTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64" directory.
     
    The above error is similar to the error I mentioned before, but its a different error. Not sure what is going on. 
     
    Thanks,
  • Martin Dráb Profile Picture
    239,022 Most Valuable Professional on at
    To me, it sounds like a corrupt DEV environment, but I have no information about your environment, when your problem start occuring or anything. Consider trying it on a different DEV box and deploying a new one if the problem is just in the single one.
  • BO-13030239-0 Profile Picture
    14 on at
    Hi Martin,
     
    Just to let you know Martin that I am getting below error while trying to deploy service update 10.0.43 on DEV environment:

    Access to the path is denied.
    The specified module 'C:\DynamicsAX\PreServicing-6c51d83d-9b8f-4fcb-929a-41f81e8914e3_I0_R0\Input\CommonConfigurationModule.psm1' was not loaded because no valid module file was found in any module directory.
    The term 'Initialize-Log' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
     
    Not sure if the above error is related to the build error I am getting.
     
    Thanks,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 455 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans