When I create new *.rc file in visual studio and import some custom resource types in it, visual studio include "resources.h" and some directives implicitly in *rc file.
I want create Plain RC file to add custom type binary data only. later I can build it to embed with application.
But each time I have to manually remove "directives and included headers" from *.rc before compilation.
Is there any way, so I create new *rc file and add any coustom data without adding any include files and directives in visual studio?
I can locally create *.rc file and add any data like i edit text file.
But I want to create using visual studio.
I don't think that the Visual Studio Express can let you add .rc files.
But you can go Project->Add New Item...->Visual C++->Code->C++ File (.cpp)
and change the file name to app.rc.
After that, Right-Click the app.rc file and select View Code.
Now, you can edit it like a text file.
Support Link:
https://msdn.microsoft.com/en-us/library/aa381058%28VS.85%29.aspx
Related
Is it possible to hide generated dart files in Android Studio especially *.g.dart files?
In Project panel, under Options there is a File Nesting Option. I added .chopper.dart; .freezed.dart; .g.dart to .dart parent. This will group related files under the main file.
In Settings panel, open Editor section, and select File Types. Now look for Ignore files and folders field at the bottom. Just include *.g.dart there and you're good to go!
I have a VS project, but I moved some source, resource files to another location.
It's not easy for me to readd all again (cause of filled properties tab for custom build tools, etc.)
Is there any easy GUI way to change the included source file path? In XCode it's easy to do this, but I don't see any way in Visual Studio (currently using 2012).
Do I have to rewrite the xml build file?
I have finally find it. Easiest way is to edit the xml file .vcxproj. I just have to manually find the paths (they are relative... i dont really know why Microsoft did this, it is so stupid) in that xml and edit it.
Is it possible to specify include paths individually for each soucre *.cpp file?
Eclipse uses this method for code assistance, see Discovery Options properties
In Visual Studio 2010, all I can see is that one can only define the include paths project-wide.
It would be nice if this individual information could then be used for the IntelliSense compiler to parse only the current active source file.
As far as I know IntelliSense parses all files at once, which I think is not appropriate for verly large projects.
I want to add a folder containing xaml and cs files plus other directories to a different project on VS. For some reason when I drag the folder from windows explorer to the project where I will like to place that directory visual studio will not let me. Because of that I am manually adding each file and every time I encounter a directory I have to create it. Maybe it is because I am using team foundation server.
Anyways I am adding the files manually so I click on the folder that I want to add the files on visual studio then click on add existing files. Then I select the xaml and code behind file:
when I click add the files get added but visual studio does not recognize that Bytes.xaml.cs is the code behind!
Do I have to manually add a window then copy and paste the contents of the file?
Edit your .csproj file to add a "DependentUpon" element below your "Compile" element for the .xaml.cs file so that it will appear "inside" the .xaml file not simply below it.:
<Compile Include="BytesDisplay\SubControls\Bytes.xaml.cs">
<DependentUpon>Bytes.xaml</DependentUpon>
</Compile>
To easily edit the .csproj file:
Right-click the project and select "Unload Project"
Right-click the project node again and select "Edit [projectname].csproj"
Edit the XML, then close the file
Right-click the project node again and select "Reload Project"
If you drag-and-drop the .xaml file from Windows Explorer into the Solution Explorer window, it will automatically add the .xaml with the code-behind .cs file.
thanks for the write-up. If you edit the xaml and .cs files class declaration to match without class collisions - then when you add the .xaml file it will pick up the .xaml.cs automatically if it is on the same folder. (vs 2013)
I'm porting a Linux C project in Visual Studio 2010.
I have the following folder project structure under linux:
ProjectName->Src->Source C files
ProjectName->Header->Source H files related to C
How should I configure Visual Studio 2010 to recreate the same structure without compile errors ?
How to create the include folder and tell to the the compiler that is an include folder.
I cannot even add include files (existing elements) in a simple folder. They simply don't appear as I add it.
On the C/C++ configuration tab is the Additional Include Directories option. Set it to the following:
$(ProjectDir)/Header
That should do it. Don't forget to do it for all your configs (debug, release, etc).
Oh, and regarding adding new header files, when you open the Add.. option to add a new file, pay close attention to the BOTTOM of the dialog. it will tell you where it will be placed, and you can change it there.