473,569 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set Project setting in Solution

Hi

I have a solution with 50 projects. They are all compiled in DEBUG mode and
the output path has been modified to a custom directory

I now want to build RELEASE mode and the Output Path needs to be reset for
all the project to the custom directory

Is there an easy way to do this besides opening 50 projects???

- I was going to write a pgm to go to all directories and csproj files and
edit that property ??? Anything easier???

Thanks

Aug 19 '08 #1
5 3851
Hello sippyuconn,

Are your 50 projects in one solution (sln)? If yes, I may have an easier
way to build the projects in Release mode.

First, let's look at a sample sln file:

=============== =============== =============== ===
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04 EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelWorkbook4 ",
"ExcelWorkbook4 \ExcelWorkbook4 .csproj",
"{63A08F02-7E57-40FB-A330-651A4078531B}"
EndProject
Project("{FAE04 EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1" ,
"ClassLibrary1\ ClassLibrary1.c sproj",
"{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}"
EndProject
Global
GlobalSection(S olutionConfigur ationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSectio n
GlobalSection(P rojectConfigura tionPlatforms) = postSolution
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.ActiveCfg =
Debug|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.Build.0 = Debug|Any
CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.ActiveCfg =
Debug|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.Build.0 = Debug|Any
CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.Build.0 =
Release|Any CPU
EndGlobalSectio n
GlobalSection(S olutionProperti es) = preSolution
HideSolutionNod e = FALSE
EndGlobalSectio n
EndGlobal
=============== =============== =============== ===

This sln will build its projects to Debug Mode. We can update the
postSolution section to:

GlobalSection(P rojectConfigura tionPlatforms) = postSolution
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.Build.0 =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.Build.0 =
Release|Any CPU
EndGlobalSectio n

And build the solution (not the individual projects), to get the Release
outputs.

Hope it helps.

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Aug 19 '08 #2
Hi Thanks for the reply

The 50 projects are in 1 solution - the issue is not so much DEBUG/RELEASE
but the out put path

<OutputPath>..\ ..\EXE\</OutputPath>

In DEBUG mode all these paths were changed to above for testing - now we
need to change for RELEASE - I was looking for an easy way to do that??
Project1

<Project ToolsVersion="3 .5" DefaultTargets= "Build"
xmlns="http://schemas.microso ft.com/developer/msbuild/2003">
<PropertyGrou p>
<Configuratio n Condition=" '$(Configuratio n)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion >9.0.21022</ProductVersion>
<SchemaVersion> 2.0</SchemaVersion>
<ProjectGuid>{E 8F17DC3-25E9-4822-8C23-808BFBBF1652}</ProjectGuid>
<OutputType>Lib rary</OutputType>
<AppDesignerFol der>Properties</AppDesignerFold er>
<RootNamespace> DbMetaData</RootNamespace>
<AssemblyName>D bMetaData</AssemblyName>
<TargetFramewor kVersion>v2.0</TargetFramework Version>
<FileAlignment> 512</FileAlignment>
</PropertyGroup>
<PropertyGrou p Condition=" '$(Configuratio n)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>t rue</DebugSymbols>
<DebugType>full </DebugType>
<Optimize>false </Optimize>
<OutputPath>..\ ..\EXE\</OutputPath>
<DefineConstant s>DEBUG;TRACE</DefineConstants >
<ErrorReport>pr ompt</ErrorReport>
<WarningLevel>4 </WarningLevel>
</PropertyGroup>
<PropertyGrou p Condition=" '$(Configuratio n)|$(Platform)' ==
'Release|AnyCPU ' ">
<DebugType>pdbo nly</DebugType>
<Optimize>tru e</Optimize>
<OutputPath>bin \Release\</OutputPath>
<DefineConstant s>TRACE</DefineConstants >
<ErrorReport>pr ompt</ErrorReport>
<WarningLevel>4 </WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System " />
<Reference Include="System .Data" />
<Reference Include="System .Xml" />
</ItemGroup>

Project 2

<Project ToolsVersion="3 .5" DefaultTargets= "Build"
xmlns="http://schemas.microso ft.com/developer/msbuild/2003">
<PropertyGrou p>
<Configuratio n Condition=" '$(Configuratio n)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion >9.0.21022</ProductVersion>
<SchemaVersion> 2.0</SchemaVersion>
<ProjectGuid>{D A6168C4-C21D-441A-BF1A-16BD89A50DC1}</ProjectGuid>
<OutputType>Win Exe</OutputType>
<AppDesignerFol der>Properties</AppDesignerFold er>
<RootNamespace> BuildMetaDataFr omDb</RootNamespace>
<AssemblyName>B uildMetaDataFro mDb</AssemblyName>
<TargetFramewor kVersion>v2.0</TargetFramework Version>
<FileAlignment> 512</FileAlignment>
</PropertyGroup>
<PropertyGrou p Condition=" '$(Configuratio n)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>t rue</DebugSymbols>
<DebugType>full </DebugType>
<Optimize>false </Optimize>
<OutputPath>..\ ..\EXE\</OutputPath>
<DefineConstant s>DEBUG;TRACE</DefineConstants >
<ErrorReport>pr ompt</ErrorReport>
<WarningLevel>4 </WarningLevel>
</PropertyGroup>
<PropertyGrou p Condition=" '$(Configuratio n)|$(Platform)' ==
'Release|AnyCPU ' ">
<DebugType>pdbo nly</DebugType>
<Optimize>tru e</Optimize>
<OutputPath>bin \Release\</OutputPath>
<DefineConstant s>TRACE</DefineConstants >
<ErrorReport>pr ompt</ErrorReport>
<WarningLevel>4 </WarningLevel>
</PropertyGroup>
<ItemGroup>


""Jialiang Ge [MSFT]"" wrote:
Hello sippyuconn,

Are your 50 projects in one solution (sln)? If yes, I may have an easier
way to build the projects in Release mode.

First, let's look at a sample sln file:

=============== =============== =============== ===
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04 EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelWorkbook4 ",
"ExcelWorkbook4 \ExcelWorkbook4 .csproj",
"{63A08F02-7E57-40FB-A330-651A4078531B}"
EndProject
Project("{FAE04 EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1" ,
"ClassLibrary1\ ClassLibrary1.c sproj",
"{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}"
EndProject
Global
GlobalSection(S olutionConfigur ationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSectio n
GlobalSection(P rojectConfigura tionPlatforms) = postSolution
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.ActiveCfg =
Debug|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.Build.0 = Debug|Any
CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.ActiveCfg =
Debug|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.Build.0 = Debug|Any
CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.Build.0 =
Release|Any CPU
EndGlobalSectio n
GlobalSection(S olutionProperti es) = preSolution
HideSolutionNod e = FALSE
EndGlobalSectio n
EndGlobal
=============== =============== =============== ===

This sln will build its projects to Debug Mode. We can update the
postSolution section to:

GlobalSection(P rojectConfigura tionPlatforms) = postSolution
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.D ebug|Any CPU.Build.0 =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{63A08F02-7E57-40FB-A330-651A4078531B}.R elease|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.D ebug|Any CPU.Build.0 =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.ActiveCfg =
Release|Any CPU
{98195D15-6E19-4798-9FF9-0A2D05F7CF2C}.R elease|Any CPU.Build.0 =
Release|Any CPU
EndGlobalSectio n

And build the solution (not the individual projects), to get the Release
outputs.

Hope it helps.

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Aug 19 '08 #3
Hello Nick,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? Please let me know your
concerns and I will do my best to find the workarounds for you.

Have a great day!

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== ====
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=============== =============== =============== ====

Aug 21 '08 #4
Hi

Your suggestion did not address my issue

I was concerned about changing the Output path on each project(50)
If I have edited the Path for Debug and I want to have that Path for Release
- I need to edit 50 projects

I was going to write a script to go thru 50 .csproj file

Is there an easier way???
-macro ???
etc

Thanks
""Jialiang Ge [MSFT]"" wrote:
Hello Nick,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? Please let me know your
concerns and I will do my best to find the workarounds for you.

Have a great day!

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== ====
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=============== =============== =============== ====

Aug 21 '08 #5
Hello

Please try this macro:

It enumerates all the projects in the solution and reset the output path of
the release build with
proj.Configurat ionManager.Item (2).Properties. Item("OutputPat h").Value =
outputPath

*************** *************** *************** *************** **
Public Sub ResetSolutionRe leaseOutput()
Dim project As Project
Dim projectObjects As EnvDTE.Projects

Dim outputPath = "bin\Test"
'get all the projects in the current solution
projectObjects = DTE.Solution.Pr ojects

For Each project In projectObjects
ResetOutputPath (project, outputPath)
Next

End Sub

Sub ResetOutputPath (ByVal proj As Project, ByVal outputPath As String)
If (proj.Kind = "{66A26720-8FB5-11D2-AA7E-00C04F688DDE}") Then
' a folder
' check the sub items
Dim projectItem As EnvDTE.ProjectI tem
For Each projectItem In proj.ProjectIte ms
If Not (projectItem.Su bProject Is Nothing) Then
' Recurse, can be an Enterprise project in
' Visual Studio .NET 2002/2003 or a solution folder in
VS 2005
ResetOutputPath (projectItem.Su bProject, outputPath)
End If
Next
Else

proj.Configurat ionManager.Item (2).Properties. Item("OutputPat h").Value =
outputPath
End If
End Sub
*************** *************** *************** *************** **

Please let me know whether it works for you. If you have any other
questions or concerns, DON'T hesitate to tell me

Have a nice weekend!
Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== ====
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=============== =============== =============== ====

Aug 22 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2369
by: Chuck Ritzke | last post by:
Hi, I've been using VS for a number of projects and the debugger has worked as advertised until now. I have a desktop solution with three projects, two of which are class modules. For some reason, in only one of them, the JIT debugger doesn't seem to be working. (At least I asssume this is a JIT debugger issue.) Anyways, in all my other...
5
4897
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET 1.1 -> MsiNetAssembly Support.) I have a few issues and questions regarding the MSI and its properties. * This may be my biggest annoyance at the...
5
2084
by: gerry | last post by:
single machine - W2Kserver , IIS5 , VS.NET 2003 I spent some time struggling with what looked like the dreaded asp.net debugging configuration problem but none of the solutions for this did any good. Outside of the ide I am able to browse to an existing web app with no problem and I can load the web app project in the visual studio ide and...
1
1587
by: Vladimír Kolesnik | last post by:
Hi, there we need help concerning setting project under source control. We want to have a project on the server, and developers in the local network working on this project. We decided to use strategy officialy called "Isolated Development". We studied help in Visual Studio .NET called "Web Projects and Source Control Integration in Visual...
8
2040
by: vinesh | last post by:
I have sample Asp.Net Web Application project. Let me know how to keep the files related to this project (like the webform.aspx, WebForm1.aspx.vb, WebForm1.aspx.resx) in a separate folder within a project and what all setting will I be required to do So that my original project works. Can I keep WebForm1.aspx in root and code behind file in...
2
13850
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies dialog, the "Depends on" checkboxes are grayed out. Is there something else required in order to enable these? Thanks, -- JT Lovell
0
3177
by: Joe Greene | last post by:
I'm trying to add an existing Webservice project to an existing solution. I open the solution and in Visual Studio Solution Explorer right click on the solution. Then select "Add/Existing Project From Web...". In the "Add Existing Project From Web" dialog, I enter the URL "http://crush/wscts" where crush is the server's name and wscts is...
4
2654
by: Hardy Wang | last post by:
Is there a way I can disable Web Deploy Project to run while I am in debug mode? I think Web Deploy Project is very foolish, it could not detect if code of a website is changed or not, it will load "aspnet_merge.exe" "aspnet_compiler.exe"anyway, everytime when I load/debug a site, thus it causes my machine to spend a lot of time to compile...
6
9126
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++ project. I then add a class library, and add a reference to this project in the first project. When I do a release build, I see the following in the...
6
4735
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I expected this config file (.dll.config) to get put in my web app's bin folder along with it's .dll file when i did a build, and that didnt' happen...
0
7710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7625
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7935
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7992
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5244
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3677
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3666
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
969
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.