dotnet / dotnet/project-system

Error message 'Assets file ...\project.assets.json' doesn't have a target for ...

Open
#7,120 2 comments 0 reactions 0 assignees View on GitHub
Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

**Visual Studio Version**:
16.9.3

**Summary**:
Errors when trying to build.

**Steps to Reproduce**:

1. Create a console app (ConsoleApp1) for .net 5.
2. Change to multi-target .net 4.72, .net 3.5
3. Add a conditional property group in order to rename the output assembly name for one target
```


Exe
net472;net35


ConsoleApp35

```

**Expected Behavior**:
Build successfully.
.NET 4.7.2 output should be ConsoleApp1.exe
.NET 3.5 output should be ConsoleApp35.exe

**Actual Behavior**:
Fails to build with errors
![image](https://user-images.githubusercontent.com/271656/114595291-211c8500-9c86-11eb-9478-0329c634501b.png)

**User Impact**:
Annoying

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.