ビルド環境によって、DBの接続先が異なるEXEを作っています。
(構成マネージャ上でRelease1,とRelease2が存在)
Release1でビルドするとRelease1.exe、Release2ならRelease2.exeというEXEを作るような設定はありますでしょうか?
Visual Studio 2012(VB)
.NET 3.5
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。

回答2件
0
ベストアンサー
こんにちは。
IDEからの変更方法は無いかもしれません。
vbprojファイルを直接編集する方法を紹介しておきます。
XML
1<?xml version="1.0" encoding="utf-8"?> 2<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> 4 <PropertyGroup> 5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 6 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 7 <ProjectGuid>{DF2DF007-EA99-4CDA-84D8-FB7827579EB7}</ProjectGuid> 8 <OutputType>Exe</OutputType> 9 <AppDesignerFolder>Properties</AppDesignerFolder> 10 <RootNamespace>Hoge</RootNamespace> 11 <AssemblyName>Hoge</AssemblyName> 12 <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> 13 <FileAlignment>512</FileAlignment> 14 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> 15 </PropertyGroup> 16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 17 <PlatformTarget>AnyCPU</PlatformTarget> 18 <DebugSymbols>true</DebugSymbols> 19 <DebugType>full</DebugType> 20 <Optimize>false</Optimize> 21 <OutputPath>bin\Debug\</OutputPath> 22 <DefineConstants>DEBUG;TRACE</DefineConstants> 23 <ErrorReport>prompt</ErrorReport> 24 <WarningLevel>4</WarningLevel> 25 </PropertyGroup> 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 27 <PlatformTarget>AnyCPU</PlatformTarget> 28 <DebugType>pdbonly</DebugType> 29 <Optimize>true</Optimize> 30 <OutputPath>bin\Release\</OutputPath> 31 <DefineConstants>TRACE</DefineConstants> 32 <ErrorReport>prompt</ErrorReport> 33 <WarningLevel>4</WarningLevel> 34 </PropertyGroup> 35 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release1|AnyCPU'"> 36 <OutputPath>bin\Release1\</OutputPath> 37 <AssemblyName>Release1</AssemblyName> 38 <DefineConstants>RELEASE1;</DefineConstants> 39 </PropertyGroup> 40 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release2|AnyCPU'"> 41 <OutputPath>bin\Release2\</OutputPath> 42 <AssemblyName>Release2</AssemblyName> 43 <DefineConstants>RELEASE2;</DefineConstants> 44 </PropertyGroup> 45 <ItemGroup> 46 ……
Release1とRelease2のPropertyGroup内にAssemblyNameで実行ファイル名を指定してください。
これでデフォルトの実行ファイル名は構成に応じて上書きされるはず……。
※1.直接編集しているため、IDEからの何らかの操作で設定した内容が失われる可能性はあります。
※2.VS2010では確認出来てません。
投稿2016/04/04 05:57
総合スコア4791
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/04/04 06:04
2016/04/04 06:11