VS2005 Web Deployment Project to VS2008 - ASPNET compiler errors

喜你入骨 提交于 2020-03-03 01:40:08

问题


I'm having problems with a wdproj I've upgraded to VS2008; This is the error I'm getting while trying to compile the project using msbuild:

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\).

This is what the relevant section of my wdproj file looks like:

<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>

However that's mostly irrelavant as all I really need to do is somehow change / override the location of %(TempBuildDir) without manually hacking $(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets.


回答1:


The solution was simple - move the .wdproj file up a level, i.e. out of your Web Site Project and everything works fine.



来源:https://stackoverflow.com/questions/1702620/vs2005-web-deployment-project-to-vs2008-aspnet-compiler-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!