Commit graph

23 commits

Author SHA1 Message Date
Peter Huene
e30fe29aab
Fix project type GUIDs when adding projects to solution files.
This commit ensures the correct property (`ProjectTypeGuids`) is respected when
adding a project to a solution file.

Additionally, we now error if a project type GUID cannot be determined rather
than incorrectly mapping to the C# project type.

Enabled previously disabled tests that were waiting on upstream changes from
MSBuild and F#.

Fixes #5131.
Fixes #7742.
2018-03-22 21:32:39 -07:00
Peter Huene
f7009106d8
Map solution configurations to existing project configurations on add.
This commit implements solution configuration to project configuration mapping.

Previously, when a project was added to the solution with the `sln add`
command, solution configurations would be mapped to a project configuration and
platform of the same name, regardless of whether or not the project had a
configuration or platform of that name.  This caused the solution to appear
dirty when opened in Visual Studio if the configuration or platform did not
exist at the project level because Visual Studio would attempt to correct the
mapping.

The fix is to check what configurations and platforms are supported by the
project and only map to what is present.  If a solution configuration can't be
mapped, the first configuration/platform supported by the project is chosen;
this is consistent with how Visual Studio does the fallback mapping.

Fixes #6221.
2018-01-05 18:40:26 -08:00
Peter Huene
9671ba1de0
Write UTF-8 BOM for solution files.
Currently the solution file written out by the `sln` command uses a
UTF-8 encoding without a BOM.  This causes problems when the solution
file contains non-ASCII code points because Visual Studio and MSBuild
will not use a UTF-8 encoding when reading the solution file if the
BOM is omitted.

This commit causes the BOM to always be written when writing the
solution files.

Fixes #8184.
2017-12-08 14:34:26 -08:00
Peter Huene
bcf13b93cc
Add support for accepting directories to sln add and remove commands.
This commit adds support for specifying directories containing a single
project to both the `sln add` and `sln remove` commands.

Additionally, the output from `sln remove` has been improved to not
mention "project references".

Fixes issue #7343.
2017-12-07 17:22:29 -08:00
Nick Guerrera
9b77dc50f1 Redirect parser to localized validation messages 2017-06-27 15:49:00 -07:00
Nick Guerrera
a115df9543 Adjust help message test expectations to match new parser 2017-06-27 10:03:54 -07:00
Nick Guerrera
8754fa4e68 Make dotnet-sln-add.Tests pass on localized setup 2017-06-13 21:58:03 -07:00
Mikkel Nylander Bundgaard
65eced6dae Fix failing tests due to changed exception message 2017-05-14 23:29:28 +02:00
Livar Cunha
477f0f42d0 Fixes a few inconsistencies in the display for the dotnet restore -help command.
Fixing tests based on the new strings.
2017-05-10 13:25:59 -07:00
Mikkel Nylander Bundgaard
7a824fe737 Gracefully report invalid project in sln-add
Fixes #5900
2017-05-06 02:08:00 +02:00
Mikkel Nylander Bundgaard
18d71a8471 Show help info when no or wrong arguments are given
Fixes #5383, fixes #5384
2017-05-04 01:01:35 +02:00
jonsequitur
4a2c3932e7 new parser version, adjust column spacing in tests 2017-03-22 15:26:58 -07:00
jonsequitur
e5d7fb8236 change test's expected text 2017-03-16 13:34:12 -07:00
Jon Sequeira
96683c1421 help text updates 2017-03-14 10:33:58 -07:00
Justin Goshi
dcb8881c02 Re-enable solution building tests 2017-03-08 11:33:27 -08:00
Piotr Puszkiewicz
85b2a129db Merge branch 'rel/1.0.0'
Conflicts:
	TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
	TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
	TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj
	TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
	TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
	build.proj
	build/Compile.targets
	build/Microsoft.DotNet.Cli.Compile.targets
	build/Microsoft.DotNet.Cli.DependencyVersions.props
	build/Microsoft.DotNet.Cli.Monikers.props
	build/Microsoft.DotNet.Cli.Prepare.targets
	build/package/Microsoft.DotNet.Cli.Nupkg.targets
	build/package/Nupkg.targets
	build/test/TestPackageProjects.targets
	build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs
	build_projects/dotnet-cli-build/GetCommitCount.cs
	build_projects/dotnet-cli-build/dotnet-cli-build.csproj
	build_projects/shared-build-targets-utils/Utils/BuildVersion.cs
	src/dotnet-archive/dotnet-archive.csproj
	src/tool_msbuild/tool_msbuild.csproj
	src/tool_nuget/tool_nuget.csproj
	test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
	test/ArgumentsReflector/ArgumentsReflector.csproj
	test/EndToEnd/EndToEnd.csproj
	test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
	test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj
	test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj
	test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
	test/binding-redirects.Tests/binding-redirects.Tests.csproj
	test/crossgen.Tests/crossgen.Tests.csproj
	test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
	test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
	test/dotnet-build.Tests/dotnet-build.Tests.csproj
	test/dotnet-help.Tests/dotnet-help.Tests.csproj
	test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj
	test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
	test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj
	test/dotnet-new.Tests/dotnet-new.Tests.csproj
	test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj
	test/dotnet-pack.Tests/dotnet-pack.Tests.csproj
	test/dotnet-publish.Tests/dotnet-publish.Tests.csproj
	test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
	test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
	test/dotnet-run.Tests/dotnet-run.Tests.csproj
	test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
	test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj
	test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj
	test/dotnet-test.Tests/dotnet-test.Tests.csproj
	test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj
	test/dotnet.Tests/dotnet.Tests.csproj
	test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj
	tools/Archiver/Archiver.csproj
2017-02-17 02:00:05 -08:00
Livar
d1a844da2c Merge branch 'rel/1.0.0' into dev/jgoshi/dotnetAddDefaultProjectTypeGuid 2017-02-15 14:10:10 -08:00
Justin Goshi
149a4590b5 Do not add duplicate projects (#5698) 2017-02-14 15:47:06 -08:00
Justin Goshi
4d24ae06bb Default to C# project type guid 2017-02-14 14:57:04 -08:00
jonsequitur
1a0adcbe5a fix loc text dependent test 2017-02-13 13:35:41 -08:00
Justin Goshi
b2c51b7269 Do not add duplicate solution folders or project directories (#5377)
* Do not add duplicate solution folders or project directories

* Fix the algorithm for removing empty solution folders

* Improving code by adding description methods. To address PR comments.
2017-01-20 18:34:37 -08:00
Justin Goshi
f972cf80a9 Treat /? the same as --help (#5285)
* Fixes issue 4539

* Support -?
2017-01-13 01:24:12 -08:00
Justin Goshi
e109a9be47 dotnet sln command (#5233)
* Add dotnet sln command

* Use new names for localizable strings

* Fix up the tests for the verb rename
2017-01-06 10:58:23 -10:00
Renamed from test/dotnet-add-proj.Tests/GivenDotnetAddProj.cs (Browse further)