Dynamo icon indicating copy to clipboard operation
Dynamo copied to clipboard

tests adapter for vs 2022

Open mjkkirschner opened this issue 2 years ago • 9 comments

Purpose

bring in nunit adapter package for vs 2022 - NOTE this PR currently brings in new deps into the bin folder. We should remove them from the deployed build somehow ❓ 🤷

TIbi's changes:

  1. All test projects (under the Dynamo/test folder) will, by default, copy over all package dependencies to the Dynamo/test/test_dependencies folder The reason is to avoid polluting the bin folder with test dependencies Some exceptions are made - Nunit, Moq are still copied to the OutputPath (bin) to preserve binary compatibility and to help nunit-console locate them.
  2. All test projects will have 2 more package references : NUnitTestAdapter and Microsoft.NET.Test.Sdk NUnitTestAdapter will not copy over any dlls (has ExcludeAssets="all") because the dlls are found in the global packages folder (somehow). NUnitTestAdapter is needed on all projects (at least that is what nunit docs say) Microsoft.NET.Test.Sdk is necessary to allow VS UI to better work for test projects
  3. Setup fixtures (some for now) will resolve assembly references from the test/test_depdendencies folder.
  4. Integrate the latest Analytics nuget package

Declarations

Check these if you believe they are true

  • [ ] The codebase is in a better state after this PR
  • [ ] Is documented according to the standards
  • [ ] The level of testing this PR includes is appropriate
  • [ ] User facing strings, if any, are extracted into *.resx files
  • [ ] All tests pass using the self-service CI.
  • [ ] Snapshot of UI changes, if any.
  • [ ] Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • [ ] This PR modifies some build requirements and the readme is updated

Release Notes

(FILL ME IN) Brief description of the fix / enhancement. Mandatory section

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

mjkkirschner avatar May 03 '22 15:05 mjkkirschner

@mjkkirschner can you PTAL

pinzart90 avatar May 06 '22 13:05 pinzart90

Hey @pinzart90 what do you think about updating this package as well? https://nuget.info/packages/DynamoVisualProgramming.Tests/2.15.0-beta4703 should it now depend on nuget adapter and microsoft sdk or that is not necessary?

mjkkirschner avatar May 06 '22 15:05 mjkkirschner

@pinzart90 before this is merged - let's make sure both parallel and serial tests pass - I've started this for the serial tests: https://master-15.jenkins.autodesk.com/view/DYN/job/DYN-DevCI_Self_Service/

but it looks like parallel is failing, can you take a look?

mjkkirschner avatar May 06 '22 15:05 mjkkirschner

@pinzart90 this fails to build on master-15 now: https://master-15.jenkins.autodesk.com/view/DYN/job/DYN-DevCI_Self_Service/972/

mjkkirschner avatar May 10 '22 15:05 mjkkirschner

Do all machines need to have VS 2022 installed in order for this PR to pass?

aparajit-pratap avatar May 10 '22 19:05 aparajit-pratap

Do all machines need to have VS 2022 installed in order for this PR to pass?

VS2019 should still work after this PR When we move to dotnet6 we will have to install vs 2022 on our build machines

pinzart90 avatar May 10 '22 20:05 pinzart90

@pinzart90 I don't think we should merge this until the master-15 self serve passes, any idea why it can't find newtonsoft?

"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\build.xml" (default target) (1) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Dynamo.All.sln" (Rebuild target) (2) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\DynamoSandbox\DynamoSandbox.csproj.metaproj" (Rebuild target) (16) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\DynamoSandbox\DynamoSandbox.csproj" (Rebuild target) (17) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\DynamoCoreWpf\DynamoCoreWpf.csproj" (default target) (19:3) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodeModels\CoreNodeModels.csproj" (default target) (23:3) ->
"E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj" (default target) (24:5) ->
(CoreCompile target) -> 
  Color.cs(8,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(5,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(6,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(22,40): error CS0246: The type or namespace name 'JToken' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(67,39): error CS0246: The type or namespace name 'JsonConverter' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(69,44): error CS0246: The type or namespace name 'JsonWriter' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(69,77): error CS0246: The type or namespace name 'JsonSerializer' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(23,10): error CS0246: The type or namespace name 'JsonPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(23,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(23,23): error CS0246: The type or namespace name 'PropertyName' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(90,45): error CS0246: The type or namespace name 'JsonReader' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(90,103): error CS0246: The type or namespace name 'JsonSerializer' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(33,10): error CS0246: The type or namespace name 'JsonPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(33,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(33,23): error CS0246: The type or namespace name 'PropertyName' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(43,10): error CS0246: The type or namespace name 'JsonPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(43,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(43,23): error CS0246: The type or namespace name 'PropertyName' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(53,10): error CS0246: The type or namespace name 'JsonPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(53,10): error CS0246: The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Color.cs(53,23): error CS0246: The type or namespace name 'PropertyName' could not be found (are you missing a using directive or an assembly reference?) [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(95,34): error CS0115: 'Data.DictConverter.CanRead': no suitable method found to override [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]
  Data.cs(100,34): error CS0115: 'Data.DictConverter.CanConvert(Type)': no suitable method found to override [E:\Builds\mjkkirschner_Dynamo\tests2022\Dynamo\src\Libraries\CoreNodes\CoreNodes.csproj]

    1416 Warning(s)
    23 Error(s)

mjkkirschner avatar May 10 '22 21:05 mjkkirschner

@pinzart90 looks like multiple versions of Greg.dll are referenced in your latest updates.

mjkkirschner avatar Jun 16 '22 20:06 mjkkirschner

@pinzart90 looks like multiple versions of Greg.dll are referenced in your latest updates.

I put in a lot of debugging/experimental code in here. I'll convert it to draft for now...until I figure out the issues with missing package references on master-15

pinzart90 avatar Jun 17 '22 14:06 pinzart90