 |
| .NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 21st, 2010, 10:06 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
Can't compile Windows Release version?
I can change the Compile Configuration to Release, and it compiles, but it keeps putting the result in the bin\Debug\ folder instead of bin\Release\, even though bin\Release\ appears in the Build output path. If I close the Project Properties and reopen it, the Configuration is reset to Active (Debug).
Does anybody have any suggestions on what may be causing this problem and how to fix it?
|
|

October 23rd, 2010, 06:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Ron,
Maybe you're just switching the configuration settings from Debug to Release and not the actual compilation setting? On the Properties dialog for a project, switching between the two just enables you to choose a build configuration to configure. To switch the actual build config from Debug to Release for compilation, not configuration, switch it using the Properties Grid for your entire Solution in the Solution Explorer.
Hope this helps,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

October 25th, 2010, 11:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
My Solution Explorer lists these files currently:
CopyDBContents
My Project
clsDevDB.vb
clsProdDB.vb
frmCopyDB.vb
I right-click on CopyDBContents above, and select Properties from the menu. Whether this is the SOLUTION properties window or the PROJECT properties window is not clear from the window, but as it is the highest file in the soluton hierarchy, I've been working with the assumption it's the solution. In any case, the window opened when I do this lists these tabs:
Application
Compile
Debug
References
etc.
I select the Compile tab and the Configuration setting defaults to "Active (Debug)". I have changed this to "Release" and then selected "Rebuild CopyDBContents", which as I understand it, ought to create a new executable and all supporting files in the Bin\Release folder. Indeed, bin/Release is displayed in the Build Output Path when I select Configuration: Release. Yet I consistently get a new build with today's date and time in the Bin/Debug folder. Furthermore, VS confirms it's writing the exe to the Bin/Debug folder despite the explicit reference to bin\Release in Bild Output Path:
------ Rebuild All started: Project: CopyDBContents, Configuration: Debug x86 ------
CopyDBContents -> D:\Projects\2010\CopyDBContents\CopyDBContents\bin\Debug\CopyDBContents.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Bin/Release is still empty. And as I said earlier, if I close the Properties tab and then reopen it, "Active (Debug)" is selected again, as though the change was not recorded.
Right-clicking on My Project opens a menu containing only the option "Open", which appears to open the very same window as right-clicking CopyDBContents and selecting Properties. I've tried changing the setting in both instances of these apparently identical setting pages with no effect. There appears to be no difference between Solution and Project settings in this instance.
Does that sound like I am changing Solution settings to you. If not, how do I find the solution settings if the steps above are not correct?
|
|

October 25th, 2010, 01:01 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Does that sound like I am changing Solution settings to you.
|
Nope... ;-
Quote:
|
I right-click on CopyDBContents above, and select Properties from the menu.
|
When you right-click a project, you bring up the *Property Pages* or *Properties Dialog* for the project. When you switch from Debug to Release there, all you do is load the settings in the current dialog so you change the settings for the different build configurations. You can't change the actual active build config there.
What you need instead is the *Properties Grid* for the solution (The Properties Grid is the same grid you use to manage files, properties of controls and so on.) To change the settings for the solution, try this:
1. First, make sure you always show the solution node. VS hides that by default in single project solutions. Choose Tools | Options | Project and Solutions and then make sure that Always Show Solution is checked.
2. Next, in the Solution Explorer, click the solution (left) and press F4. This opens or puts focus on the Properties Grid.
3. Switch the Active Config to Release.
4. Build.
Alternatively, choose Build | Configuration Manager. There you can switch the Active Solution Configuration as well.
Hope this helps,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

October 25th, 2010, 01:12 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
|
|
That did it, thanks! It was not apparent the Solution was being hidden (TYVM, MS!)
|
|
 |