How to add macros to visual studio project?

I need to add a macro to a visual studio project so that i could use this macro to set properties of the project.

e.g. I could replace to a macro naming $(RemoteComputer).

Could I do this?


Two options:

  1. Make it an environment variable like PATH or APPDATA (My Computer->Properties->Advanced->Environment Variables). Note that you need to restart MSVC or it will not find the new environment variables.
  2. If you want the setting only for a single project, then open the .vcxproj file and go to Project/PropertyGroup[Label="Globals"]. Add a new tag here, e.g. FooBar and it will appear as a $-macro in the studio-settings for that project.

Need Your Help

How I can deactivate ViewState without Control problems

c# html control viewstate

I wrote a ASP.NET Application and it run in IIS7 of a Server. If I open this webform in my Browser and show me the Sitecode I see this...

How to implement drag-n-dropping widget to another container in qt?

c++ qt qt5

I have a window with several containers. What is the simplest way to implement drag-n-drop between them?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.