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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Visual studio project in AOT not compiling.

(0) ShareShare
ReportReport
Posted on by 1,330

Hello,

I have created C sharp project in Visual Studio 2013 and added in AOT -> Visual Studio Projects -> C Sharp project.

My VS project has a reference to Microsoft.Windowsazure.Storage.dll and Microsoft.Azure.KeyValut.Core.dll 

It's compiling successfully in VS. 

but in AX while compiling  it throws error.

The type or namespace name 'WindowsAzure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

When i reopen project from VS -> Application Explorer. It shows that these assemblies are missing. They were added using Manage NuGet Packages when i first time created project directly in VS. but now after adding them to AOT and reopening it from VS, they're missing. Weired.

Now I can't add it back to VS project as it says 'unable to locate solution directory'.

Anyone have any idea how to resolve this issue? Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    AX doesn't automatically include and deploy these assemblies (that NuGet added). You'll have to install them separately - for instance, look at Auto-Deploying DLLs and Other Resources.

  • mail2vd Profile Picture
    1,330 on at

    Hi Martin,

    Thanks for the direction.

    I am going to call my VSProject DLL methods from AX Batch job class which would run server side. It means those DLL needs to be present on AOS server somewhere for batch job to run fine, correct? It has actually nothing to do with Client\bin folder at least on AOS server as it may not have client installed. and hence Axbuild would not fail if someone does it nightly compile.

    I was just not in favour of copying DLL files during deployment which would add additional step to deployment process. Also , if customer creates new AOS server in future as batch server, these all DLL needs to be copied it again for sure.

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    Yes, if your code uses code in some DLL files, the process running your code must be able to find these DLLs. Batches are run by AOS, therefore it's the AOS that must be able to find them.

    AX client is a different process, often on a completely different machine (and batches server doesn't use any client at all).

    As I said, you can automate the deployment.

  • mail2vd Profile Picture
    1,330 on at

    Hi Martin,

    I got where all places i need to apply the code changes. but not sure when exactly the DLLs will be deployed. Is that at the time of AOS service start ?

    Thanks.

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    What DLLs are you talking about in the moment? What way of deployment are you using?

  • mail2vd Profile Picture
    1,330 on at

    Hi Martin,

    I am exporting model file and sending to customer. My aim is to send only Model file.

    VS project is not getting compiled without those Nuget DLLs during development untill i am putting them in Client\Bin folder on my development server.

    So i am not sure whether exported Model file will deploy any of these Dlls in Server\Bin\VSAssmeblies folder on Customer's AOS?

  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    That's what I already answered in my first reply ("AX doesn't automatically include and deploy these assemblies...").

  • mail2vd Profile Picture
    1,330 on at

    Thanks Martin.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans