You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a ProjectSection(ProjectDependencies) = postProject to a solution will cause an error when publishing from the CLI if the project has <TargetFrameworks> instead of <TargetFramework>. This can be done in Visual Studio by right-clicking a project->Build Dependencies->Project Dependencies... and checking a project that isn't a dependency.
This feature is nice to build dynamically loaded assemblies that aren't direct build dependencies in a solution.
Hm. Did I do this wrong? I thought the sample project would get someone smart in this stuff to post most specifics... What should I have done to get someone to look at this?
to my main project, but now NotDirectReference.dll doesn't show up in the publish location. This isn't my desired behavior.
I decided to single target my projects to <TargetFramework>net5.0</> with <LangVersion>7.3</> and enforce dual compatibility in my pipeline. This worked for a few weeks until I had buy-off to single target the newest version.
I also thought about taking a direct reference to the NotDirectReference project and using DependencyValidation to verify my project didn't create any code references.
Bottom line: I got around this and I doubt many will be tripped up by it, but this is still a bug when publishing dual targeted solutions.
Adding a
ProjectSection(ProjectDependencies) = postProject
to a solution will cause an error when publishing from the CLI if the project has<TargetFrameworks>
instead of<TargetFramework>
. This can be done in Visual Studio by right-clicking a project->Build Dependencies->Project Dependencies... and checking a project that isn't a dependency.This feature is nice to build dynamically loaded assemblies that aren't direct build dependencies in a solution.
Here is a simple solution that demonstrates the problem:
https://github.com/Best-Practice0/DotnetPublishProblem/tree/master
The text was updated successfully, but these errors were encountered: