【问题标题】:Visual Studio, csproj: How can I specify a linked file in DependentUpon?Visual Studio,csproj:如何在 DependentUpon 中指定链接文件?
【发布时间】:2013-03-12 22:49:37
【问题描述】:

假设我的项目中有一个 default.aspx.cs,但我想让它依赖于链接的 default.aspx 文件。例如:

<Content Include="..\somedir\default.aspx">
  <Link>Default.aspx</Link>
</Content>

这不起作用:

<Compile Include="default.aspx.cs">
  <DependentUpon>Default.aspx</DependentUpon>    
  <SubType>ASPXCodeBehind</SubType>
</Compile>

这也行不通:

<Compile Include="default.aspx.cs">
  <DependentUpon>..\somedir\default.aspx</DependentUpon>    
  <SubType>ASPXCodeBehind</SubType>
</Compile>

对于这两种情况,我都会收到此错误:

在项目文件中找不到文件“default.aspx.cs”的父文件“Default.aspx”。

是否可以让文件依赖于链接文件?

【问题讨论】:

    标签: visual-studio csproj


    【解决方案1】:

    我尝试了同样的事情,但似乎不支持。检查:https://bitbucket.org/jfromaniello/nestin/issue/4/error-when-nesting-linked-files“DependentUpon 不适用于链接文件。”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-22
      • 1970-01-01
      • 2018-03-10
      • 2018-09-16
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多