I am working on Code Generation Template using TDS in sitecore 8.2 update 4 and I am using these .tt file https://github.com/HedgehogDevelopment/tds-codegen/tree/master/Sitecore.Master/Code%20Generation%20Templates. I want to generate code using TextTransform.exe in batch file so what is correct way? Please guide me..
I think you should look into reverse engineering the TDS DLL files.
The main file which is doing code generation is HedgehogDevelopment.SitecoreProject.VSIP2015.dll in D:\Program Files (x86)\Hedgehog Development\Team Development for Sitecore (VS2015).
The main entry for code generation should be in Manager class, however I'm not sure about that.
Related
I'm trying to generate documentation in c++ project (VS 2022 Community) using xml-tags in comments like <summary>, <returns> and so on. I was searching project setting, configured output file and rebuild project. But result was zero. I can't find output file. Was it generated at all? Can't understand where he is. I know there are also several programs/plug-ins making doc, but I want to try embeed services. Output file setting is $(OutDir)$(TargetName).xml
SOLVED! =)
So, to generate documentaion you need to enable option Create XML-documentaion file at Project->Settings->C/C++
Default setting of files path are working. Another options are in Project->Settings->XML-documentation generation
Ah... It was difficult to find. No link in official docs to this theme)
I have a Visual Studio web test that is using a custom JSON Extraction Rule. Initially the rule was in the web test's project/assembly. When running the test, it fails during the extraction, saying
Could not load file or assembly `ProjectName, Version=1.0.0.0` or one of its dependencies. The system cannot find the file specified.
In the same test I'm using a custom validation rule defined in a different project and this is working, so I copied the Extraction Rule to the other project. I manually edited the webtest XML to use the other project's namespace and assembly name. I re-run the web test after saving/cleaning/building.
I get the same error.
I confirm in my testsettings file that I've said to deploy the bin folder of the project. And the other project. And some other random stuff just out of desperation, it seems.
Same error.
If I take the non-working web test and click Generate Code it produces a TestNameCoded.cs file in the root of the test project which does exactly what the webtest does. If I run that, it works fine.
Why do Visual Studio Web Tests ever have problems loading their own assembly? How can I get this web test to work without having to generate (and maintain) a coded test?
A simple question, where I have perhaps just overlooked the obvious.
I am trying to use ApplicationSettings in C++ (.NET) using Visual Studio 2010 Express (I also use 2008 pro)
However I can get nowhere with this - if I try to use the form designer to add a setting i get "No settings file exists in project. Add a settings file and try again". How do I add a setting file (app.config)? There is no option in any of the "add" sections. I have tried adding a file manually both from within VS (create a new file and save) and from Explorer.
Before I crack and just write some code to read an XML config file - please can someone explain the correct way to setup and use app.config - just, for example, to save the location and size of the main form.
Is this a managed C++ project?
A settings file is based on .Net's ApplicationSettingsBase and ConfigurationManager classes, so unless you're using .Net you won't be able to use them easily.
EDIT: I've just created a managed C++ project, and you're right, there is no option to add a settings file.
In a C# project this produces a static class derived from ApplicationSettingsBase, which Visual Studio updates automatically from a GUI based configuration screen. I can only assume that there is no support for auto generation of a managed C++ class instead. Sorry.
I am using Eclipse for C++ development on windows. I have also written a code generator that take an xml file and produces several C++ files. The project I am working on is currently setup to use the internal builder. What I would like to do is to run the code generator as part of the build process.
My problem is that I haven't been able to find a way to make Eclipse identify that the files are present (or have been updated) without 'Refeshing' the project. So although I can run the code generator as a pre-build step, the files generated aren't guaranteed to be included in the build.
Does anybody know whether there is a way to make Eclipse do a refresh after the pre-build step or something to that effect, using the internal builder?
Thanks
You can add a Builder to your project.
I'm not sure if this is possible using the internal builder of Eclipse. Refreshing has always been a problem there. But using external build tool, like Maven or Ant, works! I personally would switch to Visual Studio - there you never have such kind of problems
Although I have not tried this with CDT projects enabling the the Preferences->General->Workspace -> Refresh automatically helps me with Web & Java projects where code generation is involved.
I have created an EMF model with extension .system which will generate the code for my work.
Now I can generate code using launch code generation action from Eclipse. But I want to generate the code by launching the code generation from a stand-alone program.
How do I achieve this?
Details: I have created a plugin from EMF model and have inlcluded in the Eclipse.
I will created .system files from out of my plugin and I can generate code from my plugins.
I have observed that when I click launch the code generation it is starting a LauchAction class from my plugin.
How do I start my LaunchAction class from a stand-alone Java program?
My aim is to run my created .system model and generate the code from a stand-alone Java program.
How do I achieve this?
You could call Eclipse from the command line. Something similar to this:
eclipse.exe -noSplash -data ${workspace_location} -model -edit -editor -tests -application org.eclipse.emf.codegen.ecore.Generator ${genmodel}
This command will start Eclipse silently and will generate mode code (-model), edit plug-in (-edit), editor plug-in (-editor), and the test plug-in (-tests). Leave out any of these parameters if they are not needed.
I don't know how to solve your problem, but I think it is doable. I think you have to look at the EMF source code to check how the code generation works.
Here are some starting points:
If you have PDE and the EMF tools, use use Import > Plug-ins and Fragments to get the EMF plugin into your Eclipse workspace.
Otherwise, clone and import the following Git repository:
https://git.eclipse.org/c/emf/org.eclipse.emf.git/
Have a look at the following file, maybe you can find what you need there:
plugins/org.eclipse.emf.codegen.ecore.ui/src/org/eclipse/emf/codegen/ecore/genmodel/handler/GenerateHandler.java
Otherwise, look in the org.eclipse.emf.codegen.ecore plugin.
Good luck! It's an interesting problem! Please report back here if you solve it!
EDIT: Ops, this question is 10 years old, I didn't notice!