2009-11-09 299 views
2

我遇到問題wdproj我已升級到VS2008;這是在試圖使用的MSBuild編譯項目中,我得到的錯誤:VS2005 Web部署項目VS2008 - ASPNET編譯器錯誤

ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory (C:\code\CCI\CORUS\Website\Website_DeploymentProject\TempBuildDir\) cannot be in the same tree as the source application directory (C:\code\Website\).

這是我的wdproj文件的相關部分的樣子:

<Project DefaultTargets="Build;AfterBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> 
<PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 
    <ProductVersion>8.0.60403</ProductVersion> 
    <SchemaVersion>2.0</SchemaVersion> 
    <ProjectGuid>{36799864-6917-499B-814B-F542D3C6828B}</ProjectGuid> 
    <SourceWebPhysicalPath>..\SWebSite</SourceWebPhysicalPath> 
    <SourceWebProject>{283D5526-6B10-4CD1-B492-0283D351DC77}|WebSite\WebSite.csproj</SourceWebProject> 
    <SourceWebVirtualPath>/WebSite</SourceWebVirtualPath> 
    <DebugSymbols>true</DebugSymbols> 
    <OutputPath>$(BuildSourceCodePath)\WebSites\$(Configuration)</OutputPath> 
    <EnableUpdateable>true</EnableUpdateable> 
    <UseMerge>true</UseMerge> 
    <UseWebConfigReplacement>true</UseWebConfigReplacement> 
    <ValidateWebConfigReplacement>true</ValidateWebConfigReplacement> 
    </PropertyGroup> 

但是這主要是irrelavant因爲我真正需要做的是以某種方式改變/覆蓋%(TempBuildDir)的位置而無需手動入侵$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets

回答

1

解決方案很簡單 - 將.wdproj文件上移到一個級別,即不在您的網站項目中,並且一切正常。