Вопрос

I want to include some files from a package at buildtime. Something like this:

<Project ToolsVersion="4.0" DefaultTargets="BeforeBuild"  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Content Include="..\packages\MyPackage\content\SharedPage.aspx" />
    <Compile Include="..\packages\MyPackage\content\SharedPage.aspx.cs">
      <DependentUpon>SharedPage.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="..\packages\MyPackage\content\SharedPage.aspx.designer.cs">
      <DependentUpon>SharedPage.aspx</DependentUpon>
    </Compile>
  </ItemGroup>
</Project>

This seems to build but won't let me be able to view my SharedPage at runtime.

Any suggestions?

Это было полезно?

Решение

Copying the aspx-files from the package to the project directory did the trick.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top