class library .NET 4.8 => .NET 6 - problem
- 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/class-library-NET-48--NET-6---probl/10068649)._
---
[regression] [worked-in:.Net framework 4.8]
Hi,
During migration of our existing project targeting .NET framework 4.8 we encountered starnge error:
MC1000 Unknown build error, 'Could not find type 'System.Web.PreApplicationStartMethodAttribute' in assembly 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.5\ref\net6.0\System.Web.dll'.'

Basically we have one big class library targeting net6.0-windows that has been used across multiple different smaller projects.
This class library is compileable as a stanalone porject with no errors, but as soon as we reference it in our WPF project, also targeting same net6.0-windows, we got this error.
Any help appreciated...
---
### Original Comments
#### Feedback Bot on 6/14/2022, 11:28 AM:
(private comment, text removed)
#### Feedback Bot on 10/9/2022, 11:42 AM:
(private comment, text removed)
---
### Original Solutions
(no solutions)
Contributor guide
Assessment
This issue has not been assessed yet.