I am wokring in AX7, I need to move some artifacts from Application Suite User Model to my new created model.
Scenario:
I created a model named "My Model"
created a project named "MyProject" and set its model to "My Model"
I have a table named "MyTable" in Application Suite User Model.
Problem:
I opened MyTable in Aplication Explorer and right click on it, it doesn't show me option "Add to project", and if I select "Customize" option, it says that
"MyTable cannot be customized in MyProject, Customization is only possible if the models are in the same package"
So how can I move an artifact from Application Suite User Model to My Model ??
I've found its solution, it is very simple.
Brief:
Just move your desired artifact from back-end, cut the file from "application suite usr model" and paste it to "My Model", Here you GO !! Now when you will open Application explorer, you will see that you artifact has been moved to "My Model".
In detail:
Go to below path and cut the artifact you want to move to other model.
C:\Packages\application suite\application suite usr model\AxTables
Now go to below path and paste that artifact here.
C:\Packages\My Model\AxTables
Open Application Explorer and find the artifact you moved, you will see that it is moved to you desired model.
Allow me to link this here first: https://community.dynamics.com/ax/f/33/t/193502
Essentially you can either do the Windows Explorer move, much as Shahrukh has also mentioned, or you can Cut and Paste between two projects with a solution.
In a little more detail:
Your solution should contain at least two projects: one project working in the model you want to move the elements from and one project working in the model you want to move the elements to. Select the elements you want to move, Cut (or ctrl+x), select the project you want to move to and Paste (or ctrl+v). Depending on the number of elements you are moving, this could take a few minutes.
This will move the elements without having you rummaging around in folders outside VS and will also update your models and source control (assuming you've added your solution to source control) as you go.
Related
In other words lets say i have already completed a project using visual studio. Now i want to make a separate project that is identical to the already completed project(except for some future changes).
How can i do this while keeping the new project in the same workspace as the original without:
creating a new project and copy pasting code over
copy-pasting the folder that holds the project and changing the name of the folder
I'm asking because there must be a better way to do this than the two options above.
Right click on the solution and "Open Folder in File Explorer"
Copy the project folder
Rename the new Project folder
Open the new project folder and rename the .csproj file
Right click on the solution and "Add" "Existing Project" to the solution
Open the "Properties" for the new project
Under "Application", change the assembly name and default namespace
Select "Tools", "Create GUID", Option 6, "Copy"
Under Assembly information, change the name and product
Paste in the GUID and clear the "" suffix
Rename the namespace in the source files to reflect the new
namespace from above.
Depending on your needs, you could get by with a subset of these steps (e.g. steps 1 and 2), however, I think a complete copy requires all of the steps mentioned.
The second option is exactly what you should do: duplicate the folder containing your project and then rename it.
To make this work, you might also have to change the GUID used by the project to avoid clashes. Visual Studio is supposed to do this automatically if another project with the same GUID already exists in the solution. If something goes wrong, you can do it manually by editing the project file (it's the field called ProjectGUID). It's just a standard GUID value, so use any freely-available GUID generator like the one bundled with Visual Studio or one you find online.
Why should there be a better option than this? What would that "better" option look like? It's not like there's going to be a menu command for it, this isn't a very commonly used feature. Most programmers use a source control system that handles branching/duplicating for them automatically and [mostly] without pain.
One would think that adding a project to a Workspace in Xcode would be intuitive.
1) But when you add a new project it is added within the existing project - It must be a bug, or is there actually a reason.
2) How do you add a project then (ctr + right click et.)
You could use the plus (+) button on the lower left corner of Xcode IDE to add a new project to a workspace. You must have first a blank workspace, which you could use the menu (New/Workspaces with short cuts ^%N).
To morning I spend some time doing what you asked to. so here are the steps (you can skip if you already have followed some).
Create a new blank work space
Add a project to it by clicking File->Add new files to "Your workSpace" or "command+option+A"
Choose your project folder Or yourproject.xcodeproj file
Just let the indexing finish properly, and congratulations you have added a new project to your xcode work space successfully.
Note: Make sure that project which you are adding is not already opened, Xcode get lil sensitive about that and doesn't show files tree in workspace in that case.
My answer pertains to XCode 5, but should pertain to XCode 4 as well.
In typical Apple fashion, they have given you multiple ways to do the almost the same thing. Very confusing and annoying. There are three ways, and only one way pertains to the original posters question:
(1) Use File --> Add Files to ...
Problem with this, is that it will only add files to workspace if NO project has been selected.
Problem with THAT, is that once you select a project, there is no way I know of to unselect it.
(2) Use the "+" in the lower-left corner.
Problem with that, it is equivalent to using the pull down menu (#1 above)
(3) Right click in the left pane (in an empty area), and you will see "Add files to "
This is the only right way to do it, as it guarantees that the file will be added to the workspace, and not any selected project.
Try all three methods after selecting an existing project, and you will see what I mean.
Based on my previous experience with XCode, Apple will take about 10 more years to fix this sort of thing.
One would think that adding a project to a Workspace in Xcode would be
intuitive.
Of course not, this is Apple, only usable for certain experts...
1) But when you add a new project it is added within the existing project -
It must be a bug, or is there actually a reason
You did miss the drop down selection list "Add to:" in the last of three dialog pages, the place where the location of the .xcodeproj file is specified. There you can select the Workspace you are currently using. So simply use "File" "New..." "Project...", give it a name and select from templates, and NEVER intuitiveley double click on the directory where to place the project file, but be sure to adjust the selection drop down list to your currently open workspace. Of course this choice is never preselected.
When using VS 2010, I like to organize the projects in my solutions by creating them in subfolders in the OS. For example I would place a project called MySolution.Core.Shared in G:\Projects\MySolution\Core\Shared. I will also create a Solution folder in Solution Explorer to hold the project as well. This works well for other templates, but the automated unit test creation process does not. VS always creates the unit test project in the solution's root folder, so I have to then unload the test project, move the project (after closing VS or I get a file open error for some reason) and then reopen the solution and remount the project in the appropriate point in Solution Explorer.
Well, I was never able to find a true answer to this, but I did find an acceptable solution. Here are the steps I took:
Create the test project manually by first right clicking on the
solution folder where you wish to place your new tests and choosing
the Add -> New Project option.
Select the Tests->Test Project Template.
Give it an appropriate name and choose the appropriate Location in
the provided slots.
Go to the object/member you wish to test and select Create Unit
Tests in the right click menu.
Choose the test project you just created in the spot provided at the
bottom of the resultant dialog box.
Voila! You are done and your unit tests are now nice and snugly placed in your file structure of choice.
I'd like to recreate a folder hierarchy like in this example (from TFS Branching Guide Main 2010 v1):
The problem is I cannot understand how to create additional root-level folders, like those Development and Release in the picture above, to put new child branches into. The New Folder command option becomes available only at levels beneath root-level branches.
How to create new root folders in a Team Project source control at the Main branch level?
Make sure that your workspace maps at the Team Project level ("StandardBranchPlan" in the picture). I just tried this, and found that "New Folder" does not appear if I have the wrong workspace selected, but once I select a workspace that maps the folder under which I want to create a new folder, "New Folder" became enabled.
Here is what I did.
Connect to the desired collection in Team Explorer.
Click the down arrow at the end of the "Connect" row.
From the drop-down menu provided select "Projects and My Teams".
Select "New Team Project".
And now you have a new "Directory" under the collection root.
You cannot add a folder to root in TFS to an unmapped as mentioned. However one good way to do this is with the following example.
Scenario:
You want to have a NEW Folder to contain many NEW Projects
Right click on your solution and Add solution to source control
At this point you can create a folder on root with say name of "WebServices"
Then you continue through with the popup in adding in your project/solution
For me this works fine, although I too would prefer the freedom to setup a folder structure ahead of time for myself and other developers without having to commit/check-in code etc.
In Visual C# 2008, I have a solution with two projects.
First project contains Form1 that displays one Label with Text set to a string from Properties.Resources, like this:
label1.Text = Properties.Resources.MY_TEXT;
In the second project, I "Add as link" this Form1 from the first project. I want to show this form, so it displays the same as when called from the first project. It should show a label with text Properties.Resources.MY_TEXT defined in the first project.
Unfornately, the second project doesn't build with the following error message: "The name 'Properties' does not exist in the current context".
Is there any way how to resolve this? I have tried to "Add as link" the "Resources.resx" file from the first project, but it doesn't help.
EDIT: I found that if I add Project1 as a Reference in Project2, everything works. I also had to change Access Modifier in the Project1 resources from Internal to Public. Is this the right approach?
Thank you,
Petr
Yes that is the right approach (referencing one project from another). A pattern you may like to apply is to have one project that has all your reference/lookup/settings in it. Then you don't need to work out dependencies between your UI projects.
Your approach of making the resources public is the correct.
You also asked about combining assemblies. Have a look at the ILMerge tool.
You should add "using MyOtherProjectNamespace" so that you can access its properties