Share via

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 | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

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.

    Was this answer helpful?


Your answer

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