我有一个针对.NET Framework 4.5.2的ASP.NET核心Web应用程序(.NET Framework).
添加对“类库(.NET Framework)”类型的空类库的引用后,将显示以下错误:
“Cannot find project info for ‘XXX.csproj’. This can indicate a
missing project reference.” Below you can see a screenshot of the
error.
这是我的项目文件:
<Target Name="GenerateBuildDependencyFile" DependsOnTargets="_DefaultMicrosoftNETPlatformlibrary" BeforeTargets="_CheckForCompileOutputs" Condition=" '$(GenerateDependencyFile)' == 'true'" Inputs="$(ProjectAssetsFile)" Outputs="$(ProjectDepsFilePath)"> <GenerateDepsFile ProjectPath="$(MSBuildProjectFullPath " AssetsFilePath="$(ProjectAssetsFile)" DepsFilePath="$(ProjectDepsFilePath)" TargetFramework="$(TargetFrameworkMoniker)" AssemblyName="$(AssemblyName)" AssemblyExtension="$(TargetExt)" AssemblyVersion="$(Version)" AssemblySatelliteAssemblies="@(IntermediateSatelliteAssembliesWithTargetPath)" ReferencePaths="@(ReferencePath)" ReferenceSatellitePaths="@(ReferenceSatellitePaths)" RuntimeIdentifier="$(RuntimeIdentifier)" PlatformlibraryName="$(MicrosoftNETPlatformlibrary)" CompilerOptions="@(DependencyFileCompilerOptions)"> </GenerateDepsFile> <ItemGroup> <FileWrites Include="$(ProjectDepsFilePath)" Condition="Exists('$(ProjectDepsFilePath)')"/> </ItemGroup> </Target>
Source of the project file
我在互联网上搜索了一个解决方案,发现它可能与项目之间的传递依赖关系有关.如果A – >; B – > C然后A – > C.但我只有一个.NET Core项目和一个空的类库.
解决方法
为我解决这个问题的是将目标框架从4.5.2更改为4.6.1,如果有人应该遇到相同的:)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。