缺少_PublishedWebsites目录,global.asax和web.config

问题描述 投票:0回答:1

我曾经编写自己的msbuild xml配置文件来编译和打包我的asp应用程序。通常,在解决方案上调用msbuild目标会在我的_PublishedWebsites目录中生成一个OutDir目录。

<Target Name="Compile" DependsOnTargets="Init">
        <MSBuild Projects="$(SolutionFile)" 
             Targets="Rebuild"
             Properties="OutDir=%(BuildDir.FullPath);
             Configuration=$(Configuration);
             Platform=$(BuildPlatform);
             DebugSymbols=$(DebugSymbols);
             DebugType=$(DebugType);
             AllowedReferenceRelatedFileExtensions=$(AllowedReferenceRelatedFileExtensions)" />
</Target>

但对于我的上一个项目,它没有。

所有代码都在OutDir中,并且没有创建_PublishedWebsites目录... global.asaxweb.config文件也丢失了。

你有什么线索吗?

asp.net msbuild solution msbuild-task
1个回答
0
投票

我能够检索经典的_PublishedWebsite部署目录,将以下行添加到我的.csproj Web项目文件中:

  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>

希望能帮助到你!

© www.soinside.com 2019 - 2024. All rights reserved.