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"
Related
If I download the source and build it works fine, but if I do it myself Xcode won't find the default.inc.json file. If I alter the path to /default-theme/default.inc.json then that particular file is found, but other theme files aren't
Clearly, for some reason my set up is causing grief. However, analysing the directory structure of my app and the source comes up with no differences.
Has anyone run into the same?
Are you trying to set the 'root' theme file? If so it should be named 'theme.inc.json'. From there you should add in your own theme files and include files.
See this for further information about themes and the general structure. http://redbeard.io/documentation/theme-reference
I was having the exact same problem.
The problem was when one drags the 'default-theme' folder into the project.
A window will appear asking how you want to add the files: make sure "Copy items if needed" is checked, and "Create groups" is selected. Important: do not choose "Create folder references" otherwise your project will not work.
The example now works as documented.
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.
For some reason, XCode has decided to start copying a huge Prefix.pch.gch file into my application's resources folder when building. This file is not in the Copy Bundle Resources build phase, nor can I find any other project setting that should tell XCode to do this. Has anyone seen this before and know what's going on?
I had a problem with the same symptoms today, it turned out that it was due to one of my objective C files being included in the Copy Bundle Resources files phase of the target (either due to a drag and drop accident, or the xcodeproj file getting corrupted at some point). GCC was then helpfully including the precompiled headers for the prefix header in the target as there is a dependency from the source file.
Doing a Get Info on the source file in question didn't show all the tabs on the file info dialog, even though the file type was set to sourcecode.c.objc.
Removing the file from the project and re-adding it cured the problem.
You could try doing "Show Package Contents" on your xcode project file in the finder, then opening the project.pbxproj file in a text editor (not xcode).
If you search for ".pch" and/or ".gch", you might spot something.
Are there any Copy Files phases?
Is the Prefix.pch.gch file in your project's group tree? The easiest way to check this would be to select the project object, then search for “gch” in the Detail view.
I solved this problem in a different way. Firstly I like to make use of the prefix file so I have lots of includes for standard logging, colours etc.
For every include to the prefix file ensure that each include is only processed once! This can be done by putting:
#ifndef __<Classname>__
#define __<Classname>__
< your original header file here >
#endif
If you select the "Project" item of the "Project menu and then the "Detail" tab view and then select the project in the "Groups & Files" list on the left is the files listed on the right view have a checkbox? and is that checkbox checked? if so then un-check it.
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.
I have an .xsd, .vb, .xsc, and .xss file for a dataset in Visual Studio 2008 that I copied over from another Visual Studio project, however I need to make changes to the dataset. Thus I got into the XSD file, created new columns, deleted ones that aren't needed, etc., etc. However I realized when I attempted to use the new dataset I did not have the Visual Basic code behind the scenes. This code is typically found in dataset.designer.vb. When I copied the old one over of course it was no longer valid since columns changed.
How I can force Visual Studio 2008 to use a .xsd file and to have it create/update its designer code?
You just have to exclude your .xsd file and include it again. It will regenerate your designer.vb file.
I don't know if this is still a common problem for others, but I did find an answer (I think). Click the .xsd file in Solution Explorer. Update the "Custom Tool" property to "MSDataSetGenerator". This will automatically regenerate the *.Designer.vb file.
You can right click the .xsd file and select 'Run Custom Tool' to regenerate the dataset.designer.vb file.
THANKS for the help, in the end I JUST was able to get a dataset.vb file generated using the xsd.exe tool. It works for now, however, I still think something isn't set right in Visual Studio 2008 or at least the "Generate Dataset" menu option from the context menu on an XSD file is gone.
I'll just need to remember that if I modify the XSD file from here on out that Visual Studio isn't updating the .vb file automatically, I'll probably get stuck with reusing the xsd.exe program.
For others the command is (using Visual Studio 2008 Command Prompt Window Tool, in Admin mode if using Windows Vista).
xsd.exe /d /l:VB "XSD FILE LOCATION PATH"
/d means create a dataset code. /l is the language.
The .vb file will be created in C:\Windows\System32.
Unfortunately, this is in the gray area of things things that I can do when I need to, but I haven't needed to do enough to impart the knowledge to others.
All I know is that *.designer.vb means that this code was generated by Visual Studio, and if it generated it once it can do it again. Additionally, the very few times (maybe twice, both in Visual Studio 2005) that I have done this, it seemed like it was as simple as adding the *.xsd file to Solution Explorer. If that alone doesn't do it, try showing all files or right/double clicking on the *.xsd.
Just delete the extra designer.vb file created when u add the xsd file.