wcf icon indicating copy to clipboard operation
wcf copied to clipboard

dotnet-svcutil test: fix ParamsFiles and typereuse cases

Open imcarolwang opened this issue 2 years ago • 5 comments

The ParamsFiles case tests global tool can generate wcf client using parameter file passed in, typereuse case tests type reuse feature, both cases hard coded the context test project to .net6.0.

With the wcf repository's root global.json upgrades SDK version to .net8.0, the tests failed to run because the test code can only create test projects whose framework targets are available as defined by the global.json.

This PR changes net6.0 to net8.0 for the two cases and add their corresponding baseline files, also deletes baseline folder ParamsFiles_SDK_TFM/TFnetcoreapp3_1 which is no longer baseline of any existing case.

Updates:

  1. The tests are updated to use the default target framework instead of updating to use the latest for each new release.
  2. Add a scenario to test type reuse for project targeting .NET Standard 2.0.

imcarolwang avatar Mar 21 '23 09:03 imcarolwang

@imcarolwang can you please research to see if it's possible to make a global variable or somewhere so all the code path could benefit in the future?

HongGit avatar Jun 20 '23 03:06 HongGit

I agree with the latest approach, is there a concern that using the default framework may not be include all the test framework needed to be tested?

HongGit avatar Jul 05 '23 21:07 HongGit

I agree with the latest approach, is there a concern that using the default framework may not be include all the test framework needed to be tested?

I think it's ok because before updating to use default framework, test hard coded to use the latest framework version, which is no different than use the default, and we have other tests to cover different framework option test.

imcarolwang avatar Jul 06 '23 01:07 imcarolwang

@imcarolwang, this PR includes the assembly src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll. It's not normal for us to commit compiled code into the repo. Was this a mistake or intentional?

mconnew avatar May 23 '25 17:05 mconnew

@imcarolwang, this PR includes the assembly src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll. It's not normal for us to commit compiled code into the repo. Was this a mistake or intentional?

Hi @mconnew, It was intentional. However, since it was not normal, I updated the test client project to reference .csproj instead of the compiled dll to cover the code generation type-reuse scenario.

imcarolwang avatar May 26 '25 05:05 imcarolwang