.NET Core project base issues - "Unable to find project information for" XXX.csproj ""
I have a basic ASP.NET (.NET Framework) web application that targets .NET Framework 4.5.2.
After adding a reference to an empty class library of type "Class Library (.NET Framework)", the following error appears:
"Unable to find project information for 'XXX.csproj". This may indicate a missing project reference. " Below you can see a screenshot of the error.
This is my project file:
<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>
Project File Source
I searched the internet for a solution and found out that it might have something to do with transient dependencies between projects. If A -> B -> C then A -> C. But I only have a .NET Core project and an empty class library.
source to share
C: \ Program Files \ dotnet \ sdk \ 2.2.203 \ Sdks \ Microsoft.NET.Sdk \ target \ Microsoft.NET.Sdk.targets (129.5): NETSDK1007 error: Cannot find project information for 'C: \ Michael R \ Sugar exchange \ MyExchange \ my-exchange-develop \ my-exchange -velop \ Lib \ csharp-nats \ NATS.Client \ NATS.Client.csproj '. This may indicate a missing project reference. [C: \ Michael R \ Sugar exchange \ MyExchange \ my-exchange-develop \ my-exchange -velop \ Common \ Common.csproj
- None of the above answers gave me a solution. I am asking someone to help solve these problems. I am using Visual Studio Code on Windows 10.
source to share