Or should I just copy all the files from bin\Release\ excluding .pdb?
UPD:
UPD 2:
That is what I've found in the Advanced settings at the Build tab. Is it what I'm looking for?
To make a release build in VS 2010 express you need to change the build configuration for the project from Debug to Release.
To do this you need to access the configuration manager which is hidden by default in VS 2010 Express Editions, to enable it Click Tools > Settings > Expert Settings
Configuration Manager should now appear as an option in the Build menu and you should be able to change the active build configuration from Debug to Release
Changing build config may have a verity of different consequences including:
Not producing debug symbols for the generated assemblies (.pdb files)
Undefines the DEBUG compilation symbol meaning that any code conditionally included with the symbol will not be in the resulting assembly
The compiler optimizer is enabled which could mean that the IL generated is slightly different than what would normally be generated depending upon what optimizations the optimizer can make
The exact settings used in each build configuration can be viewed and edited on the Build tab of the project Properties page.
To see the build configuration selection combo boxes on the Build tab you need to enable the "Show advanced build configurations" check box on the General page of the Projects and Solutions option group which is visible when Show All Options is checked (as pictured below
With this option checked the Build tab of the project should include a Configuration section which you can use to control which build configuration the tab displays
Related
I am working on a solution in Visual Studio that contains a number of projects:
Solution.sln:
-> ProjectInc1.csproj
-> ProjectInc2.csproj
-> ProjectExc1.csproj
-> ProjectExc1.csproj
I work on all projects and when I make a push on my VCS (Github in my case) it triggers a build configuration on a CI server (TeamCity in my case). TeamCity server uses MSBuild, that takes the Solution.sln as parameter and builds it. However I want certain projects (e.g. ProjectExc1.csproj, ProjectExc2.csproj) to be ignored from build. I can do this step if I remove the project references from Solution.sln file, but I think there must be a better way to exclude from build certain project.
Does anyone know how to configure MSBuild or the Solution itself to ignore these projects when building the solution on the CI Server?
In Visual Studio create a new build configuration (from http://msdn.microsoft.com/en-us/library/jj676765.aspx):
To create a solution configuration that excludes a project
On the menu bar, choose Build, Configuration Manager.
In the Active solution configuration list, choose .
In the Name box, enter a name for the solution configuration.
In the Copy settings from list, choose the solution configuration on which you want to base the new configuration (for example, Debug),
and then choose the OK button.
In the Configuration Manager dialog box, clear the check box in the Build column for the project that you want to exclude, and then
choose the Close button.
On the Standard toolbar, verify that the new solution configuration is the active configuration in the Solution
Configurations box.
On the menu bar, choose Build, Rebuild Solution.
Then in TeamCity, instead of building in Debug/Release set the configuration to build with your new build configuration name.
If you are calling from an MsBuild script, the same applies. Just change the configuration you are calling.
I have a solution file with 10 assemblies. When I build the solution I would like to exclude 5 of them from being built and put in the Release folder. I tried going into the properties of the solution and unticking the assemblies in the Build column in the configuration properties, but this did not work.
If may use Configuration Manager tool of visual studio by write clicking on your solution in VS and selecting Configuration Manager and in active solution configuration combo box selection New
deselecting any project.
More configuration options for this newly created build will be possible by right clicking on each project any selecting properties part and going to Build tab(like output path will be editable)
I used to have the environment optimized for c# but recently I have been doing a mostly c++ work. So after a format, I selected c++ instead. Once in a while I still do some c#/xna stuff so I installed xna as well. Problem is that visual studio does not behave anything like I remember it behaving when I had the environment optimized for c#. The run button no longer compiles the solution. Hell, compiling the solution does nearly nothing... I need to recompile for my changes to take effect. What the hell?
I have tried Tools > Import and Export Settings > Reset all settings, reinstalling xna and visual studio and still the F5 does not compile.
edit: Turns out that the projects were set to not compile under the configuration options. I never set this though. I found a forum with several people who had the same issue: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/8657c07a-da08-4a9f-9558-0c9d93c94ce2/
If you have a number of configurations, it's possible that the currently selected configuration doesn't have the project (you want to auto-build) in it.
For example.
The default configurations are DEBUG and RELEASE and all the projects (in the solution) are ticked against this.
But if you've manually un-ticked a project against one of these configurations OR you've manually added a new project and then un-ticked that project in the configuration .. Visual Studio won't compile those un-ticked projects.
So double check your configuration. (Right Click on the Solution name => Configuration Manager).
I hope this will fix your problem: Start debugging F5 does not build automatically, Visual Studio.
First check what should happen when you run a project. To do this, open Tools > Options, Projects and Solutions, Build and Run, and check that you have selected for the On Run, when projects are out of date option:
Make sure you have selected Always Build...
To change you settings:
Tools -> Import and Export Settings
Choose: Import selected environment settings
Save you settings if you want
You are then presented with a set of default settings to choose from (General, C++, C#)
Is it possible to change some setting so that Visual Studio always use the "release" configuration when publishing?
I use debug mode when i develop to clear some caches and stuff like that and i also have different web.configs for release and debug. Sometimes when i publish i forget to change the configuration to release and i end up with a broken website ;)
I understand i can do this with MS Build or something but publish working fine except for this. Any tips?
In Solution Explorer, select the project.
On the View menu, click Property Pages.
Click the Build or Debug tab, in a Visual C# or a Visual F# project, the Compile or Debug tab, in a Visual Basic project, or Configuration Properties, in a Visual C++ project.
In the Configuration drop-down list, click Debug or Release."
Steps provided by:
http://msdn.microsoft.com/en-us/library/wx0123s5.aspx
As of at least VS 2017, the web publish settings now include a setting for which configuration to publish, which defaults to Release, so you can publish the release build even when VS is still in Debug configuration.
I just wish that they had also done this for regular Click-Once applications as well...
If I build a solution in VS2005, will the build go to both bin/Debug and bin/Release? Or do I need to specify something?
No, it only goes into what release you've specified VS to build under. There should be a dropdown in your standard toolbar that specifies whether it's Debug, Release or any other custom build configuration that you've specified.
In this image it's set to debug (from the red highlight on the top of the screenshot) so will by default go to bin\Debug.