I have a small demo project, with unit tests. using .net5, and 64 bit/any cpu.
I am having trouble with them running in my azure pipeline.
I have made a runsetting file, but cannot specify the 5.0 net framework
I've made a failing unit test, but it doenst get run.
when I 'debug' it I get this in my azure log..
2021-03-04T16:29:27.9652466Z /TestAdapterPath:"C:\DevOps\Agent 2_work\3\s" 2021-03-04T16:29:27.9652833Z /diag:"C:\DevOps\Agent 2_work_temp\c9f3dc90-7d06-11eb-9f3e-ab7c238ad233.txt" 2021-03-04T16:29:28.0475388Z Settings file provided does not conform to required format. An error occurred while loading the settings. Error: Invalid setting 'RunConfiguration'. Invalid value 'AnyCPU' specified for 'TargetPlatform'.. 2021-03-04T16:29:28.2479067Z ##[debug]Exit code 1 received from tool 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\TestPlatform\vstest.console.exe' 2021-03-04T16:29:28.2484150Z ##[debug]STDIO streams have closed for tool 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\TestPlatform\vstest.console.exe' 2021-03-04T16:29:28.2516774Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
my .runsettings are:
<?xml version="1.0" encoding="utf-8"?>
<!-- File name extension must be .runsettings -->
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Path relative to directory that contains .runsettings file-->
<ResultsDirectory>.\bin\TestResults</ResultsDirectory>
<!-- x86 or x64 -->
<!-- You can also change it from the Test menu;
choose "Processor Architecture for AnyCPU Projects" -->
<TargetPlatform>AnyCPU</TargetPlatform>
<!-- Framework35 | [Framework40] | Framework45 ... todo Framework50 er ikke suporteret-->
<TargetFrameworkVersion>Framework45</TargetFrameworkVersion>
<!-- true or false -->
<!-- Value that specifies the exit code when no tests are discovered -->
<TreatNoTestsAsError>false</TreatNoTestsAsError>
</RunConfiguration>
</RunSettings>
Does ms Azure not support .net50 for unit testing, with vs tests?
Thanks for you thoughts.. Kenneth