c# – .NET核心项目参考问题 – “无法找到’XXX.csproj’的项目
发布时间:2020-12-15 22:45:00 所属栏目:百科 来源:网络整理
导读:我有一个针对.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.” B
我有一个针对.NET Framework 4.5.2的ASP.NET核心Web应用程序(.NET Framework).
添加对“类库(.NET Framework)”类型的空类库的引用后,将显示以下错误:
这是我的项目文件: <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 解决方法
为我解决这个问题的是将目标框架从4.5.2更改为4.6.1,如果有人应该遇到相同的:)
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |