Giter Club home page Giter Club logo

Comments (9)

Shind44 avatar Shind44 commented on July 28, 2024

it will be really usefull !
thanks for this this wonderfull tools !

from d365fo.tools.

ITRasmus avatar ITRasmus commented on July 28, 2024

Are you missing something for the full compile there is already implemented? Or are you loooking for partial compile ?

from d365fo.tools.

devax avatar devax commented on July 28, 2024

Are you missing something for the full compile there is already implemented?

Are you saying that there is already a function available for full compile? If so, which one is it?

from d365fo.tools.

Splaxi avatar Splaxi commented on July 28, 2024

The only thing we have is the full database sync.

As per the post from the link, we have the XPPC.exe tool available, which is what Visual Studio is depending on. We can go several ways with that.

  1. We simple investigate how to succeed with a compile for a given Visual Studio project, using the XPPC.exe tool. We should be able to learn something from the build server, because it depends on the Visual Studio projects folder. Inside some of the files in a project should be a list of modules that a given project has checked during development.

  2. After some investigation we simply offer users the ability to pipe or list module names, that we prep into the XPPC.exe parameters and execute it. That puts the effort onto the user, that they need to understand what they want to be compiled.

@ITRasmus What is your take on this?

from d365fo.tools.

ITRasmus avatar ITRasmus commented on July 28, 2024

I have just looked into it.
Visual studio relies on the Microsoft.Dynamics.Framework.Tools.BuildTasks.dll, file for compiling.
It basicly just takes the list of modules and then compiles them, but i has allso seperate functions for BestPractice test, Reports and so on.
I think we should go for Option 2, and then later we can use that for implementing a oneliner for full compile.

from d365fo.tools.

Splaxi avatar Splaxi commented on July 28, 2024

So a simple test with a new Visual Studio project (and model), that should fail a compile. Then see if we can make the XPPC.exe compile it and return the same error as Visual Studio. When that is done, we edit the project (model) to actually be able to compile it inside Visual Studio. Then we retry things using the XPPC.exe and see if it works.

Anyone up for the challenges?

from d365fo.tools.

Ievgenm avatar Ievgenm commented on July 28, 2024

Something like:
xppc.exe -metadata="k:\AosService\PackagesLocalDirectory" -modelmodule="Dimensions" -output="K:\AosService\PackagesLocalDirectory\Dimensions\bin" -referencefolder="k:\AosService\PackagesLocalDirectory"

from d365fo.tools.

Ievgenm avatar Ievgenm commented on July 28, 2024

Here you go

using Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator;
using Microsoft.Dynamics.AX.Framework.Xlnt.XppParser.Pass2;
using System;
class Program
{
const string PackagesLocalDirectory = @"k:\AosService\PackagesLocalDirectory";

static void Main(string[] args)
{
    string moduleToCompile = "Retail";
    ServiceMetadataProvider provider = new ServiceMetadataProvider(PackagesLocalDirectory, true, true, true, moduleToCompile);
    var modules  = provider.GetReferencedModules();
   
    foreach (var module in modules )
    {
        CompileModule(module);
    }

    CompileModule(moduleToCompile);

    Console.ReadLine();
}

static void CompileModule(string module)
{
    Parameters parameters = new Parameters();
    parameters.XppMetadataPath = PackagesLocalDirectory;
    parameters.ModelModuleName = module;
    parameters.ReferencedAssembliesFolder = PackagesLocalDirectory;
    parameters.AssemblyOutputPath = System.IO.Path.Combine(PackagesLocalDirectory, module, "bin");
    ILGeneratorMain.Compile(parameters);
}

}

from d365fo.tools.

FH-Inway avatar FH-Inway commented on July 28, 2024

@Splaxi I think this issue can be closed since there is Invoke-D365ModuleFullCompile since March 2019.

from d365fo.tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.