How to add meta data to Visual Studio C/C++ project - c

I made a simple program in Visual Studio and would like to distribute it. However, before I can do that, I would like to add metadata to the executable file (such as author, version, etc.) Is there any way to do this in a C or C++ project in Visual Studio 2017?

In the VS2008 Resource view, right-click on your project.
From the pop-up menu, select Add resource.
In the dialog, select Version
A Versioning resource is added to your project (program). Double-click on it and it will be shown in the editing pane. You can adapt the standard versioning elements.
If you right-click in the editor, you can add your own blocks.
If you compile your application, the version information will be added to the executable. Right-click the excutable, select Properties and then select the Detail tab to see your information.
Note: when testing, the executable was now flagged harmfull by F-Secure. I reported this false positive to F-Secure.

Related

I can not get the report viewer to work on VS 2019

On Visual Studio 2019 I have added the Microsoft RDLC Report Designer from NuGet packages and I went ahead and added the Microsoft.ReportViewer.Winforms.dll to the project as well. I also created a .xsd and a .rdlc The reportviewer tool shows up on my toolbox and I am able to drag and drop it onto the form. The problem is, when I drop the report viewer tool onto my form, it doesn't open the report view. Instead, it goes to the bottom of the form, just like the timer tool does. I double click on it and it does nothing. I followed the same steps on VS 2017 and was able to create a report.
I already uninstalled the packages and re-installed them and it keeps behaving the same way.
I expect the report viewer to display as it did in VS 2017
I'm using version 150.1404.0 and the issue is still present.
The bug is not in the reporting control, it is a VS2019 code generator bug.
The code lacks the line that actually adds the control on the form:
this.Controls.Add(reportViewer1);
This needs to be placed after the control was initialized and before the
this.ResumeLayout(false);
line in the InitializeComponent() method, which can be found in the formName.Designer.cs
I was having the same issue and I got it solved by installing those packages from NuGet:
1- Corrected.Microsoft.ReportServices.ReportViewerControl.Winforms
2- Microsoft.ReportingServices.ReportViewerControl.Winforms
3- Microsoft.ReportViewer.Common.v12
4- Microsoft.REportViewer.WinForms.v12
Rebuild your project and you are good to go.
** Found it on youtube but couldn't place the link here because of the rules here, thanks to him.
From VS 2019 click extension menu then select Manage Extensions at the online tab search report viewer you will find Microsoft RDLC Report Designer click download button
right click on your project and select Manage Nuget Packages then install the report Viwer control to you project
search for
Microsoft.ReportingServices.ReportViewerControl.WebForms
rebuild Vs Solution
from Toolbox right click add Choose Items
on the .NET Framework Components, select Browse. Select the Microsoft.ReportViewer.WinForms.dll or Microsoft.ReportViewer.WebForms.dll from the NuGet package folder you installed
The new control should display within the toolbox
There are a ton of unofficial versions on NuGet. Ensure you are using the correct package:
https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.Winforms/
Issue was fixed in version 150.1400.0

VS 2013 Ultimate: Add new Elements, Windows Form missing

When creating a new project I can select a new Windows Forms Project. It will open me a new project with a new windows form. When right clicking my opened project and going for add => Windows Form it will only open the "new element" mask, where Windows Forms, WPF and other templates are missing.
I already tried Visual Studio C# Can't make new windows form project devenv /installvstemplates, but it didn't work out telling me the templates were missing.
The following files were passed with the commandline:
\installvtemplates
These files were not found and could not be load.
What do I have to do, to get my WinForm templates back and where can I configure those? I can not just reinstall Visual Studio 2013 Ultimate, because I do not have an installation medium nor they key (Like nobody in my company can tell where to find it).
In the screenshot below you can see the mask, where I used to have a lot more templates. In this case we only have Inherited Forms and Inherited User Control as avaliable templates.
This is what I get when I go for new project, Windows Forms is avaliable here.
( Win Forms Objects not avaliable )
The template files are avaliable at C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\VisualBasic so I am pretty sure it has to be an option somewhere in the settings. Any ideas?
After a few hours of trying I found a solution myself. It might not be the official way, but it seems to be working. I did the following steps:
Go to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\VisualBasic and check if the templates are avaliable
If they are avaliable copy the directory Windows Forms
Paste the copied directory to C:\Users\%USERNAME%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual Basic
Start Visual Studio
Go into a project and try to add a new element. This step will take a while loading. I think visual studio now detects the new templates in your documents folder and refreshes all templates.
When it has finished loading you will see almost all templates twice. That's good news!
Close Visual Studio and delete the directory in C:\Users\%USERNAME%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual Basic\ we just pasted.
Restart Visual Studio
Profit
Tested on Windows 10 / Visual Studio 2013 Ultimate

Visual Studio 2010 - XAML Editor Extraordinarily Slow

Has anyone else experience incredibly slow performance in the XAML editor in VS 2010? If I have a new project with a limited number of files, the performance is fine. However, if I have a project with a larger number of XAML files, the XAML editor hangs intermittently every few seconds, making it almost impossible to use.
I should also note that the performance is only slow in one particular project where I am referencing DevExpress 2010. I am not certain if this is related.
Any suggestions on solutions to this problem would be greatly appreciated.
Chris
In Visual Studio 2012:
Go to
Tools > Options > TextEditor > XAML > Misc
Check Always open documents in XAML view and uncheck Automatically populate toolbox items.
In Visual Studio 2015, 2017:
Go to
Tools > Options > XAML Designer
uncheck Automatically populate toolbox items.
This fixed my same problem.
If you don't need the visual designer, you can select a different editor in visual studio:
Right click the xaml file -> Open With... -> Source Code (Text) Editor
You will only lose the split view, intellisense etc. should still work.
If you need to check something in the designer you can still click 'view designer' to open the normal XAML editor again.
If you want to improve the performance of the visual designer, try checking DesignerProperties.GetIsInDesignMode in your code-behind. The visualiser instantiates your controls to know how to display them, thus executing parts of the code-behind.
Like the OP, I had extreme lag in the xaml editor on a project that relied heavily on DevExpress WPF controls. After trying unsuccessfully to resolve this issue with the other solutions posted here, I eventually tried deleting my Solution User Options (.suo) file, which is usually located in the same folder as the solution (.sln) file. This immediately resolved the issue. You may want to read this post about what visual studio stores in the suo file so you can reset anything important (such as build configuration - mine always defaults the active solution platform back to "Mixed Platforms" for example)
Short answer: if you do not use designer much, just replace the default editor for XAML, thus getting rid of XAML visual designer and speeding things up. Right click any XAML file, click Open with... and choose another default editor. Source code (text) editor works just fine.
Now it should be already fine. If you want to understand the details and completely get rid of the slow designer, read the long answer.
Long answer: Here is a nice explanation of what happens and why is it that slow.
A brief todo based on the aforementioned article in order to completely disable the visual designer of XAML:
Under Tools->Options->Text Editor->XAML->Miscellaneous->Default View check Always open documents in full XAML view
Open Task manager and end XAML Designer process XDesProc.exe (Note: for VS2013 right click this process and go to containing folder. Rename the exe to sth else, than end the process)
Standard XAML editor will load this process again (I guess it will not succeed with VS2013 and actions done in P.2). However, right click any XAML file, Open with... and choose another default editor. Source code (text) editor works just fine.
While using dev express, I've noticed some laggy response in the Visual Studio designer. This appears to be due to the license authentication of the DevExpress products.
If you delete the "Licenses.Licx" file (found in the project properties folder) you'll notice a marked improvement in performance.
Note: Removing the license file doesn't stop you from using DevExpress controls. But it does stop VS from constantly authenticating it.

Where do I set properties in a VS 2008 Setup project?

I have a WinForms project in Visual Studio 2008, and I've created a Setup project for it. I can build this and it picks up the dependencies and creates the .exe and .msi. But I would like to customize it a little bit, for example by specifying my company name and changing the default 90s-style clip-art logo that appears when the installer executes. But I cannot find anything resembling a properties page where I would do any of this. If I right-click on the Setup project and go to Properties it just gives me options about the output file name, compression of the installer, etc.. Is there some other place I need to go to change things like my company name, the product name, and the image?
If you highlight the project, there will be new icons above the solution explorer.
These buttons are for the file system, registry, etc. Anything that is effected by the setup.

Is there a way to switch off wpf design surface in Visual Studio 2008?

I would like to know if there is a way to simply turn of the WPF design surface in Visual Studio 2008. I would like to have the xaml editor, but not the design surface as it slows down the IDE, when I try to open a XAML file. For my workflow having only the source files for xaml would be a better fit as I am doing all visuals in Blend.
Tools->Text Editor->XAML->Miscellaneous uncheck Always open documents in full XAML view
alt text http://www.dolittle.com/blogs/einar/WindowsLiveWriter/DisableXAMLdesignerinVisualStudio2008_118F4/image_2.png
The comment below informs of a catch when using this checkbox, that is it only affects files that have not been opened before. A solution from the link to the Microsoft Connect issue in the comment states that
If you really wish to reset the
open/close behavior for all XAML files
in your project, you can achieve this
by closing Visual Studio, then
locating the SUO file adjacent to your
SLN file and deleting or renaming it,
then re-opening Visual Studio. When
you re-open your solution an new SUO
will be created and all files will be
treated as "new". Please note this
will also remove any other
solution-specific IDE behavior for
your solution.
You should be able to right-click the .xaml file and select "Open With..." then select "Source Code (Text) Editor" (optionally clicking "Set as Default" to make it the default). This will open the file in the plain XML editor (you still get syntax highlighting and IntelliSense, too).

Resources