Closed jstedfast closed 3 weeks ago
Okay, so I think we have to strongname UnitTests.dll so that InternalsVisibleTo works, but we also need to strongname Microsoft.Xaml.Behaviors.dll so that UnitTests.dll doesn't complain that it's loading an unsigned assembly.
Ugh! still failing:
Error: D:\a\XamlBehaviorsWpf\XamlBehaviorsWpf\Test\UnitTests\KeyTriggerTest.cs(20,25): error CS0281: Friend access was granted by 'Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a', but the public key of the output assembly ('') does not match that specified by the InternalsVisibleTo attribute in the granting assembly. [D:\a\XamlBehaviorsWpf\XamlBehaviorsWpf\Test\UnitTests\UnitTests.csproj]
Hmm, seems to me that SignAssembly and DelaySign should always be true for all assemblies. And in the official build the product assembly would actually get signed.
I got this building/running locally and the issue seemed to be some sort of incompatibility between msbuild
and dotnet test
not being able to run the built tests without having issues.
Once switching over to vstest.console.exe, it worked locally. Hopefully the same will be true on the bots.
Run microsoft/vstest-action@v1.0.0 with: testAssembly: Test\UnitTests\bin\Release\net462\UnitTests.dll resultLogsArtifactName: vs-test-result-logs ifNoFilesFound: warn env: DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet GitAssemblyInformationalVersion: 1.1.135+b1f1bcd790 GitBuildVersion: 1.1.135.61873 GitBuildVersionSimple: 1.1.135 Downloading test tools... C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Invoke-WebRequest -Uri https://aka.ms/local-worker-win-x6[4](https://github.com/microsoft/XamlBehaviorsWpf/actions/runs/10583947960/job/29327060389?pr=178#step:7:4) -OutFile D:\a_actions\microsoft\vstest-action\v1.0.0\dist\win-x64.zip Invoke-WebRequest : The remote name could not be resolved: 'localworker.blob.core.windows.net' At line:1 char:1
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1 Warning: No files were found with the provided path: TestResults. No artifacts will be uploaded.
Looks like the vstest action is broken due to a link to a non-existent resource on the web.
I propose deleting the GitHub pipeline
Description of Change
Describe your changes here.
Bugs Fixed
API Changes
List all API changes here (or just put None), example:
Added:
Changed:
Behavioral Changes
Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase.
PR Checklist