Merging WS.Net45.Tests + WS.NetCore.Tests + WS.Shared.Tests = WS.Tests (#1828)

* Merging WS.Net45.Tests + WS.NetCore.Tests + WS.Shared.Tests = WS.Tests

* updating web.sln and removing unused using

* Re-adding missing dll; adding new assert to prevent dll exclusion
This commit is contained in:
Eddy Nakamura 2020-04-29 15:58:34 -03:00 коммит произвёл GitHub
Родитель 5ac6bb98d0
Коммит 3efbcb012b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
34 изменённых файлов: 110 добавлений и 301 удалений

Просмотреть файл

@ -119,12 +119,6 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetStandard20Ne
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.Tests", "WEB\Src\PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.shproj", "{9B524BD3-682D-4B6F-9251-D4B2911DF0FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsServer.Net45.Tests", "WEB\Src\WindowsServer\WindowsServer.Net45.Tests\WindowsServer.Net45.Tests.csproj", "{F05EB480-B209-47DD-90E3-1DDC47EFC579}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer.NetCore.Tests", "WEB\Src\WindowsServer\WindowsServer.NetCore.Tests\WindowsServer.NetCore.Tests.csproj", "{74051BFB-87ED-4D99-927F-C40E7717E4E5}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WindowsServer.Shared.Tests", "WEB\Src\WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.shproj", "{7916AE39-AE89-4886-8842-33AC9883905A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) GenericTests", "L) GenericTests", "{D2A0AA36-57F7-436C-A7AF-7322927F1734}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xdt.Tests", "LOGGING\test\Xdt.Tests\Xdt.Tests.csproj", "{262792BF-31A8-4FCD-BBC7-341EB29FAE96}"
@ -179,6 +173,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILogger.Tests", "LOGGING\te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Tests", "WEB\Src\Web\Web.Tests\Web.Tests.csproj", "{D12E8759-8C23-43DC-93D6-A63A8AAB910E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer.Tests", "WEB\Src\WindowsServer\WindowsServer.Tests\WindowsServer.Tests.csproj", "{5F40F661-DE59-4489-ABAC-BE6F2D730D9A}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
WEB\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.projitems*{0196259c-3582-4f4e-a01f-a8f9ae83b0f3}*SharedItemsImports = 13
@ -202,12 +198,10 @@ Global
LOGGING\src\EventSource.Shared\EventSource.Shared\EventSource.Shared.projitems*{52b3c054-c686-4bb8-a4b7-9e8d6c49491f}*SharedItemsImports = 5
WEB\Src\PerformanceCollector\Filtering.Shared\Filtering.Shared.projitems*{568aeb4f-ba4c-47a5-9fa3-68f06cd11fed}*SharedItemsImports = 13
LOGGING\src\CommonShared\CommonShared.projitems*{587b624b-8c64-498e-93d7-a2d2abc17eab}*SharedItemsImports = 13
WEB\Src\TestFramework\Shared\TestFramework.Shared.projitems*{5f40f661-de59-4489-abac-be6f2d730d9a}*SharedItemsImports = 5
LOGGING\src\CommonShared\CommonShared.projitems*{63b8fda7-2ff5-4a20-8de7-ebb036012a54}*SharedItemsImports = 5
LOGGING\src\CommonShared\CommonShared.projitems*{67291093-4b5f-4ca5-a811-b8a1dcbe3f1f}*SharedItemsImports = 5
WEB\Src\TestFramework\Shared\TestFramework.Shared.projitems*{74051bfb-87ed-4d99-927f-c40e7717e4e5}*SharedItemsImports = 5
WEB\Src\WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{74051bfb-87ed-4d99-927f-c40e7717e4e5}*SharedItemsImports = 5
WEB\Src\PerformanceCollector\Perf.Shared.NetStandard16.Stubs\Perf.Shared.NetStandard16.Stubs.projitems*{76b21faa-270d-47de-b14b-bec87edc34f1}*SharedItemsImports = 13
WEB\Src\WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{7916ae39-ae89-4886-8842-33ac9883905a}*SharedItemsImports = 13
LOGGING\test\CommonTestShared\CommonTestShared.projitems*{7a903abd-d7fb-4610-aed8-32eb2cbaeebf}*SharedItemsImports = 5
LOGGING\test\Shared\Adapters.Shared.Tests.projitems*{7a903abd-d7fb-4610-aed8-32eb2cbaeebf}*SharedItemsImports = 5
WEB\Src\Common\Common.projitems*{7b5d95ee-50ee-4222-a03c-fae5905b3dfd}*SharedItemsImports = 5
@ -243,8 +237,6 @@ Global
NETCORE\src\Shared\Shared.projitems*{d56f2979-d6bc-4ef2-bb9b-4077b3290599}*SharedItemsImports = 13
WEB\Src\Common\Common.projitems*{deeaf599-83f9-4a05-add6-f612cdabe570}*SharedItemsImports = 5
BASE\src\Common\Common\Common.projitems*{e3d160e8-7f8c-416f-946f-6fdfc6787461}*SharedItemsImports = 5
WEB\Src\TestFramework\Shared\TestFramework.Shared.projitems*{f05eb480-b209-47dd-90e3-1ddc47efc579}*SharedItemsImports = 4
WEB\Src\WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{f05eb480-b209-47dd-90e3-1ddc47efc579}*SharedItemsImports = 4
WEB\Src\PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.projitems*{f254d4fb-428d-408e-8251-39bca7b4b5ce}*SharedItemsImports = 4
WEB\Src\TestFramework\Shared\TestFramework.Shared.projitems*{f254d4fb-428d-408e-8251-39bca7b4b5ce}*SharedItemsImports = 4
BASE\Test\TestFramework\Shared\TestFramework.Shared.projitems*{f76c6cbd-29b0-4564-bdcb-c969f8fec136}*SharedItemsImports = 13
@ -353,14 +345,6 @@ Global
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Release|Any CPU.Build.0 = Release|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Any CPU.Build.0 = Release|Any CPU
{74051BFB-87ED-4D99-927F-C40E7717E4E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74051BFB-87ED-4D99-927F-C40E7717E4E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74051BFB-87ED-4D99-927F-C40E7717E4E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74051BFB-87ED-4D99-927F-C40E7717E4E5}.Release|Any CPU.Build.0 = Release|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -457,6 +441,10 @@ Global
{D12E8759-8C23-43DC-93D6-A63A8AAB910E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D12E8759-8C23-43DC-93D6-A63A8AAB910E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D12E8759-8C23-43DC-93D6-A63A8AAB910E}.Release|Any CPU.Build.0 = Release|Any CPU
{5F40F661-DE59-4489-ABAC-BE6F2D730D9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F40F661-DE59-4489-ABAC-BE6F2D730D9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F40F661-DE59-4489-ABAC-BE6F2D730D9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F40F661-DE59-4489-ABAC-BE6F2D730D9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -496,9 +484,6 @@ Global
{A8BA3BD0-19CE-488D-B2BD-0B9B677F4E03} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{054C25DC-E545-4712-95C4-81F30CF65CE8} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{9B524BD3-682D-4B6F-9251-D4B2911DF0FD} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{F05EB480-B209-47DD-90E3-1DDC47EFC579} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
{74051BFB-87ED-4D99-927F-C40E7717E4E5} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
{7916AE39-AE89-4886-8842-33AC9883905A} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
{262792BF-31A8-4FCD-BBC7-341EB29FAE96} = {D2A0AA36-57F7-436C-A7AF-7322927F1734}
{058A0843-A95F-4B0D-91DB-33B9D3FD7324} = {E9AEB857-E8AA-4ED6-A020-DF4D8486CEB0}
{B90EDEA5-3CC8-4282-80A0-7116905E2427} = {D8483C3E-C386-48AD-B935-700A54FDCF31}
@ -523,6 +508,7 @@ Global
{689EF12E-3630-4559-BB83-0237C74E8EDB} = {7EC1F6B8-9F94-4947-B596-EB3726C53AE0}
{7A903ABD-D7FB-4610-AED8-32EB2CBAEEBF} = {477A1BA0-0155-404C-A6E0-C2409C0FFE70}
{D12E8759-8C23-43DC-93D6-A63A8AAB910E} = {07076842-9CAA-4B4A-8AEF-88DE88CD37AC}
{5F40F661-DE59-4489-ABAC-BE6F2D730D9A} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0E0415AF-37CC-4999-8E5B-DD36F75BFD4D}

Просмотреть файл

@ -14,10 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DependencyCollector", "Depe
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsServer", "WindowsServer", "{D87119AF-CD35-46F2-84A6-ED54CC42027E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsServer.Net45.Tests", "WindowsServer\WindowsServer.Net45.Tests\WindowsServer.Net45.Tests.csproj", "{F05EB480-B209-47DD-90E3-1DDC47EFC579}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WindowsServer.Shared.Tests", "WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.shproj", "{7916AE39-AE89-4886-8842-33AC9883905A}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DependencyCollector.Shared.Tests", "DependencyCollector\Shared.Tests\DependencyCollector.Shared.Tests.shproj", "{ACE58393-3419-4FCA-87CC-C33EB756C7E4}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TestFramework.Shared.Web", "TestFramework\Shared\TestFramework.Shared.Web.shproj", "{9718F051-147F-4F5F-9FF3-C926430EFCF7}"
@ -49,8 +45,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Perf.NetCore.Tests", "Perfo
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.Tests", "PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.shproj", "{9B524BD3-682D-4B6F-9251-D4B2911DF0FD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer.NetCore.Tests", "WindowsServer\WindowsServer.NetCore.Tests\WindowsServer.NetCore.Tests.csproj", "{003691E1-D908-4F29-A9AA-8A98C878F951}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostingStartup", "HostingStartup\HostingStartup\HostingStartup.csproj", "{80F0481A-66C7-4442-96D3-5FD841132C4B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer", "WindowsServer\WindowsServer\WindowsServer.csproj", "{94127FD9-E516-4891-98D4-EF7523117F32}"
@ -91,10 +85,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostingStartup.Tests", "Hos
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Tests", "Web\Web.Tests\Web.Tests.csproj", "{1231D63B-E7FA-4BA7-9916-FA7325DB936D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer.Tests", "WindowsServer\WindowsServer.Tests\WindowsServer.Tests.csproj", "{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
TestFramework\Shared\TestFramework.Shared.projitems*{003691e1-d908-4f29-a9aa-8a98c878f951}*SharedItemsImports = 5
WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{003691e1-d908-4f29-a9aa-8a98c878f951}*SharedItemsImports = 5
Common\Common.projitems*{00bf736c-b562-4251-9836-ef80282956af}*SharedItemsImports = 5
PerformanceCollector\Filtering.Shared\Filtering.Shared.projitems*{00bf736c-b562-4251-9836-ef80282956af}*SharedItemsImports = 5
PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.projitems*{00bf736c-b562-4251-9836-ef80282956af}*SharedItemsImports = 5
@ -109,7 +103,6 @@ Global
..\..\BASE\src\Common\Common\Common.projitems*{41301181-f4be-4c36-b78d-a29c55cb0469}*SharedItemsImports = 5
PerformanceCollector\Filtering.Shared\Filtering.Shared.projitems*{568aeb4f-ba4c-47a5-9fa3-68f06cd11fed}*SharedItemsImports = 13
PerformanceCollector\Perf.Shared.NetStandard16.Stubs\Perf.Shared.NetStandard16.Stubs.projitems*{76b21faa-270d-47de-b14b-bec87edc34f1}*SharedItemsImports = 13
WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{7916ae39-ae89-4886-8842-33ac9883905a}*SharedItemsImports = 13
Common\Common.projitems*{80f0481a-66c7-4442-96d3-5fd841132c4b}*SharedItemsImports = 5
Common\Common.projitems*{94127fd9-e516-4891-98d4-ef7523117f32}*SharedItemsImports = 5
Common\Common.projitems*{95d90911-2909-4914-920e-7710f7bb6c32}*SharedItemsImports = 5
@ -122,13 +115,12 @@ Global
PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.projitems*{ac7d8533-c823-4e93-b008-51b3c4744e2e}*SharedItemsImports = 5
TestFramework\Shared\TestFramework.Shared.projitems*{ac7d8533-c823-4e93-b008-51b3c4744e2e}*SharedItemsImports = 5
DependencyCollector\Shared.Tests\DependencyCollector.Shared.Tests.projitems*{ace58393-3419-4fca-87cc-c33eb756c7e4}*SharedItemsImports = 13
TestFramework\Shared\TestFramework.Shared.projitems*{caf98d8b-9202-4cc3-83ec-c384d8eea792}*SharedItemsImports = 5
Common\Common.projitems*{ccab7a34-8dc5-4a6f-b637-46ceba93c687}*SharedItemsImports = 13
PerformanceCollector\Perf.Shared.NetStandard\Perf.Shared.NetStandard.projitems*{d13c3ec7-b300-4158-9054-216156b203be}*SharedItemsImports = 13
PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.projitems*{d5efa02a-971e-477c-896b-c3aa93093267}*SharedItemsImports = 5
TestFramework\Shared\TestFramework.Shared.projitems*{d5efa02a-971e-477c-896b-c3aa93093267}*SharedItemsImports = 5
Common\Common.projitems*{e166d200-0687-4e6d-b836-029ae690aeab}*SharedItemsImports = 5
TestFramework\Shared\TestFramework.Shared.projitems*{f05eb480-b209-47dd-90e3-1ddc47efc579}*SharedItemsImports = 4
WindowsServer\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems*{f05eb480-b209-47dd-90e3-1ddc47efc579}*SharedItemsImports = 4
PerformanceCollector\Perf.Shared.Tests\Perf.Shared.Tests.projitems*{f254d4fb-428d-408e-8251-39bca7b4b5ce}*SharedItemsImports = 4
TestFramework\Shared\TestFramework.Shared.projitems*{f254d4fb-428d-408e-8251-39bca7b4b5ce}*SharedItemsImports = 4
EndGlobalSection
@ -139,14 +131,6 @@ Global
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Any CPU.Build.0 = Release|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F05EB480-B209-47DD-90E3-1DDC47EFC579}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F254D4FB-428D-408E-8251-39BCA7B4B5CE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -171,14 +155,6 @@ Global
{D5EFA02A-971E-477C-896B-C3AA93093267}.Release|Any CPU.Build.0 = Release|Any CPU
{D5EFA02A-971E-477C-896B-C3AA93093267}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D5EFA02A-971E-477C-896B-C3AA93093267}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Debug|Any CPU.Build.0 = Debug|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Release|Any CPU.ActiveCfg = Release|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Release|Any CPU.Build.0 = Release|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{003691E1-D908-4F29-A9AA-8A98C878F951}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{80F0481A-66C7-4442-96D3-5FD841132C4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80F0481A-66C7-4442-96D3-5FD841132C4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80F0481A-66C7-4442-96D3-5FD841132C4B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -283,13 +259,19 @@ Global
{1231D63B-E7FA-4BA7-9916-FA7325DB936D}.Release|Any CPU.Build.0 = Release|Any CPU
{1231D63B-E7FA-4BA7-9916-FA7325DB936D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1231D63B-E7FA-4BA7-9916-FA7325DB936D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Release|Any CPU.Build.0 = Release|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F05EB480-B209-47DD-90E3-1DDC47EFC579} = {D87119AF-CD35-46F2-84A6-ED54CC42027E}
{7916AE39-AE89-4886-8842-33AC9883905A} = {D87119AF-CD35-46F2-84A6-ED54CC42027E}
{ACE58393-3419-4FCA-87CC-C33EB756C7E4} = {DF56FBAD-8745-404B-94A1-E83BFC4AD7CB}
{9718F051-147F-4F5F-9FF3-C926430EFCF7} = {8CA9F9C9-DA39-4159-86F3-C52F1636715E}
{F254D4FB-428D-408E-8251-39BCA7B4B5CE} = {A318CC6C-51C8-4BD6-BC85-2B4F35123BE7}
@ -298,7 +280,6 @@ Global
{568AEB4F-BA4C-47A5-9FA3-68F06CD11FED} = {A318CC6C-51C8-4BD6-BC85-2B4F35123BE7}
{D5EFA02A-971E-477C-896B-C3AA93093267} = {A318CC6C-51C8-4BD6-BC85-2B4F35123BE7}
{9B524BD3-682D-4B6F-9251-D4B2911DF0FD} = {A318CC6C-51C8-4BD6-BC85-2B4F35123BE7}
{003691E1-D908-4F29-A9AA-8A98C878F951} = {D87119AF-CD35-46F2-84A6-ED54CC42027E}
{80F0481A-66C7-4442-96D3-5FD841132C4B} = {701D2D4F-B581-45A2-AF29-4F34EC5F047B}
{94127FD9-E516-4891-98D4-EF7523117F32} = {D87119AF-CD35-46F2-84A6-ED54CC42027E}
{E166D200-0687-4E6D-B836-029AE690AEAB} = {1A75535C-B8E5-4C31-BC6E-50456C8C4052}
@ -316,6 +297,7 @@ Global
{0196259C-3582-4F4E-A01F-A8F9AE83B0F3} = {A318CC6C-51C8-4BD6-BC85-2B4F35123BE7}
{7592A20A-1775-4479-B624-7275173E9821} = {701D2D4F-B581-45A2-AF29-4F34EC5F047B}
{1231D63B-E7FA-4BA7-9916-FA7325DB936D} = {1A75535C-B8E5-4C31-BC6E-50456C8C4052}
{CAF98D8B-9202-4CC3-83EC-C384D8EEA792} = {D87119AF-CD35-46F2-84A6-ED54CC42027E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F99E0A07-C363-49BF-BFA7-C748391CE38E}

Просмотреть файл

@ -1,116 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<RuntimeIdentifier>win</RuntimeIdentifier>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F05EB480-B209-47DD-90E3-1DDC47EFC579}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.ApplicationInsights.WindowsServer</RootNamespace>
<AssemblyName>WindowsServer.Net45.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\System.Buffers.4.5.1\lib\netstandard1.1\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\System.Diagnostics.DiagnosticSource.4.6.0\lib\net45\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.EnterpriseServices">
<Private>True</Private>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\System.Memory.4.5.4\lib\netstandard1.1\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\..\..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Azure\Emulation\Microsoft.WindowsAzure.ServiceRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj">
<Project>{e3d160e8-7f8c-416f-946f-6fdfc6787461}</Project>
<Name>Microsoft.ApplicationInsights</Name>
</ProjectReference>
<ProjectReference Include="..\WindowsServer\WindowsServer.csproj">
<Project>{94127fd9-e516-4891-98d4-ef7523117f32}</Project>
<Name>WindowsServer</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Azure\Emulation\Microsoft.WindowsAzure.ServiceRuntime.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="AzureRoleEnvironmentTelemetryInitializerTest.cs" />
<Compile Include="Azure\Emulation\TestAzureServiceRuntimeAssemblyLoader.cs" />
<Compile Include="Azure\Emulation\TestRole.cs" />
<Compile Include="Azure\Emulation\TestRoleInstance.cs" />
<Compile Include="Azure\ServiceRuntimeHelper.cs" />
<Compile Include="DeviceTelemetryInitializerTest.cs" />
<Compile Include="FirstChanceExceptionStatisticsTelemetryModuleTest.cs" />
<Compile Include="Implementation\ServiceRuntimeTests.cs" />
<Compile Include="Implementation\WindowsServerEventSourceTests.cs" />
<Compile Include="UnhandledExceptionTelemetryModuleTest.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Microsoft.ApplicationInsights.Log4NetAppender.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\TestFramework\Shared\TestFramework.Shared.projitems" Label="Shared" />
<Import Project="..\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems" Label="Shared" />
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Просмотреть файл

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Buffers" version="4.5.1" targetFramework="net45" />
<package id="System.Diagnostics.DiagnosticSource" version="4.6.0" targetFramework="net45" />
<package id="System.Memory" version="4.5.4" targetFramework="net45" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net45" />
<package id="xunit" version="2.1.0" targetFramework="net45" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
<package id="xunit.assert" version="2.1.0" targetFramework="net45" />
<package id="xunit.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" />
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" />
</packages>

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>7916ae39-ae89-4886-8842-33ac9883905a</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Microsoft.ApplicationInsights.WindowsServer</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AppServicesHeartbeatTelemetryModuleTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)EnvironmentVariableMonitorTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)AzureInstanceMetadataEndToEndTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)AzureWebAppRoleEnvironmentTelemetryInitializerTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)AzureInstanceMetadataTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)BuildInfoConfigComponentVersionTelemetryInitializerTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DeveloperModeWithDebuggerAttachedTelemetryModuleTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Mock\AzureInstanceMetadataRequestMock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Mock\AzureInstanceMetadataServiceMock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Mock\HeartbeatProviderMock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Mock\MockEnvironmentVariableMonitor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Mock\NetPlatformHttpResponseTypesExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UnobservedExceptionTelemetryModuleTest.cs" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>7916ae39-ae89-4886-8842-33ac9883905a</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="WindowsServer.Shared.Tests.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
{
using System;
using System.Globalization;
@ -47,3 +48,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
{
using System;
@ -31,3 +32,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation
{
using System;
using System.Globalization;
@ -52,3 +53,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Azure
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Azure
{
using System;
using System.IO;
@ -57,3 +58,4 @@
public static string TestWithServiceRuntimePath { get; set; }
}
}
#endif

Просмотреть файл

@ -9,7 +9,7 @@ namespace Microsoft.ApplicationInsights.WindowsServer
using Microsoft.ApplicationInsights.WindowsServer.Implementation;
using Microsoft.ApplicationInsights.WindowsServer.Implementation.DataContracts;
using Microsoft.ApplicationInsights.WindowsServer.Mock;
#if NETCORE
#if NETCOREAPP
using Microsoft.AspNetCore.Http;
#endif
using Microsoft.VisualStudio.TestTools.UnitTesting;

Просмотреть файл

@ -1,10 +1,11 @@
namespace Microsoft.ApplicationInsights.WindowsServer
{
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer
{
using System;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
using Microsoft.ApplicationInsights.WindowsServer.Azure;
@ -16,7 +17,7 @@
[TestClass]
public class AzureRoleEnvironmentTelemetryInitializerTest
{
{
[TestMethod]
public void AzureRoleEnvironmentTelemetryInitializerDoesNotOverrideRoleName()
{
@ -32,7 +33,7 @@
[TestMethod]
public void AzureRoleEnvironmentTelemetryInitializerDoesNotOverrideRoleInstance()
{
var telemetryItem = new EventTelemetry();
var telemetryItem = new EventTelemetry();
AzureRoleEnvironmentTelemetryInitializer initializer = new AzureRoleEnvironmentTelemetryInitializer();
telemetryItem.Context.Cloud.RoleInstance = "Test";
initializer.Initialize(telemetryItem);
@ -54,7 +55,7 @@
[TestMethod]
public void AzureRoleEnvironmentTelemetryInitializerSetsTelemetryContextPropertiesToNullWhenNotRunningInsideAzureCloudService()
{
{
// This test asssumes that it is not running inside a cloud service.
// Its Ok even if Azure ServiceRunTime dlls are in the GAC, as IsAvailable() will return false, and hence
// no context will be further attempted to be read.
@ -62,7 +63,7 @@
AzureRoleEnvironmentContextReader.Instance = null;
AzureRoleEnvironmentContextReader.AssemblyLoaderType = null;
AzureRoleEnvironmentTelemetryInitializer initializer = new AzureRoleEnvironmentTelemetryInitializer();
initializer.Initialize(telemetryItem);
initializer.Initialize(telemetryItem);
Assert.Null(telemetryItem.Context.Cloud.RoleName);
Assert.Null(telemetryItem.Context.Cloud.RoleInstance);
@ -93,13 +94,15 @@
}
}
[TestMethod]
[TestMethod]
[Description("Validates that requested DLL was loaded into separate AppDomain and not to the current domain. This test will fail if not run with admin privileges.")]
public void AzureRoleEnvironmentTelemetryInitializerLoadDllToSeparateAppDomain()
{
// A random dll which is not already loaded to the current AppDomain but dropped into bin folder.
string dllPath = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "Microsoft.ApplicationInsights.Log4NetAppender.dll");
Assert.True(File.Exists(dllPath));
try
{
// Publish the dll to GAC to give a chance for AzureRoleEnvironmentTelemetryInitializer to load it to a new AppDomain
@ -108,7 +111,7 @@
// Validate that the dll is not loaded to test AppDomaion to begin with.
var retrievedAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(item => string.Equals(item.GetName().Name, "Microsoft.ApplicationInsights.Log4NetAppender", StringComparison.OrdinalIgnoreCase));
Assert.Null(retrievedAssembly);
// TestAssemblyLoader will load a random assembly (Microsoft.ApplicationInsights.Log4NetAppender.dll) and populate TestRoleName, TestRoleInstanceId into the fields.
AzureRoleEnvironmentContextReader.AssemblyLoaderType = typeof(TestAzureServiceRuntimeAssemblyLoader);
AzureRoleEnvironmentContextReader.Instance = null;
@ -124,7 +127,7 @@
var telemetryItem = new EventTelemetry();
initializer.Initialize(telemetryItem);
Assert.Equal("TestRoleName", telemetryItem.Context.Cloud.RoleName);
Assert.Equal("TestRoleInstanceId", telemetryItem.Context.Cloud.RoleInstance);
Assert.Equal("TestRoleInstanceId", telemetryItem.Context.Cloud.RoleInstance);
}
finally
{
@ -133,3 +136,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,18 +1,12 @@
namespace Microsoft.ApplicationInsights.WindowsServer
{
using System;
using System.Globalization;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
#if !NETCORE
using Microsoft.ApplicationInsights.WindowsServer.Azure;
using Microsoft.ApplicationInsights.WindowsServer.Azure.Emulation;
#endif
using Microsoft.ApplicationInsights.WindowsServer.Implementation;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Assert = Xunit.Assert;
[TestClass]
public class AzureWebAppRoleEnvironmentTelemetryInitializerTest
{

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer
{
using System;
using System.Globalization;
@ -35,3 +36,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer
{
using System;
using System.Collections.Concurrent;
@ -850,3 +851,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Implementation
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Implementation
{
using System;
using System.Globalization;
@ -147,3 +148,4 @@
}
}
}
#endif

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer.Implementation
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer.Implementation
{
using Microsoft.ApplicationInsights.Web.TestFramework;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -13,3 +14,4 @@
}
}
}
#endif

Просмотреть файл

@ -4,7 +4,7 @@
using System.Net;
using System.Threading;
using System.Threading.Tasks;
#if NETCORE
#if NETCOREAPP
using System.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@ -13,14 +13,14 @@
internal class AzureInstanceMetadataServiceMock : IDisposable
{
#if NETCORE
#if NETCOREAPP
private readonly IWebHost host;
#else
private readonly HttpListener listener;
#endif
private readonly CancellationTokenSource cts;
#if NETCORE
#if NETCOREAPP
internal AzureInstanceMetadataServiceMock(string baseUrl, string testName, Action<HttpResponse> onRequest = null)
{
@ -72,7 +72,7 @@
public void Dispose()
{
this.cts.Cancel(false);
#if NETCORE
#if NETCOREAPP
this.host.Dispose();
#else
this.listener.Abort();
@ -81,7 +81,7 @@
this.cts.Dispose();
}
#if NETCORE
#if NETCOREAPP
public class ResponseHandlerMock
{

Просмотреть файл

@ -3,7 +3,7 @@
using System.IO;
using System.Net;
using System.Text;
#if NETCORE
#if NETCOREAPP
using Microsoft.AspNetCore.Http;
#endif
@ -12,7 +12,7 @@
/// </summary>
internal static class NetPlatformHttpResponseTypesExtension
{
#if NETCORE
#if NETCOREAPP
public static void SetContentLength(this HttpResponse resp, long len)
{
@ -44,8 +44,6 @@
{
resp.ContentEncoding = enc;
}
#else
#error Unkown framework
#endif
}
}

Просмотреть файл

@ -1,4 +1,5 @@
namespace Microsoft.ApplicationInsights.WindowsServer
#if NET45
namespace Microsoft.ApplicationInsights.WindowsServer
{
using System;
using System.Collections.Generic;
@ -13,10 +14,7 @@
using Microsoft.ApplicationInsights.Web.TestFramework;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Assert = Xunit.Assert;
#if NET45
using TaskEx = System.Threading.Tasks.Task;
#endif
[TestClass]
public class UnhandledExceptionTelemetryModuleTest
@ -193,3 +191,4 @@
}
}
}
#endif

Просмотреть файл

@ -3,35 +3,24 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), NetCore.props))\NetCore.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<AssemblyName>Microsoft.AI.WindowsServer.NetCore.Tests</AssemblyName>
<PackageId>Microsoft.AI.WindowsServer.NetCore.Tests</PackageId>
<AssemblyName>Microsoft.AI.WindowsServer.Tests</AssemblyName>
<PackageId>Microsoft.AI.WindowsServer.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<RootNamespace>Microsoft.ApplicationInsights.Tests</RootNamespace>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>TRACE;RELEASE;NETCORE;NETCOREAPP1_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>TRACE;DEBUG;NETCORE;NETCOREAPP1_0</DefineConstants>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="NETStandard.HttpListener" Version="1.0.2" />
<PackageReference Include="System.Diagnostics.StackTrace" Version="4.3.0" />
<PackageReference Include="xunit.abstractions" Version="2.0.1" />
<PackageReference Include="xunit.assert" Version="2.3.1" />
<PackageReference Include="xunit.core" Version="2.3.1" />
@ -39,16 +28,43 @@
<PackageReference Include="xunit.extensibility.execution" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System" />
<Reference Include="System.EnterpriseServices">
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime">
<HintPath>Azure\Emulation\Microsoft.WindowsAzure.ServiceRuntime.dll</HintPath>
</Reference>
<EmbeddedResource Include="Azure\Emulation\Microsoft.WindowsAzure.ServiceRuntime.dll" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
<PackageReference Include="NETStandard.HttpListener" Version="1.0.2" />
<PackageReference Include="System.Diagnostics.StackTrace" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WindowsServer\WindowsServer.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Microsoft.ApplicationInsights.Log4NetAppender.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="..\..\TestFramework\Shared\TestFramework.Shared.projitems" Label="Shared" />
<Import Project="..\WindowsServer.Shared.Tests\WindowsServer.Shared.Tests.projitems" Label="Shared" />
</Project>

Просмотреть файл

@ -1,8 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("WindowsServer.Net45.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("Microsoft.AI.WindowsServer.NetCore.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("Microsoft.AI.WindowsServer.Tests, PublicKey=" + AssemblyInfo.PublicKey)]
internal static class AssemblyInfo
{