-
Notifications
You must be signed in to change notification settings - Fork 325
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
OutputType in test project templates #287
Comments
@livarcocc @srivatsn @piotrpMSFT @natemcmaster thoughts? |
Triage: go with option 2. Implementation: find the right place to override OutputType. It should be done before other parts of SDK look into OutputType. Also change the PackageReference to SDK for NET.Test.Sdk in templates. |
Yes defaulting this in the SDK makes sense. Users shouldn't have to fiddle with this. We are getting rid of the RID requirement entirely but will just infer the RID as needed. Getting rid of the rid will require a significant change to analyze all dependencies to see if any of them carry native resources. |
Sorry for delayed response, but yes, I agree with your triage choice. This seems like a good approach. |
@natemcmaster @NTaylorMullen this fix should be available in latest dotnet-cli dev builds. Test project need not specify |
Closing this issue, please reopen if you still observe the issue. |
Confirmed fixed in Microsoft.NET.Test.Sdk 15.0.0-preview-20170106-0 (cref dotnet/cli#5234). |
Description
There is confusion around multitargeted test projects in issues. For netcoreapp1.x,
<OutputType>Exe</OutputType>
is required (see dotnet/sdk#201 for rationale), where as for netXY target, library OutputType is recommended.If user adds
<OutputType>Exe</OutputType>
unconditionally, they need to add an RID parameter for netXY target. In case they add win7-x64, IDE doesn't discover tests by default because by default IDE considers x86 as default platform bitness. We can't get rid of this problem easily as long RID is necessary for a netXY exe.Possible fixes
<OutputType Condition=" $(TargetFramework.StartsWith('netcoreapp') ">Exe</OutputType>
(see Test projects sometimes require <OutputType>Exe</OutputType> #191 (comment))Thoughts?
Related issues:
#191
https://github.com/dotnet/cli/issues/4837
dotnet/project-system#827
The text was updated successfully, but these errors were encountered: