Issue
We are using config transforms inside our solution. For example: Debug, Test, Staging, Release However, those configurations are only used on our
Using the tfs online I got the same error, this fixed my problem
Unfortunately, you will have to modify every project that is used in the solution to have the same build path.
However, this is a pretty easy thing to do if your projects all build to the same path regardless of configuration: in the project properties' Build
tab, select All Configurations
from the Configuration
dropdown and then change the Output path
.
This will create entries for all of the configurations in the project file that do not already existing and set the same output path for all configurations.
Would setting the switch/property /p:OutputPath=Test
work for you? It would output the dlls in a directory called Test (I guees you also could use TeamCity variables).
Link to similar question/answer
https://stackoverflow.com/a/1083362/90033
Put an OR condition for the different values on Release for as many different configurations that you have.
eg.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' Or '$(Configuration)|$(Platform)' == 'Test|AnyCPU'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
One simple solution would be to add a new property to your projects called "DeploymentConfiguration" and have it do the mapping between configs. Example:
<!-- this is your non-deployment DLL -->
<!-- Default DeploymentConfiguration to 'Debug' -->
<DeploymentConfiguration Condition="'$(DeploymentConfiguration)'==''">Debug</DeploymentConfiguartion>
<Configuration Condition='$(DeploymentConfiguration)'=='Test'">Debug</Configuration>
Then in your MSBuild invocation, pass in
/p:DeploymentConfiguration=Test
In your deployment MVC you'd just assign DeploymentConfiguration through to Configuration directly.