Custom added files in obj folder not accessible with WindowsDesktop SDK
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 3.1.400
* Windows version: Windows 10 1903
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
I have a nuget package that adds a couple of commonly used classes as source code to my projects. The source code, in a standard .NET Framework or .NET Core app ends up in the obj folder and is built as part of my project. This source code is not accessible when using the WindowsDesktop SDK (UseWPF=true).
**Actual behavior:**
The compiler cannot find the namespace used by the file in the `obj` folder. Something seems to be explicitly ignoring these files.
Adding this to the .csproj is a workaround:
```xml
```
**Expected behavior:**
In a standard .NET Core project, the code ends up in the `obj` folder and can be used in the rest of the project.
**Minimal repro:**
[Repro.zip](https://github.com/dotnet/wpf/files/5209257/Repro.zip)
Repro.Core project builds fine.
Repro.Desktop project does not.
Contributor guide
Assessment
This issue has not been assessed yet.