dotnet / dotnet/wpf

Net Core 6: Microsoft Fakes and WPF Issue

Open
#9,359 2 comments 0 reactions 0 assignees View on GitHub
:mailbox_with_no_mail: waiting-author-feedback
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Net-Core-6:-Microsoft-Fakes-and-WPF-Issu/10128442)._

---
Hello,

I'm in the progress of migrating our WPF from .Net 4.7.2 to .Net Core 6
I run into issues with our test projects that reference WPF and use Microsoft Fakes
Please see my demo repo here:
https://github.com/RoyRosenberg/msFakesWPF

Basically, the problem can be described like the following:
- Class Library project with true
- The project contains ControlDemo class that inherits from UserControl class
- MSTest project with reference to the class library project
- I added fakes assembly to the class lib. project

When trying to compile, I got the 20 errors related to Fakes generation, one of them is:

`Error CS7069 Reference to type 'DependencyObject' claims it is defined in 'WindowsBase', but it could not be found`

![image.png](https://aka.ms/dc/image?name=B6ceb79108abd4529bf4df59be7f4246e637968667681213058_20220823-185246-image.png&tid=6ceb79108abd4529bf4df59be7f4246e637968667681213058)

Please help me find out the problem
Thanks in advance,
Roy

---
### Original Comments

#### Feedback Bot on 8/24/2022, 11:35 AM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 8/24/2022, 00:23 PM:

(private comment, text removed)
#### Roy Rosenberg on 8/24/2022, 00:59 PM:

(private comment, text removed)
#### Roy Rosenberg on 8/24/2022, 01:35 PM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 8/24/2022, 00:25 PM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 8/24/2022, 02:07 PM:

(private comment, text removed)
#### Roy Rosenberg on 8/24/2022, 09:57 PM:

(private comment, text removed)
#### Feedback Bot on 8/25/2022, 06:36 AM:

(private comment, text removed)
#### Roy Rosenberg on 8/29/2022, 09:53 AM:

(private comment, text removed)
#### Roy Rosenberg on 9/2/2022, 00:11 PM:

(private comment, text removed)
#### Roy Rosenberg on 9/20/2022, 10:42 PM:

(private comment, text removed)
#### Roy Rosenberg on 11/6/2022, 00:28 PM:

(private comment, text removed)
#### Feedback Bot on 12/1/2022, 00:25 PM:

(private comment, text removed)
#### Feedback Bot on 2/7/2023, 05:43 PM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

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.