2009-11-09 783 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文件上移到一个级别,即不在您的网站项目中,并且一切正常。