-
Notifications
You must be signed in to change notification settings - Fork 378
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
Add IsPackable=false to test project templates #376
Comments
Sounds good to me, @codito what do you think of this idea? |
There isn't? |
@motowilliams why produce a NuGet package for your tests? Unless you're planning on distributing them it doesn't seem to serve any real purpose (that I can see, at least). |
@tintoy that's precisely the reason - we package our suites of integration, acceptance and regression tests to our deployment targets. |
@motowilliams this change wouldn't prevent doing that, but would opt out of doing so by default. I'm curious as to which is the more common case, as that's the direction we'd want to take for the templates. |
@mlorbetske puts it better than I could; I was admittedly focusing only on the common case and didn't think someone might want to do that. Perhaps if it was a switch-style template parameter that's off by default? |
The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default.
The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default.
The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default.
@mlorbetske +1. I think we should set it in the microsoft/vstest#380 tracks this in vstest. |
@codito - if it's set in |
Yes, it should be overridable by user. |
The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default.
The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default.
* Tags become choices, lots of help changes * Rebased on rel/sv2017/post-rtw * Post-Rebase cleanup of outputs for various situations. Moved tags to symbols on 2.0 templates * Reverted to tags in 1.x templates and Item templates * Removed extra space from tags secifications in 1.x templates * Reverted to tags in 2.0 templates * Fixed misspelling of 'language' in 2.0 template.json files * Changes based on review comments (not including case-insensitive reads yet) * Rebased on rel/vs2017/post-rtw * Made reading template config & cache info be case-insensitive. * Made cache parameter properties get only * Cleanup of help & ItemplateInfo * Minor cleanup, mostly removing no longer needed async tasks * More cleanup * Tags become choices, lots of help changes * Rebased on rel/sv2017/post-rtw * Post-Rebase cleanup of outputs for various situations. Moved tags to symbols on 2.0 templates * Reverted to tags in 1.x templates and Item templates * Removed extra space from tags secifications in 1.x templates * Reverted to tags in 2.0 templates * Fixed misspelling of 'language' in 2.0 template.json files * Cleaning up UI interactions. Better experience for: problems with extra args files (#327, #329); default not in choice list #271 * Added support for split template configuration files (#150) * Cleanup of nulls in the template cache * fixed a merge mistake * More fixes from merge issues * Make fallback host files work correctly * Added wildcard to host matched. Fixed a bug with wildcard matching in zips * Add filter switch, hide all switch, add logic for accepting explicitly set filters * Change filter to type * Give instructions to call --help instead of showing help on error * Remove unused using * Fixes #380 and #379 * Respond to review feedback * Make the message shown for the invalid params match between help and non-help cases * Set IsPackable=false for new test projects (#376). The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default. * Make IsPackable configurable for test project template (#377). * Use '-p' as the short form for '--enable-pack' in MSTest v1 project template. * Implement "--enable-pack" parameter for test project templates (#377). This parameter, if set to "true", marks the project as packable (i.e. participates in solution-level calls to "dotnet pack", producing a NuGet package). * Build for non-Windows platforms Refactor to use latest cli Add RestoreSource for dotnet-new3 project Build with framework version and runtime id Fix test cases * Move testbase location to local directory * Updating the identity of the 2.0 templates * Better matching across templates with same group identity. * Added precedence to all template.json files * Reading & writing template Precedence * Template matching uses Precedence to help disambiguate templates * fix for #395 * Updated package refs in test projects * fix for exclude, include, & copy only configuration in sources * Mikes test harness for testing dotnet new commands. Tests for precedence disambiguation * Fixes per Mike's CR * renamed the mvc precendence tests * Add 3PN for nuget.exe * Allow runtime to be passed in * Handling reading different cache formats, and upgrading the cache aut… (#407) * Handling reading different cache formats, and upgrading the cache automatically as needed * Cleanup for cache versioning * Improvements to cache versioning. Language display fix. * Cache rebuild enhancement. Only scan mount points for templates and langpacks
Repro on D15.0/28106.9000 |
@YunWeiaa what’s reproducing? Visual Studio displaying an option to pack the project even with IsPackable=false or the project having a property saying IsPackable=true by default? If it’s the first one, an issue should be opened on NuGet/home, if the second one (or anything else related to the test templates) an issue should be filed on dotnet/test-templates as those templates are now maintained in that repo. |
* Tags become choices, lots of help changes * Rebased on rel/sv2017/post-rtw * Post-Rebase cleanup of outputs for various situations. Moved tags to symbols on 2.0 templates * Reverted to tags in 1.x templates and Item templates * Removed extra space from tags secifications in 1.x templates * Reverted to tags in 2.0 templates * Fixed misspelling of 'language' in 2.0 template.json files * Changes based on review comments (not including case-insensitive reads yet) * Rebased on rel/vs2017/post-rtw * Made reading template config & cache info be case-insensitive. * Made cache parameter properties get only * Cleanup of help & ItemplateInfo * Minor cleanup, mostly removing no longer needed async tasks * More cleanup * Tags become choices, lots of help changes * Rebased on rel/sv2017/post-rtw * Post-Rebase cleanup of outputs for various situations. Moved tags to symbols on 2.0 templates * Reverted to tags in 1.x templates and Item templates * Removed extra space from tags secifications in 1.x templates * Reverted to tags in 2.0 templates * Fixed misspelling of 'language' in 2.0 template.json files * Cleaning up UI interactions. Better experience for: problems with extra args files (dotnet#327, dotnet#329); default not in choice list dotnet#271 * Added support for split template configuration files (dotnet#150) * Cleanup of nulls in the template cache * fixed a merge mistake * More fixes from merge issues * Make fallback host files work correctly * Added wildcard to host matched. Fixed a bug with wildcard matching in zips * Add filter switch, hide all switch, add logic for accepting explicitly set filters * Change filter to type * Give instructions to call --help instead of showing help on error * Remove unused using * Fixes dotnet#380 and dotnet#379 * Respond to review feedback * Make the message shown for the invalid params match between help and non-help cases * Set IsPackable=false for new test projects (dotnet/templating#376). The rationale for this is that creating NuGet packages from tests is probably not the more-common use case and so by default these project should not participate when "dotnet pack" is run at the solution level. This doesn't prevent users from opting into "dotnet pack", it simply won't be the default. * Make IsPackable configurable for test project template (dotnet/templating#377). * Use '-p' as the short form for '--enable-pack' in MSTest v1 project template. * Implement "--enable-pack" parameter for test project templates (dotnet/templating#377). This parameter, if set to "true", marks the project as packable (i.e. participates in solution-level calls to "dotnet pack", producing a NuGet package). * Build for non-Windows platforms Refactor to use latest cli Add RestoreSource for dotnet-new3 project Build with framework version and runtime id Fix test cases * Move testbase location to local directory * Updating the identity of the 2.0 templates * Better matching across templates with same group identity. * Added precedence to all template.json files * Reading & writing template Precedence * Template matching uses Precedence to help disambiguate templates * fix for dotnet#395 * Updated package refs in test projects * fix for exclude, include, & copy only configuration in sources * Mikes test harness for testing dotnet new commands. Tests for precedence disambiguation * Fixes per Mike's CR * renamed the mvc precendence tests * Add 3PN for nuget.exe * Allow runtime to be passed in * Handling reading different cache formats, and upgrading the cache aut… (dotnet#407) * Handling reading different cache formats, and upgrading the cache automatically as needed * Cleanup for cache versioning * Improvements to cache versioning. Language display fix. * Cache rebuild enhancement. Only scan mount points for templates and langpacks
Hi.
At present, running
dotnet pack
on a solution with test projects often generates unnecessary warnings when packing test projects. Given that there's no point in packing test projects, how about adding:to the test project templates.
That way, they'll be ignored when running
dotnet pack
. If you guys are ok with this idea, I could open a PR - it's probably as simple as adding a single line to 4 files.The text was updated successfully, but these errors were encountered: