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

后端 未结 3 1836
迷失自我
迷失自我 2020-12-22 21:25

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


    

        
3条回答
  •  醉梦人生
    2020-12-22 22:10

    Personally I don't like this service added to my project files and I think having it is more like a workaround rather than a proper solution. So marking your test projects as test projects seems more correct to me and this can be achieved by adding this to the first PropertyGroup:

    {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    UnitTest
    

    {3AC096D0-A1C2-E12C-1390-A8335801FDAB} means Test Project and {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - C#. For other project type guids go here

提交回复
热议问题