本文介绍了VS2005 Web部署项目到VS2008 - ASPNET编译器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题,一个 wdproj 我升级到VS2008;这是我收到的同时尝试使用的MSBuild编译项目中的错误:

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:错误ASPRUNTIME:在precompilation目标目录    (C:\ code \ CCI \ CORUS \网站\ Website_DeploymentProject \ TempBuildDir \)不能在相同的树源应用程序目录(C:\ code \网站\)

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 文件的相关部分如下:

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>

不过这主要是irrelavant因为我真正需要做的就是以某种方式改变/凌驾于%(TempBuildDir)的位置,而无需手动黑客<$c$c>$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets.

推荐答案

解决的办法很简单 - 移动 .wdproj 文件升了一级,也就是你的网站项目,一切工作正常。

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

这篇关于VS2005 Web部署项目到VS2008 - ASPNET编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 01:00