문제

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