Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top