I have vb.net windows application project and I want to make another project base on the first project and modify some forms or reports.
The scenario is, copy entire project as link then delete forms/reports that I want to modify then create the same form/report name that I want to modify, by doing this I only maintain one source code on most of them.
I don't want to do this one by one by adding existing item and Add as link, I have tried to create a solution with many projects and drag folder from base project to new project with 'Alt' key pressed with no success
I have read somewhere to edit project file something like this:
_Inlined\%(RecursiveDir)%(Filename)%(Extension)
but it makes vs 2012 not responding
If you want to create a new project based on the first project, my suggestion is to copy the entire project folder and then rename.
Once you do this, you will have two identical projects with the same linked files, meaning that if you want to edit the new one, it would be exactly like editing the new one.
Related
I am currently creating a multi-project template, I want to distribute using a .VSIX-extension for Visual Studio. When the extension is installed the user can select my template among the others provided by Microsoft in the "Create a new project" window.
My template consists of three project:
ProjectName.Server
ProjectName.Contract
ProjectName.Client
ProjectName is the user-given name while the suffixes "Server", "Contract" and "Client" are fixed. The issue I experience is that when the users create a new project the Client-project is always selected as a startup-project by default. I want the server-project to be selected as a startup-project by visual studio. It looks like following:
The client project is not the correct startup project, but users don't know that the server project it the correct startup project, so I want to take off the selection and integrate it right into the template, so the correct startup template is selected by VS when creating the project.
I already removed the suffix "Server" from this project, so it is shown as the first project in the solution explorer and I hoped VS would then select it as the startup-project. This did not work unfortunately.
Can anyone give me a hint on how to configure the startup-project in the template?
If you have any questions don't hesitate to comment.
These configurations are stored in the Solution User Options (.suo) file.
You can refer to my steps below to try:
First, Close Visual Studio and find the folder where your solution is.
Second, Open the .sln file with a text editor, you see all your projects encapsulated in Project – EndProject lines:
Third, Cut and paste the desired default startup items into the first.
Fourth, Delete your .suo file(hidden files: Solution Folder/.vs/Solution Name Folder/v17/.suo, I use VS2022).
Finally, Open your solution in Visual Studio.
You can have a try.
You will likely need to associate a custom IWizard assembly with your project template, and then explicitly set the startup project by setting the SolutionBuild.StartupProjects to the desired project in your solution.
Once upon a time, I did this using code similar to the following:
VSProject startupProj = FindVSProject(startupProjName);
sln.SolutionBuild.StartupProjects = startupProj.Project.UniqueName;
where FindVSProject was implemented as:
private VSProject FindVSProject(string projName)
{
foreach (Project p in _dte.Solution.Projects)
if (p.Name.Equals(projName, StringComparison.CurrentCultureIgnoreCase))
return p.Object as VSProject;
return null;
}
Why I cannot see the form contains in VB2019?
It's hard to say why that has happened but I have seen it myself or from other people from time to time. That it seems to have happened to so many of your forms suggest that something catastrophic happened to your project and corrupted a bunch of files. One thing that has worked for me in the past is as follows:
Add a new project to your solution.
Drag a corrupted for to the new project in the Solution Explorer.
Do as required to make the new project build and run. The form hopefully now works in the new project.
Delete the original form from the original project.
Drag the form from the new project back to the original project. The form hopefully now works in the original project.
Delete the new project when all forms have been repaired.
The corrupted form resources seem to be regenerated when creating a copy in the new project as this has worked for me and others, although I'm not sure that it will always be so.
we are new to Visual Basic Programing, We are working on a project, which has modules. My team worked on these modules and prepared 3 separate Visual Studio Projects. Now, I want to combine then into one Visual Studio Project for Integration purposes.
We are using Visual Studio 2010.
In the solution explorer window (Default is top right) you will need to:
Right click on your Solution
go down to Add
select Existing Project
This will pop up a windows browser window, you will need to navigate to the place that you have the files saved, then click Open
Repeat steps 1-4 for all subsequent items.
Based on what you are saying, it sounds like youll need to add references to the modules in the main project:
Ensure that you are viewing all files in your solution by selecting Show All Files in the Solution Explorer
go down to References
click Add Reference - a window will pop up
in the top left, select Projects
in the popup window Right click on the Name of the project and select Add Reference
You should be good from here.
Your question is not clear wether or not you want to add the code from the individual projects to one project or add your projects to one solution.
In the first instance use the project that you want to be the main project and right-click on the project and select add existing item to select the .vb module file that you want to add.
In the second instance create a blank solution File -> New Project -> Other Project Types -> Visual Studio Solutions -> Blank Solution, then right-click on the new solution and select Add -> Existing project to add your projects
I am new to Xcode and have been trying to make various projects to get acquainted with it. So I have this one project called calc and it is a calculator. Now I'm trying to make another calculator app that is different but when I'm making the code in viewcontroller.h I will type similar lines of code and when I do it indicates with a little grey dot with a circle around it that I'm connected to my older project. When i click it it gives me links to other objects that are in different projects.
The dot:
That dot indicates that your IBOutlet is connected up to a xib file.
When you created your new project. Did you drag some old files into your new project? Then when you did that did you leave the
Copy items into destination group's folder (if needed)
check box unchecked? Because then you would have files that are from other projects. If you wanted a copy of the files you should check the previously mentioned check box when copying files across.
I wish to have two EXE files in my project. Say one EXE has startup form ABC.vb
and other is BCA.vb
I am not able to change the name in Build so whatever is my startup file, my exe file's name remains the same. How to change it?
A project builds to one assembly, no matter what.
What you need to do is add another project to your solution. You can do this by right clicking in the tree, and going to New... Project. Then, drag your code that you want to build separately into this new project.
After this, when you build, you will get two EXEs, or whatever the project is set to.