dotnet / dotnet/wpf

updateuid target does not exist in multitarget project

Open
#9,991 5 comments 0 reactions 0 assignees View on GitHub
Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

The `updateuid` target is no longer found in a SDK-style WPF project with multi targeting enabled.

### Reproduction Steps

1. Create a WPF project. Change `TargetFramework` to `TargetFrameworks`:
```


WinExe
net6.0-windows
true

```

**Note**: It doesn't matter if it's actual multi targeting or what's inside the TargetFrameworks. It's enough to add the 's'!

2. `msbuild /t:updateuid MyWpfProject.csproj`

### Expected behavior

No error and uids are updated in xaml files.

### Actual behavior

`error MSB4057: The target "updateuid" does not exist in the project.`

### Regression?

Yes! This has worked for years until recently.

### Known Workarounds

None.

### Impact

This is stopping us from updating translations in a big project.

### Configuration

Visual Studio 17.11.5
MSBuild 17.11.9

### Other information

_No response_

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.