Reputation: 430
I'm trying to set the OutputPath value to an absolute path:
<OutputPath>c:\Projects\xxx\Deployment</OutputPath>
But I get this error:
Error 17 The expression "[System.IO.Path]::GetFullPath(D:\Projects\xxx\trunk\xxx.Web.Deployment\c:\Projects\xxx\Deployment\)" cannot be evaluated. The given path's format is not supported. 1 1 xxx.Web.Deployment
Is there a way to use an absolute path with the OutputPath property? I've tried experimenting with the BaseOutputPath property:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Deployment|AnyCPU'">
<BaseOutputPath>C:\Projects\xxx\</BaseOutputPath>
<OutputPath>.\Deployment</OutputPath>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>xxx.Web.Deployment</SingleAssemblyName>
But it seems to get ignored. What are BaseOutputPath and BaseIntermediateOutputPath used for?
Upvotes: 8
Views: 11451
Reputation: 1
Instead of all the steps in the October answer, is it not possible just to define WebPublishPipelineProjectDirectory
with the same path as OutputPath
?
I tried it in my CI solution (using CruiseControl
) and it seemed to work.
Does anyone know of any side effects that are not apparent to me from doing this?
Upvotes: 0
Reputation: 16705
I'm not sure whether you can do what you're talking about, but you can add something similar to the following:
<PropertyGroup>
<CentralisedBinariesFolderLocation>c:\wherever</CentralisedBinariesFolderLocation>
</PropertyGroup>
<Target Name="AfterBuild">
<Exec Command="xcopy /Y /S /F /R "$(TargetPath)" "$(CentralisedBinariesFolderLocation)"" />
</Target>
Which will copy it to the relevant location after the build.
Upvotes: 5
Reputation: 9955
Upvotes: 0
Reputation: 50000
Try using OutDir
instead of OutputPath
:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Deployment|AnyCPU'">
<OutDir>C:\Projects\xxx\$(Configuration)</OutDir>
<EnableUpdateable>true</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>xxx.Web.Deployment</SingleAssemblyName>
</PropertyGroup>
Upvotes: 3