I am creating Nunit Project using Target Framework 4.6.1 while I use targets for Other project using (Microsoft.CSharp.Targets) getting 4.0 as targets

Naveen 0 Reputation points
2024-08-19T06:49:41.0666667+00:00
  1. Created a Project Infrastructure (Which will be common for all projects under a directory)
  2. In Csproj file mentioned
  3. I have Created Other Project and added Project Infrastructure as Reference,
  4. In Csproj mentioned
Developer technologies .NET Other
Developer technologies Visual Studio Other
Developer technologies C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. williamoliver 5 Reputation points
    2024-08-19T09:01:55.6+00:00

    To create a shared project infrastructure for multiple projects, you can define the common infrastructure in one project and then reference it in other projects. In the .csproj file of the infrastructure project, include all necessary configurations. In the .csproj file of the other projects, add a reference to the infrastructure project using the <ProjectReference> tag, pointing to the infrastructure project's path. This allows all the projects to utilize the shared infrastructure seamlessly.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.