【问题标题】:Adding a project reference incorrectly adds a dll reference添加项目引用错误地添加了 dll 引用
【发布时间】:2019-05-16 04:09:05
【问题描述】:

我刚刚更新了 VS2017 和 VS2019 vs 并升级了我的项目以引用 .Net Framework 4.7.2

当我打开我的 c# XAF winforms 解决方案时,我得到构建错误。

 CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference

好像缺少对 Module 项目的引用。

引用是被引用的文件在文件夹中 MyApp\Module\bin\Debug\MyApp.Module.dll

当我删除引用并尝试添加项目时,会添加对 .dll 的引用。

我正在为 XAF dll 使用 Nuget

我可以在 MyApp.Module.Win.csproj 中看到以下内容

  <ItemGroup>
    <ProjectReference Include="..\MyApp.Module\MyApp.Module.csproj">
      <Project>{guid etc}</Project>
      <Name>MyApp.Module</Name>
    </ProjectReference>

【问题讨论】:

  • 可能是因为需要更新 nuget 包以使用不同的目标框架

标签: .net visual-studio nuget xaf


【解决方案1】:

我错过了将其中一个项目升级到 .Net Framework 4.7.2 我修好了。 现在解决方案构建完成。

【讨论】:

  • 感谢您分享您的解决方案。您可以考虑将其标记为答案:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-24
  • 1970-01-01
  • 2011-11-09
  • 1970-01-01
  • 2012-10-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多