This is a follow-up to another question.
I have a migrated .NET framework project which I'm trying to package using msbuild -t:pack
and the corresponding NuGet.Build.Tasks.Pack
.
I have included all of my NuGet information in the *.csproj
-file, like so:
<TargetFramework>net48</TargetFramework> <!-- Error! -->
<PackageId>Testcenter.RobotFramework</PackageId>
<Version>1.0.0</Version>
<Authors>Testcenter Team, Some person</Authors>
<Company>Some company</Company>
<PackageOutputPath>$(ProjectDir)</PackageOutputPath>
<Description>A class library to implement a remote library interface conforming to RobotFramework.</Description>
<Title>RobotFramework Remote-Library-Interface for C#</Title>
<Copyright>Copyright (c) Some company 2022</Copyright>
<RepositoryUrl>https://redacted-url.com/repos/testcenter.robotframework/browse</RepositoryUrl>
<Product>Testcenter.RobotFramework</Product>
<AssemblyVersion>1.0.0</AssemblyVersion>
<FileVersion>1.0.0</FileVersion>
Due to an error I am unable to use the TargetFramework
property, normally used in SDK-style projects.
How do I add that property or anything for that matter, so that NuGet recognizes that I target net48
and shows that information in the packaged project?
I was not able to find information about this in the target frameworks documentation, because it only speaks of SDK-style projects, and apparently I cannot use their attributes in the project. Also, I did not find a similar documentation meant for Non-SDK projects.