-
Notifications
You must be signed in to change notification settings - Fork 508
Conversation
@@ -3,16 +3,21 @@ | |||
|
|||
<PropertyGroup> | |||
<OutputType>Library</OutputType> | |||
<TargetFramework>netstandard1.5</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need anything from 1.5 ? I would keep it at netstandard1.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting errors when doing msbuild /t:Restore
that Microsoft.TestPlatform.TestHost 15.3.0-preview-20170427-09
requires netstandard 1.5. I'll try again, to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried again and confirmed. That said, I'm not exactly sure how that package is getting pulled into the graph...
F:\repos\corert>msbuild /v:m /m "F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj" /t:Restore
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj...
Restore completed in 56.61 ms for F:\repos\corert\src\ILVerification\src\ILVerification.csproj.
F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj : error NU1202: Package Microsoft.TestPlatform.TestHost 15.3.0-preview-20170427-09 is not compatible with netstandard1.3 (.NETStandard,Version=v1.3). Package Microsoft.TestPlatform.TestHost 15.3.0-preview-20170427-09 supports:
F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj : error NU1202: - net45 (.NETFramework,Version=v4.5)
F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj : error NU1202: - netstandard1.5 (.NETStandard,Version=v1.5)
Generating MSBuild file F:\repos\corert\bin/obj/Windows_NT.x64.Debug/ILVerification.Tests\ILVerification.Tests.csproj.nuget.g.props.
Restore failed in 529.32 ms for F:\repos\corert\src\ILVerification\tests\ILVerification.Tests.csproj.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Change it to |
|
Do the tests run automatically during the build with this change? |
I think I can go back to Would you know what is a No, this change would not yet automate the tests in the build. I would love that though.
|
This is the way to do it: https://github.com/dotnet/corert/tree/master/src/ILCompiler.TypeSystem/tests/ILTestAssembly
I think it can be hooked up same way as out TypeSystem tests, e.g.: https://github.com/dotnet/corert/blob/master/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj . They just run during the build. |
Thanks. |
I am not sure. I think it is ok to leave it as 1.5. |
Ok. Good to merge them. |
I took a look at ILTestAssembly. It's using an |
The low-tech way to deal with this is to create multiple .ilproj files.
It is what the current CoreRT build does as well. |
I set up corert on a different machine, and it seems TestExplorer is still not working. That'll be for another day... For the record, here's the TestExplorer log I captured (after removing the
|
I'm not sure Test Explorer ever worked. We share a lot of the infrastructure with CoreFX repo through buildtools. The way I used to run tests in the past is by setting the test project as the startup project and running it with F5 (as described here). |
The test explorer did work for ILVerify tests, however I also wasn't able to get it to work for other projects like the TypeSystemTests. I think it was mentioned that there were problems with getting the tests to work with the old csproj format, when the ILVerify tests were originally introduced in #3725. So it could be that there is a problem related to the changes in project format. |
Right, it only worked as long as ILVerify wasn't using any of the official build infrastructure. What I meant to say is "I'm not sure Test Explorer ever worked with the official unit testing and build tooling in the repo". |
I see. Yes, that is correct! |
Thanks for the clarification. I'll try via F5, and I'll use Jan's |
Hum, Do you have an example of a project that works with |
@jkotas I tried adding an |
VS does not work well for editing the buildtools-based solution. You have to often do it manually in raw text editor. |
That's what I did. But in |
* Use correct name to fetch embedded resource * Fix the test project * Use GetTypeInfo().Assembly
F:\repos\corert\Tools\sign.targets
), so theInternalsVisibleTo
fromILVerification
toILVerification.Tests
should use that public keyTargetFramework
set tonetstandard1.5
becauseMicrosoft.TestPlatform.TestHost 15.3.0-preview-20170427-09
requires itNewtonsoft.Json
reference addedType.Assembly
). Any ideas how to solve that?Tagging @jkotas @ArztSamuel