Emanuele Bianchetti
Emanuele Bianchetti

Reputation: 37

dotPeek - Export of .NET Core .dll to .csproj produces a .NET Framework application

I'm trying to export a .dll assembly built from a .NET Core 6 Web Application to a .csproj file, but my decompiler (JetBrains dotPeek) produces a .NET Framework project instead of .NET Core one.

JetBrains dotPeek (2022.2.4) tells me that the .dll is for x86 .NETCoreApp v6.0 (that is true), but when I export the .dll to a .csproj file, it creates me a project in .NET Framework and Visual Studio says that this project is based on a framework version that I don't have (of course, .NET Core is not framework dependent, and .NET Framework v6 doesn't exist!).

Am I missing something? What I have to do to produce a .csproj in .NET Core?

Upvotes: 1

Views: 1544

Answers (1)

Blindy
Blindy

Reputation: 67380

All that matters is that it produced the source code. If you're lucky, it might even be compilable!

Simply create your own .NET 6 project and use it with the source code files. It's really easy, since modern C# project files don't specify files, they recursively glob all files found.

Upvotes: 3

Related Questions