dotnet / dotnet/project-system

XAML Designer throws when ProjectReference.ReferenceOutputAssembly is false

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

Description

## Visual Studio Version
Microsoft Visual Studio Enterprise 2022
Version 17.0.2
VisualStudio.17.Release/17.0.2+31919.166
Microsoft .NET Framework
Version 4.8.04084

## Summary
**See attached sample project!** I have a `WPF` app project which loads `WPF` plugins from a "Modules" folder. Thus, no project references! In order to enforce the build system to build these plugin projects when hitting F5 (Debug) we came up with this quite clever trick for our `.exe` project:

```xml



```

This works flawlessly, except for the `WPF` designer. It seems it is unable to resolve/deploy the necessary dependencies even though this User Control library has no dependencies at all.

![designer-error](https://user-images.githubusercontent.com/958469/147115412-4fbb74ce-d55c-4433-aaf0-4a5bad953d76.png)

## Steps to Reproduce

1. Open sample project in VS 2022.
[wpf-designer-problem.zip](https://github.com/dotnet/project-system/files/7763535/wpf-designer-problem.zip)

2. Rebuild.
3. Open `MyViewA.xaml`. The `DataTemplate` shows an error.

## Expected Behavior
The designer should pick up the needed assemblies.

## Actual Behavior
The designer shows an error.

## User Impact
WPF productivity is greatly reduced.

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.