-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet test
on .NET Framework test suite requires runtime identifier?
#4469
Comments
Looking at that issue now |
@thomhurst could you please confirm the following behaviors:
It would seems to indicate this is a msbuild/SDK issue on building (which we call when doing @baronfel @JanKrivanek @YuliiaKovalova is it something you are aware of? |
Got a binlog of what happens when you call MSBuild @Evangelink? |
Here you go: msbuild.binlog.txt |
You're right. It happens on the build.
I managed to build in VS and then run on the CLI with --no-build like you suggested and that works fine:
|
Unfortunately it's not easily trackable from the binlog where that inital value comes from @YuliiaKovalova - this is another example where dotnet/msbuild#11106 will help a ton! |
But it seems to go from here: While not being used during Restore. @marcpopMSFT - could you suggest who should look at this? |
This is specific to TUNIT correct? From the binlog, it appears that HasRuntimeOutput is true for the build but not for the restore which is why a RID is getting set for the build but not project assets json gets created during the restore. This is happening because OutputType is ending up as an exe in the build but not during the restore. The restore downloads the tunit package which ends up setting the OutputType to exe after the restore phase in TUNIT.Engine.props. @rainersigwald @dsplaisted any suggestions how tunit can work around this? Do we need a property they can disable the implicit RID inference for netfx apps? They could set HasRuntimeOutput to false but I don't know what other side effects that'll have. |
@thomhurst I confirm that setting |
Ah that's good! But it looks like it's in an empty nested folder... Not sure why as it should be pulling through the TargetFramework
|
Anyway - This is a me problem. Sorry for the red herring. Thanks for the help everyone! |
@thomhurst just confirming - that structure would 100% interfere with the auto-loading behaviors of NuGet. Check for double-slashes in the PackagePath for the items you're bundling? |
This is the core of it--I think the other test packages require that the project itself set |
Yes, props and targets files in packages should not be setting any properties which would modify the input to Restore, which includes the OutputType. |
One reason why custom MSBuild SDKs are good. When using it, we can actually set the output type in the props and everything works fine while for a normal package we have this error. |
Weird. This has been in TUnit for ages and doesn't seem to affect .NET (Core) builds? Only for .NET Framework has it not worked. I'd really like to be able to abstract away all the properties from users to simplify things for them. |
Is this anything to do with testing platform?
I've just added .NET Standard support to TUnit, and if I do a normal
dotnet test
it doesn't run unless I pass in a runtime identifier too.Original issue is here: thomhurst/TUnit#1465
dotnet test:
dotnet test -r win-x86:
The text was updated successfully, but these errors were encountered: