dotnet / dotnet/project-system
Moving a project on disk breaks IntelliSense, etc due to caching of targets
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
1. Clone https://github.com/Ponant/ResxBugVS2017RC
2. Open project
3. Notice that Dependencies node has errors and get Intellisense errors
I debugged this and this is caused by the caching of the NuGet props, which results in the wrong paths being used for $(ProjectAssetsFile), for example, from a design-time build:
```
17>Target "ResolvePackageDependenciesForBuild" skipped, due to false condition; ('$(ResolvePackageDependenciesForBuild)' == 'true' and Exists('$(ProjectAssetsFile)')) was evaluated as ('true' == 'true' and Exists('U:\Calculus\Visual Studio 2017\Projects\ResBugWebAppCore11\ResBugWebAppCore11\obj\project.assets.json')).
```
This is despite this project being on my D:\. NuGet restore will re-generate the props/targets to point to the correct paths but Visual Studio will not pick up the new values until you restart it.
Contributor guide
Assessment
This issue has not been assessed yet.