dotnet / dotnet/project-system
MSBuild props/targets not included in designtime builds during project creation
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
## Visual Studio Version
17.1 Preview 3
## Summary
Looks like NuGet Restore has not run or completed yet during evaluation of DT builds causing the props/targets in the project's obj folder generated during restore to not be included in any DT builds:
`NoImport: $(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.targets at (128;3) false condition; ('$(ImportProjectExtensionTargets)' == 'true' and exists('$(MSBuildProjectExtensionsPath)') was evaluated as 'true' == 'true' and exists('C:\Users\mgoertz\source\repos\MauiApp17\MauiApp17\obj\')).`
## Steps to Reproduce
1. Install VS 17.1 Preview 3 with Xamarin Mobile workload and optional MAUI selected
2. Add these required to your %APPDATA%\NuGet\NuGet.config:
dotnet nuget add source "https://api.nuget.org/v3/index.json" --name "nuget"
dotnet nuget add source "https://aka.ms/dotnet6/nuget/index.json" --name "dotnet6"
3. Launch VS
4. Create new MAUI app project
## Expected Behavior
No errors
## Actual Behavior
C# IntelliSense errors:
1. The name 'InitializeComponent' does not exist in the current context
2. The name 'CounterLabel' does not exist in the current context
3. The name 'CounterLabel' does not exist in the current context
## User Impact
Project builds and runs but IntelliSense errors don't go away until solution close and reopen.
Contributor guide
Assessment
This issue has not been assessed yet.