Can I make Visual Studio show a notification or alert when I open a particular project or solution - visual-studio-2017

I would like to perform an action upon opening a particular Visual Studio 15/17/19 solution.
I need to inform anyone who is about to work on the project that there are important notes (included in the project) that they should read first. Ideally it would be a pop up so as to be very obvious.
When googling I can only find solutions that involve Visual Studio extensions but I need something that does not rely on anyone else doing anything (e.g. installing the extension) - it needs to be something dependent only on the project itself.
I'm hoping for something that I can add in the .sln or .scproj file that VS will see when it loads the solution and take action, but anything that achieves the same purpose would be good.
I'd be grateful if someone is able to let me know how I can achieve this.

You've got an extension called Solution Open Pop Up supported on many versions of Visual Studio.
In the Overview tab there is a Features section where you can see a short example of how to use it. From the extension's website:
If a file called SolutionOpenPopUp.txt and/or ReadMe.txt exists in the root folder of the solution, the contents are shown in a pop-up when the solution is open.

Related

How to build a library from solution file in Visual Studio 2015

I am somewhat frustrated because what I am asking seems to be common knowledge and isnt explained in any tutorials:
When I download some kind of library/framework (for example assimp), and create a "solution" file with cmake. So far everything is fine. But now I have got a solution file but I want to have a .lib file, right? How can I get it? When I open the solution with VS and click "Build", there is some processing, but after the processing and some console messages, nothing really changed. Is there some kind of way to tell VS: "I want a lib file from this in C:/myDirectory"?
Would really appreciate your help!
It depends on the project properties where the exact output directory for each configuration is.
You can look it up here:

C++ parsing a text file that is located online

Information about what I want to do:
-read in a few integer variables from a text file that will be located on a dropbox public folder.
-the variables will be used to trigger some if statements thus controlling my application remotely if I need to have it do something ( I would just save the variable I need to that text file and my program with would read from it every 5 seconds would see it and perform the required actions).
-this is a console application which is being built and compiled in visual studio 2010 on windows 7. The software will also be running on a win7 computer.
I need help with:
I already have read on using a library called libcurl. The problem is that I do not know how to link this library with my project in vs2010. Detailed instructions on how to do this on vs 2010 would be very helpful.
OR
if you can think of a better and easier way to accomplish what I need done, offer some advice and direction
It sounds like you're a novice, is that correct? If not then apologies for stating the obvious.
To use your compiled DLL in your application you need to 'add a reference' to it. You can do this by adding what is called a binary reference, where you simply tell visual studio where to find the dll. Or you can add a project reference if the project which is producing the dll is within the same solution. The best approach is to use something called nuget. It's a visual studio extension which automates the adding of binary references available from a public repository.
I have just done a search for libcurl on nuget.org and drew a blank. As I am unfamiliar with this library you may have better luck finding a nuget package as you will be a le to search using better terms that I did (curl and libcurl)
Whatever approach you take, just right-click on the project in which you want to use libcurl within the solution explorer and you should find an add reference option in the menu.

How do I go about this program?

I have a program that has a lot of .cpp, .h and .dfm files. I have just recently started learning about Visual C++ with MFC. The program doesn't have any .ncb or solution object files, because of which I am unable to understand as to how to start understanding the program. There are lots and lots of files and its quite confusing to understand the flow.
There are two folders as well. One with .ac files and the other with text files. Could anyone suggest me an easier way to start off? Eventually, after looking at this program's code, I have to create my own program which is kind of similar to this but with added functionality.
Kindly help please.
Cheers.
While I dont use C++ Builder, but .dfm suggest it is for other IDE than Visual C++. My hints would be:
Possibly it is the same source code for multiple IDEs. Quite possible that all source files are not applicable for all IDEs. They are selectively added for different IDEs. Some core files might be added for all projects (ie for in .SLN, .DSW, .VCPROJ, .DFM
If it is really MFC project, search for: CWnd, CWinApp, InitInstance, CString, OnInitDialog, BEGIN_MESSAGE_MAP, ON_WM_, afx_msg etc.
In MFC project, there is no main or WinMain - program starts at InitInstance.
It is hard to gain knowledge of big VC++ project, and understanding MFC code would be quite troublesome for beginner!
Some tips:
Use the Find in Files button to find the characters main. If you find a main(), an _tmain(), or a WinMain this will tell you a lot about what you have. If there's an exe, run it - that will show you what to look for also.
Visual Studio 2010 has an option to create a solution from source files, so that may also help you.
If you think it's an MFC app, look for the View class, the Document class and so on.
In Visual Studio 2010 Navigate To (Ctrl ,) is super helpful - using mixed case words in your search term will do a very clever search. So if you run it and see a button labelled Open Policy, then you search with Navigate To for OpenPolicy, it will find PolicyOpen and OpenNewPolicy and plenty more that Find in Files would not.
Good luck!
People are answering what IDE the project uses, I don't think figuring that out helps you understand what's going on in the project.
For reading the project, the path I might follow would be go through the calls in WinMain as a debugger, you need to go step by step to see what actually happens. Not Ad, but I find Source Insight is helpful on reading bunches of source files. Or if you're familiar with cygwin, the basic "find & grep" is also handy but powerful tools to help you go through source files.
To learn MFC, my own learning experience is create simple project and write code yourself. Don't rely too much on the IDE, although it has some fancy automation staff, such as double clicking on the control in UI design view and it automatically generates message handlers for you, but IMHO it does not help you to understand how MFC registers/handles this message. Write your own message handler and register it manually, will give you a better idea on why and how it works.
Hope this helps.
Create new Project in Visual Studio and then add that files to project.. then press CTRL+F5 and Bulid Project.

What is the purpose of Browse Information generated by Visual Studio

I got a huge C++ third-party project with set of project in one solution. So build time is rather long and Browse Information generation takes a lot too. So what is the purpose of Browse Information? What functionality will be lost if i disable Browse information generation?
Visual Studio 6 required browse information to do the things that Doug T. mentioned.
Newer versions of visual studio can use the browse information file, but by default use a newer Intellisense database. For those versions, there is basically an Intellisense daemon that builds the database in the background instead of being directly embedded in the build process. It really helps to have more than one processor or core when using Intellisense. Otherwise it can really bog down your system.
From here
Select Generate Browse Info under the
C/C++ project settings tab, for any
source-files that you want to be
included. This is very useful for
searching for function definitions and
declarations - just right-click a
function / variable and select "Goto
Definition Of..." and the IDE will
take you straight there.
You will lose some ability to easily navigate your code. This may matter a lot in a very large code base. I know that without it and tools like Visual Assist X, I would be lost. Still, Visual Studio has a very efficient find-in-files operation that cannot be completely replaced with browsing tools.

Setting file version number in Visual Studio 2005 C++

Can anyone point me in the right direction how to configure Visual Studio 2005 with our C++ console project how we can include a 'File Version' in the details section of the file properties.
I've tried resource files without any luck. This is with a C++ project just for clarification, and big thank you for the guys you responded with C# suggestions.
Thanks in advance.
If you are talking about unmanaged c++, you need to add a version resource to the project.
right-click on the project, choose add - Resource.... Choose Version and press new.
There you can enter all info you need.
You have to have one VS_VERSION_INFO section in your resource (*.rc) file(s) that compile into your project.
In the Visual Studio 2005 Solution Explorer, open the context menu on your C++ project and choose Add, Resource.
Mark Version and click "New".
Fill in the fields as desired and save the file.
Build.
Now your project output has a FileInfo resource.
Please be aware that Windows Vista does not show all available version info in the Explorer context menu's "Details" tab.
For c++ projects I use StampVer and call it as a post build operation including check in/out of revision control for release builds.
Unless you have a good reason for your file version to be different than the version of the assembly inside, I think it is a better idea to provide the AssemblyVersion alone. If you do not specify an AssemblyFileVersion, it will automatically get the same value, so you can see your assembly's version directly in the file's properties.
The advantage is that you can use a wildcard and allow the version to be automatically incremented, so that every time you compile the library you get a different build and/or revision number. As far as I can tell, this trick does not work with AssemblyFileVersion, so you have to increment it by hand.
Of course, all this only applies if you're writing .NET code. Are you by any chance talking about a project using unmanaged code?