• 1
name Punditsdkoslkdosdkoskdo

What is “Service Include” in a csproj file for?

In a C# solution, I added a existing project.
After that, Visual Studio has added the following entry in other .csproj files:

    <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />

What's this for?
Can I delete it?

I had a similar case, where this was added:

  <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />

This inclusion turns out to be generated on purpose by VS2013 if you create an NUnit test project, but forget to tag it as test project, as described in this answerfrom Microsoft:

This behavior is intentional.

To support third-party test frameworks, like NUnit and XUnit, Visual Studio 2012 loaded Test Explorer on solution open, regardless of whether it contained test projects. This added seconds of delay to startup and solution open scenarios for all users, majority of whom don't use tests.

In Visual Studio 2013, we changed it so that Test Explorer package is loaded only when the solution contains one or more test projects. Test projects are identified in two different ways. Projects created from one of the built-in unit test project templates are identified using project type GUIDs. Other types of projects, such as Class Library project with XUnit or NUnit tests, are identified by Test Explorer during first test discovery and “tagged” with the <Service/>item.

  • 0
Reply Report

Related Questions

Trending Tags