dotnet / dotnet/wpf

class library .NET 4.8 => .NET 6 - problem

Open
#9,390 2 comments 0 reactions 0 assignees View on GitHub
:mailbox_with_no_mail: waiting-author-feedback Needs minimal repro project
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'.'

![q](https://github.com/user-attachments/assets/e2315ce8-052f-469b-a70f-61da55e3814e)

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

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.