VS2010 Projects with Common Files - vb.net

I have a vb.net project that has 2 exe's that get built as well as the installer. The two exe's share a bunch of common files. I do not want to have two copies of the common files or mess around with having build events that copy things around (if possible).
My method was to create two projects in the same folder and have them point to the files they needed. This appeared to work until I tried to compile both apps at which point I get an error in a file called Application.Designer.vb. It seems that project files create this file in their folder and when I have two solutions in the same folder they conflict.
So my next effort was to create the second project in it's own folder and just add the items as needed. The problem here is that VS2010 doesn't hold a link to a file in a different folder it copies the file to the new project folder.
What is the vs2010 way to get this done?

You were almost there when you created your second project. Rather than adding the files to the second project, you need to link them.
When you add them, VS copies the source file to the current project's directory.
When you link a file, it leaves it in its current location and just adds a reference to the file to your project. This means that you are operating with a single source file instead of multiple copies.
To link a file, choose Add Existing Item... menu item from the Project menu, select the file(s) that you want to link, and then click the dropdown arrow next to the Add button on the file dialog and select Add As Link.
We have class files that are shared this way among a half-dozen projects, including Win Forms, Silverlight, ASP.Net, Services, and PocketPC.

The easiest solution would be to shove all the common stuff into a common project, and simply reference that project from your other two solutions.
Solution A:
Project A
Project C
Solution B:
Project B
Project C
Just my recommendation anyway.

Related

PhpStorm Search Everywhere is not working, do you know the solution?

I don't know this is off topic or not, I'm using general channels. Is there a solution for Search Anywhere in PhpStorm. I work with Laravel but when I use the feature I can't find the file even though it exists.
Looking at your screenshot: based on the fact that ALL files in the project tree have that sort of "dirty yellow" background color... it looks like ALL of your files are considered excluded / outside of the project for some reason.
Most likely a user error of some kind. E.g. you may have opened it from a different path (i.e. when symlink is involved), may have c=misconfigured it later somehow (marked folder as Excluded by mistake or whatnot) or maybe even some sort of config file corruption (pretty unlikely).
Anyway, please do this:
Close your project
Go to the project root folder and delete your .idea subfolder (that's where your project settings are stored).
If you have that project still visible in the IDE (Recent Projects on the Welcome screen) -- you may remove it there as well (to avoid any possible confusion).
Now create a new project in PhpStorm from scratch using existing files: just use "Open" and point to the folder with your project.
Please check filter option. If you are doing file search then click on Files tab.

File-based, not Folder-based, Projects in Atom?

I'm trying to switch to Atom as my programming editor so that I can gain handy features like linting for Perl, JavaScript, etc. However, over the last two decades, I've used a string of editors (UltraEdit, jEdit, BBEdit) that allowed me to add individual files from different folders into projects. My main coding project actually spans several remote SFTP servers and the "folders" in my BBEdit project do not necessarily correspond to any file structure on disk.
I cannot seem to figure out how to set up a project in this manner in Atom (or similar editors such as Brackets). Is there a way to configure Atom and its extensions to produce a result similar to an UltraEdit/jEdit/BBEdit/Komodo project? I thought about creating a new project directory and symlinking to the real files, but that seems like a hack at best.
I belive its File > Open Project or something like that. I personally like Sublime Text 3 but Atom and Sublime are the same.
The best solution I have found so far would be to install opened-files package. By default it persists all files you have opened (even after you close them) until you close atom editor. I don't think it would work well for bigger projects as it lists all the files under one tab in tree view.
If you want to persist open files you might want to use project-manager package. To keep files listed under 'Opened files' tab after you close them (and atom), you need to press bookmark icon next to tab name. Once you add the project it auto-saves file structure when you close atom. To add project to project-manager write project-manager save in command palette. To list all projects from project manager press shift-alt-P.

Hide files from /build directory in navigate class/file action

One of the most productive actions in Android Studio is Navigate action. The problem is it shows so much useless files. Sometimes it's hard to find the class/file you're looking for.
Take below image as an example. If you're looking for AndroidManifest.xml in module b you have to scroll down the list to find the file you want.
Is there a way to filter what this dialog shows, in particular exclude some directories from results? All of the files from the /build directory are completely useless.
I know that I can filter what types of files are shown but it doesn't help much.
Mark your build folder as excluded:
File > Project Settings > Modules > Sources > Mark as Excluded (red icon)
Alternatively, right click on your build folder and select Mark Directory as > Excluded.
Excluded folders (shown as rootExcluded) are ones that IntelliJ IDEA "partially ignores". Very limited coding assistance is provided for files in excluded folders. Classes contained in excluded folders don't appear in code completion suggestion lists, references to such classes are shown in the editor as unresolved. When searching, IntelliJ IDEA doesn't look in excluded folders, etc.
Source
Another way is to define a custom scope as described here.

adding extra files to vb.net project

I am trying to add some 'supporting' files to my project in VB.NET Express 2012. These files are additional files that are not really part of VB.NET such as RTF files which are templates for reports etc. There is also some text based template files, that will get modified as part of the execution of my program.
What I have done:
I have added these to the project (i.e. they appear in the Solution
Explorer under the project)
I have set the 'Copy to Output Directory' of each of the files to
"Copy Always" in the properties window.
When I publish the project and re-install it, none of these files are included.
Any help would be appreciated. Thanks in advance.
From build action you should select "content"

VB.NET 2008 importing forms from another project?

I have some form/vb in another project that I want to import to a new one. There are three files with these extensions - .vb, resx, and designer.vb. Which do I copy and how exactly?
If you are copying the files outside of Visual Studio (e.g. in Windows Explorer) you need to copy all three.
But working in Visual Studio you only need to copy the base .vb file; the .designer.vb and the .resx will be copied for you automatically. How to do this? Right click on your project file in Solution Explorer and choose Add -> Existing Item.
You need to copy all the files. You should even be able to open two instances of Visual Studio and drag and drop the form from one to the other.
Once you do the copy you'll probably want to change the namespaces and/or type names inside the files because they might be pointing to names from the previous project.
You need to copy all files over. If you copy and paste them using the file system, in Visual Studio Solution Explorer they won't appear. You will need to "show all" files. Then everything in the project directory is shown allowing you to right-click them and "include" them in your project.