microsoft / coe-starter-kit

Other
751 stars 223 forks source link

[ALM Accelerator - QUESTION] How to include unit tests #5471

Closed sefa-phaag closed 1 year ago

sefa-phaag commented 1 year ago

What is your question?

What is the proper way to include unit tests from source code as part of the build pipeline? There doesn't seem to be any part of the process that actually builds the unit test assembly, so the VSTest runner pipeline task does nothing because there isn't a built DLL. I guess I can probably add the PowerAppsTargetsPath value to the csproj file, which I think would build it, but I don't really want the test DLL to actually get deployed as part of the solution file.

The documentation I could find on this (https://learn.microsoft.com/en-us/power-platform/guidance/alm-accelerator/build-package-codefirst-components) was pretty limited and didn't mention tests at all.

What component are you experiencing the issue with?

ALM Accelerator Pipelines

What solution version are you using?

April 2023

RajeevPentyala commented 1 year ago

@sefa-phaag Thanks for reporting. Unit tests functionality needs to be adjusted as the logic was built prior to the cdsproj approach. We will be updating the functionality which will be available in upcoming release.

Please make sure your unit test project names ends with 'Tests'. Example: PCAT.Plugins.Tests.csproj, MyCodeFirst.Tests.csproj.

CoEStarterKitBot commented 1 year ago

@sefa-phaag This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.

sefa-phaag commented 1 year ago

Can someone answer the question though or point me in the direction of documentation on how this was addressed? The documentation I linked to in the original question seems to be the same.

RajeevPentyala commented 1 year ago

Can someone answer the question though or point me in the direction of documentation on how this was addressed? The documentation I linked to in the original question seems to be the same.

@sefa-phaag Commit your plugin and unit test projects under Repo -> Solution folder. The build pipeline will read the projects, build and run the unit test cases and publish the results.

image

For the sample folder structure, please refer here

Please note that, the latest build releasing today and the documentation publish will take little longer time.

sefa-phaag commented 1 year ago

@RajeevPentyala I'm getting a build error trying to do this

Input file does not exist: D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\packages.config.

I don't have a packages.config file because my project file uses PackageReferences (that's how the default .csproj file is when you use pac plugin init

RajeevPentyala commented 1 year ago

@RajeevPentyala I'm getting a build error trying to do this

Input file does not exist: D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\packages.config.

I don't have a packages.config file because my project file uses PackageReferences (that's how the default .csproj file is when you use pac plugin init

@sefa-phaag Can you please provide following details to troubleshoot?

sefa-phaag commented 1 year ago

@RajeevPentyala

I'm getting the error during the "Restore NuGet packages to run unit test cases" step. Full log:

Starting: Restore NuGet packages to run unit test cases
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.220.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\41fc172f-c39a-4bc1-9097-80aba9c5fd9b.ps1'"
Restoring NuGet packages for project - D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\SEFAPlugins.csproj
Input file does not exist: D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\packages.config.
Restoring NuGet packages for project - D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj
Input file does not exist: D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\packages.config.
##[error]PowerShell exited with code '1'.
Finishing: Restore NuGet packages to run unit test cases

I am not using Dependent Assemblies and my project name doesn't contain a period other than the one delineating the extension.

I am, however, using NuGet PackageReference tags rather than packages.config, primarily because that's how the project is configured when you run pac plugin init and, honestly, I can't figure out how to get Visual Studio to use packages.config instead. I think it might be because SDK-style projects are incompatible with packages.config, at least according to the top answer on this post.

Just to appease the pipeline I created a packages.config file with the same references in it and was able to get past the restore, but it's still failing during the build process (Build cs projects) due to, "Error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?)," so I guess I must still be missing some implicit dependency.


Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreGenerateAssemblyInfo:
Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  SEFAPlugins -> D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\bin\Debug\net462\SEFAPlugins.dll
_CopyResolvedFilesToPublishPreserveNewest:
Skipping target "_CopyResolvedFilesToPublishPreserveNewest" because all output files are up-to-date with respect to the input files.
Publish:
  SEFAPlugins -> D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\bin\Debug\net462\publish\
Project "D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\SEFAPlugins.csproj" (2:6) is building "D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\SEFAPlugins.csproj" (2:7) on node 1 (_GetBuildOutputFilesWithTfm target(s)).
GetTfmPublishedFiles:
  GetTfmPublishedFiles from: bin\Debug\net462\publish\
Done Building Project "D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\SEFAPlugins.csproj" (_GetBuildOutputFilesWithTfm target(s)).
GenerateNuspec:
Skipping target "GenerateNuspec" because all output files are up-to-date with respect to the input files.
Done Building Project "D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\SEFAPlugins.csproj" (default targets).
CoreCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,IL2121,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;DEBUG;NETFRAMEWORK;NET462;NET20_OR_GREATER;NET30_OR_GREATER;NET35_OR_GREATER;NET40_OR_GREATER;NET45_OR_GREATER;NET451_OR_GREATER;NET452_OR_GREATER;NET46_OR_GREATER;NET461_OR_GREATER;NET462_OR_GREATER /highentropyva+ /reference:C:\Users\VssAdministrator\.nuget\packages\castle.core\5.1.1\lib\net462\Castle.Core.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.bcl.asyncinterfaces\6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.crmsdk.coreassemblies\9.0.2.49\lib\net462\Microsoft.Crm.Sdk.Proxy.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.identitymodel.clients.activedirectory\3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.identitymodel.clients.activedirectory\3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.rest.clientruntime\2.3.20\lib\net461\Microsoft.Rest.ClientRuntime.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.codecoverage\17.5.0\lib\net462\Microsoft.VisualStudio.CodeCoverage.Shim.dll /reference:C:\Users\VssAdministrator\.nuget\packages\mstest.testframework\3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll /reference:C:\Users\VssAdministrator\.nuget\packages\mstest.testframework\3.0.2\lib\net462\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.crmsdk.deployment\9.0.2.25\lib\net462\Microsoft.Xrm.Sdk.Deployment.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.crmsdk.coreassemblies\9.0.2.49\lib\net462\Microsoft.Xrm.Sdk.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.crmsdk.workflow\9.0.2.49\lib\net462\Microsoft.Xrm.Sdk.Workflow.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.crmsdk.xrmtooling.coreassembly\9.1.1.32\lib\net462\Microsoft.Xrm.Tooling.Connector.dll /reference:C:\Users\VssAdministrator\.nuget\packages\moq\4.18.4\lib\net462\Moq.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\mscorlib.dll /reference:C:\Users\VssAdministrator\.nuget\packages\newtonsoft.json\13.0.1\lib\net45\Newtonsoft.Json.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\PresentationFramework.dll /reference:"D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\Code\bin\Debug\net462\SEFAPlugins.dll" /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Activities.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Activities.Presentation.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.buffers\4.5.1\ref\net45\System.Buffers.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Configuration.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Core.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Data.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.DirectoryServices.AccountManagement.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.DirectoryServices.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Drawing.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.IdentityModel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.IO.Compression.FileSystem.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Net.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Net.Http.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Net.Http.WebRequest.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Numerics.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.numerics.vectors\4.5.0\ref\net46\System.Numerics.Vectors.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.runtime.compilerservices.unsafe\6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Runtime.Serialization.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Security.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.ServiceModel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.ServiceModel.Web.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.text.encodings.web\6.0.0\lib\net461\System.Text.Encodings.Web.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.text.json\6.0.7\lib\net461\System.Text.Json.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.threading.tasks.extensions\4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\system.valuetuple\4.5.0\ref\net461\System.ValueTuple.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Web.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Web.Services.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Workflow.Activities.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Workflow.ComponentModel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Workflow.Runtime.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Xml.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\System.Xml.Linq.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Collections.Concurrent.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Collections.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ComponentModel.Annotations.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ComponentModel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ComponentModel.EventBasedAsync.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Diagnostics.Contracts.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Diagnostics.Debug.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Diagnostics.Tools.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Diagnostics.Tracing.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Dynamic.Runtime.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Globalization.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.IO.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Linq.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Linq.Expressions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Linq.Parallel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Linq.Queryable.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Net.NetworkInformation.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Net.Primitives.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Net.Requests.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Net.WebHeaderCollection.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ObjectModel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.Emit.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.Emit.ILGeneration.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.Emit.Lightweight.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.Extensions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Reflection.Primitives.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Resources.ResourceManager.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Extensions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Handles.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.InteropServices.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.InteropServices.WindowsRuntime.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Numerics.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Json.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Primitives.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Runtime.Serialization.Xml.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Security.Principal.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ServiceModel.Duplex.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ServiceModel.Http.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ServiceModel.NetTcp.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ServiceModel.Primitives.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.ServiceModel.Security.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Text.Encoding.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Text.Encoding.Extensions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Text.RegularExpressions.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Threading.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Threading.Tasks.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Threading.Tasks.Parallel.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Threading.Timer.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Xml.ReaderWriter.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Xml.XDocument.dll /reference:C:\Users\VssAdministrator\.nuget\packages\microsoft.netframework.referenceassemblies.net462\1.0.3\build\.NETFramework\v4.6.2\Facades\System.Xml.XmlSerializer.dll /debug+ /debug:portable /filealign:512 /keyfile:UnitTests.snk /optimize- /out:obj\Debug\net462\UnitTests.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output /deterministic+ /langversion:7.3 /analyzerconfig:obj\Debug\net462\UnitTests.GeneratedMSBuildEditorConfig.editorconfig /analyzer:C:\Users\VssAdministrator\.nuget\packages\system.text.json\6.0.7\analyzers\dotnet\roslyn4.0\cs\System.Text.Json.SourceGeneration.dll CreateStatDaysTest.cs EquipmentSortTest.cs EquipmentUsage.cs ExpandNumberRangeTests.cs packages\Microsoft.NET.Test.Sdk.17.5.0\build\netcoreapp3.1\Microsoft.NET.Test.Sdk.Program.cs PartialTestSave.cs PrioirtyTests.cs StatTests.cs TestBatch.cs TestRemaining.cs TestSampleTransfer.cs TestsToRun.cs TestTests.cs UsesSinceCalibration.cs "obj\Debug\net462\.NETFramework,Version=v4.6.2.AssemblyAttributes.cs" obj\Debug\net462\UnitTests.AssemblyInfo.cs /warnaserror+:NU1605
##[error]SEFAModelDriven\Plugins\UnitTests\packages\Microsoft.NET.Test.Sdk.17.5.0\build\netcoreapp3.1\Microsoft.NET.Test.Sdk.Program.cs(3,25): Error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?)
D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\packages\Microsoft.NET.Test.Sdk.17.5.0\build\netcoreapp3.1\Microsoft.NET.Test.Sdk.Program.cs(3,25): error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) [D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj]
  CompilerServer: server - server processed compilation - 672569c4-31c7-42ff-af3d-00f8d0d09004
Done Building Project "D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj" (build target(s)) -- FAILED.

Build FAILED.

"D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj" (build target) (1:7) ->
(CoreCompile target) -> 
  D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\packages\Microsoft.NET.Test.Sdk.17.5.0\build\netcoreapp3.1\Microsoft.NET.Test.Sdk.Program.cs(3,25): error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) [D:\a\1\s\SEFA Model Driven\SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:08.16
##[error]Process 'msbuild.exe' exited with code '1'.
Finishing: Build cs projects

SEFAPlugins.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net462</TargetFramework>
    <PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <FileVersion>1.0.0.0</FileVersion>
    <ProjectTypeGuids>{4C25E9B5-9FA6-436c-8E19-B395D2A65FAF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  </PropertyGroup>

  <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.props')" />

  <!--
    NuGet pack and restore as MSBuild targets reference:
    https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets
  -->
  <PropertyGroup>
    <PackageId>Plugins</PackageId>
    <Version>$(FileVersion)</Version>
    <Authors>paul.haag</Authors>
    <Company>MyCompany</Company>
    <Description>This is a sample nuget package which contains a Dataverse plugin and its runtime dependencies like Newtonsoft.Json</Description>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="9.0.2.*" PrivateAssets="All" />
    <PackageReference Include="Microsoft.CrmSdk.Workflow" Version="9.0.2.49" />
    <PackageReference Include="Microsoft.PowerApps.MSBuild.Plugin" Version="1.*" PrivateAssets="All" />
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.*" PrivateAssets="All" />
  </ItemGroup>

  <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.targets')" />
</Project>

My hand-built packages.config for the plugins project

<?xml version="1.0" encoding="utf-8"?>
<packages>
    <package id="Microsoft.CrmSdk.CoreAssemblies" version="9.0.2.49" TargetFramework="net462" />
    <package id="Microsoft.CrmSdk.Workflow" version="9.0.2.49" TargetFramework="net462" />
    <package id="Microsoft.PowerApps.MSBuild.Plugin" version="1.22.4" TargetFramework="net462" />
    <package id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.3" TargetFramework="net462" />
</packages>

UnitTests.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net462</TargetFramework>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>UnitTests.snk</AssemblyOriginatorKeyFile>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <FileVersion>1.0.0.0</FileVersion>
    <ProjectTypeGuids>{4C25E9B5-9FA6-436c-8E19-B395D2A65FAF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <TestProjectType>UnitTest</TestProjectType>
  </PropertyGroup>

  <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.props')" />

  <!--
    NuGet pack and restore as MSBuild targets reference:
    https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets
  -->
  <PropertyGroup>
    <PackageId>UnitTests</PackageId>
    <Version>$(FileVersion)</Version>
    <Authors>paul.haag</Authors>
    <Company>MyCompany</Company>
    <Description>This is a sample nuget package which contains a Dataverse plugin and its runtime dependencies like Newtonsoft.Json</Description>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="9.0.2.*" PrivateAssets="All" />
    <PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="9.1.1.32" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
    <PackageReference Include="Microsoft.PowerApps.MSBuild.Plugin" Version="1.*" PrivateAssets="All" />
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.*" PrivateAssets="All" />
    <PackageReference Include="Microsoft.TestPlatform" Version="17.6.0" />
    <PackageReference Include="Moq" Version="4.18.4" />
    <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
    <PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Code\SEFAPlugins.csproj" />
  </ItemGroup>

  <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Plugin.targets')" />
</Project>

Packages.config for Unit Tests

<?xml version="1.0" encoding="utf-8"?>
<packages>
    <package id="Microsoft.CrmSdk.CoreAssemblies" version="9.0.2.49" TargetFramework="net462" />
    <package id="Microsoft.CrmSdk.XrmTooling.CoreAssembly" version="9.1.1.32" TargetFramework="net462" />
    <package id="Microsoft.NET.Test.Sdk" version="17.5.0" TargetFramework="net462" />
    <package id="Microsoft.PowerApps.MSBuild.Plugin" version="1.22.4" TargetFramework="net462" />
    <package id="Microsoft.NETFramework.ReferenceAssemblies" version="1.0.3" TargetFramework="net462" />
    <package id="Microsoft.TestPlatform" version="17.6.0" TargetFramework="net462" />
    <package id="Moq" version="4.18.4" TargetFramework="net462" />
    <package id="MSTest.TestAdapter" version="3.0.2" TargetFramework="net462" />
    <package id="MSTest.TestFramework" version="3.0.2" TargetFramework="net462" />
</packages>
sefa-phaag commented 1 year ago

Also, just to confirm, I am able to build this and run unit tests using Visual Studio on my workstation. Also, for sure the plugin project was building successfully previously (e.g. with the April 23 build), although the tests were being ignored.

RajeevPentyala commented 1 year ago

@sefa-phaag Thanks for the details. Please allow me to go through the details and revert. By the way the plugin samples we provided were built using 'pac plugin init'.

sefa-phaag commented 1 year ago

@RajeevPentyala Ah! I think I missed that link the first time I read through. Just looking at it... your plugin project is an SDK-style project file, but the test project isn't - I think that's the difference. I think long-term, this probably needs to support SDK-style project files for the unit tests as well because apparently that's what "Microsoft" prefers, but for the time being, I can probably recreate my tests project file...

sefa-phaag commented 1 year ago

I was finally able to get this to build and run the unit tests. As in your example PCATPluginTests.csproj, I had to manually comment out the section beginning with <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> or I got the following error in the "Build cs projects" step:

[error]SEFAModelDriven\Plugins\UnitTests\UnitTests.csproj(166,5): Error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props.

Final UnitTests.csproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" />
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{8016F81E-004E-440B-BB9C-B328BCA307D0}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>UnitTests</RootNamespace>
    <AssemblyName>UnitTests</AssemblyName>
    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.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>
    <NuGetPackageImportStamp>
    </NuGetPackageImportStamp>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
      <HintPath>..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Crm.Sdk.Proxy, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.49\lib\net462\Microsoft.Crm.Sdk.Proxy.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.8.16603, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.19.8.16603, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.1.1.32\lib\net462\Microsoft.Rest.ClientRuntime.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.49\lib\net462\Microsoft.Xrm.Sdk.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Xrm.Sdk.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.Deployment.9.0.2.25\lib\net462\Microsoft.Xrm.Sdk.Deployment.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Xrm.Sdk.Workflow, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.Workflow.9.0.2.42\lib\net462\Microsoft.Xrm.Sdk.Workflow.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Xrm.Tooling.Connector, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.1.1.32\lib\net462\Microsoft.Xrm.Tooling.Connector.dll</HintPath>
    </Reference>
    <Reference Include="Moq, Version=4.18.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
      <HintPath>..\packages\Moq.4.18.4\lib\net462\Moq.dll</HintPath>
    </Reference>
    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="PresentationFramework" />
    <Reference Include="System" />
    <Reference Include="System.Activities" />
    <Reference Include="System.Activities.Presentation" />
    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
    </Reference>
    <Reference Include="System.Configuration" />
    <Reference Include="System.Core" />
    <Reference Include="System.DirectoryServices" />
    <Reference Include="System.DirectoryServices.AccountManagement" />
    <Reference Include="System.IdentityModel" />
    <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
    </Reference>
    <Reference Include="System.Net" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Net.Http.WebRequest" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
    </Reference>
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
    </Reference>
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Security" />
    <Reference Include="System.ServiceModel" />
    <Reference Include="System.ServiceModel.Web" />
    <Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath>
    </Reference>
    <Reference Include="System.Text.Json, Version=6.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Text.Json.6.0.7\lib\net461\System.Text.Json.dll</HintPath>
    </Reference>
    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
    </Reference>
    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
    </Reference>
    <Reference Include="System.Web" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.Workflow.Activities" />
    <Reference Include="System.Workflow.ComponentModel" />
    <Reference Include="System.Workflow.Runtime" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="CreateStatDaysTest.cs" />
    <Compile Include="EquipmentSortTest.cs" />
    <Compile Include="EquipmentUsage.cs" />
    <Compile Include="ExpandNumberRangeTests.cs" />
    <Compile Include="PartialTestSave.cs" />
    <Compile Include="PrioirtyTests.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="StatTests.cs" />
    <Compile Include="TestBatch.cs" />
    <Compile Include="TestRemaining.cs" />
    <Compile Include="TestSampleTransfer.cs" />
    <Compile Include="TestsToRun.cs" />
    <Compile Include="TestTests.cs" />
    <Compile Include="UsesSinceCalibration.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Code\SEFAPlugins.csproj">
      <Project>{30dfcee8-f806-4570-92b2-1c95ef4e77e2}</Project>
      <Name>SEFAPlugins</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!--<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props'))" />
    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets'))" />
  </Target>-->
  <Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" />
</Project>