Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Cli/dotnet/Commands/New/DotnetCommandCallbacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ internal static bool AddPackageReference(string projectPath, string packageName,
IEnumerable<string> commandArgs = ["add", projectPath, "package", packageName];

var packageAddCommandDef = new PackageAddCommandDefinition();
commandArgs = commandArgs.Append(packageAddCommandDef.NoRestoreOption.Name);
if (!string.IsNullOrWhiteSpace(version))
{
commandArgs = commandArgs.Append(packageAddCommandDef.VersionOption.Name).Append(version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,32 @@
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(CoverageTool == \"coverlet\")",
"description": "Add the coverlet.collector package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package coverlet.collector --version 6.0.4 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "coverlet.collector",
"version": "6.0.4"
}
},
{
"condition": "(!UseMSTestSdk)",
"description": "Add the MSTest package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package MSTest --version 4.0.2 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "MSTest",
"version": "4.0.2"
}
},
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<!--#if (TestRunner == "VSTest")-->
<UseVSTest>true</UseVSTest>
</PropertyGroup>
<!--#if (CoverageTool == "coverlet")-->

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
</ItemGroup>
<!--#endif-->
<!--#else-->
<TestingExtensionsProfile Condition=" '$(ExtensionsProfile)' != 'Default' ">$(ExtensionsProfile)</TestingExtensionsProfile>
</PropertyGroup>
Expand All @@ -39,13 +33,6 @@
<!--#endif-->
</PropertyGroup>

<ItemGroup>
<!--#if (CoverageTool == "coverlet")-->
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<!--#endif-->
<PackageReference Include="MSTest" Version="4.0.2" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,32 @@
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(CoverageTool == \"coverlet\")",
"description": "Add the coverlet.collector package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package coverlet.collector --version 6.0.4 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "coverlet.collector",
"version": "6.0.4"
}
},
{
"condition": "(!UseMSTestSdk)",
"description": "Add the MSTest package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package MSTest --version 4.0.2 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "MSTest",
"version": "4.0.2"
}
},
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<!--#if (TestRunner == "VSTest")-->
<UseVSTest>true</UseVSTest>
</PropertyGroup>
<!--#if (CoverageTool == "coverlet")-->

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
</ItemGroup>
<!--#endif-->
<!--#else-->
<TestingExtensionsProfile Condition=" '$(ExtensionsProfile)' != 'Default' ">$(ExtensionsProfile)</TestingExtensionsProfile>
</PropertyGroup>
Expand Down Expand Up @@ -44,13 +38,6 @@
<!--#endif-->
</PropertyGroup>

<ItemGroup>
<!--#if (CoverageTool == "coverlet")-->
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<!--#endif-->
<PackageReference Include="MSTest" Version="4.0.2" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,32 @@
],
"defaultName": "TestProject1",
"postActions": [
{
"condition": "(CoverageTool == \"coverlet\")",
"description": "Add the coverlet.collector package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package coverlet.collector --version 6.0.4 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.vbproj" ],
"referenceType": "package",
"reference": "coverlet.collector",
"version": "6.0.4"
}
},
{
"condition": "(!UseMSTestSdk)",
"description": "Add the MSTest package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package MSTest --version 4.0.2 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.vbproj" ],
"referenceType": "package",
"reference": "MSTest",
"version": "4.0.2"
}
},
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<!--#if (TestRunner == "VSTest")-->
<UseVSTest>true</UseVSTest>
</PropertyGroup>
<!--#if (CoverageTool == "coverlet")-->

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
</ItemGroup>
<!--#endif-->
<!--#else-->
<TestingExtensionsProfile Condition=" '$(ExtensionsProfile)' != 'Default' ">$(ExtensionsProfile)</TestingExtensionsProfile>
</PropertyGroup>
Expand All @@ -39,13 +33,6 @@
<!--#endif-->
</PropertyGroup>

<ItemGroup>
<!--#if (CoverageTool == "coverlet")-->
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<!--#endif-->
<PackageReference Include="MSTest" Version="4.0.2" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,66 @@
}
],
"postActions": [
{
"description": "Add the coverlet.collector package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package coverlet.collector --version 6.0.4 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "coverlet.collector",
"version": "6.0.4"
}
},
{
"description": "Add the Microsoft.NET.Test.Sdk package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package Microsoft.NET.Test.Sdk --version 17.14.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "Microsoft.NET.Test.Sdk",
"version": "17.14.0"
}
},
{
"description": "Add the NUnit package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit --version 4.3.2 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "NUnit",
"version": "4.3.2"
}
},
{
"description": "Add the NUnit.Analyzers package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit.Analyzers --version 4.7.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "NUnit.Analyzers",
"version": "4.7.0"
}
},
{
"description": "Add the NUnit3TestAdapter package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit3TestAdapter --version 5.0.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.csproj" ],
"referenceType": "package",
"reference": "NUnit3TestAdapter",
"version": "5.0.0"
}
},
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,66 @@
}
],
"postActions": [
{
"description": "Add the coverlet.collector package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package coverlet.collector --version 6.0.4 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "coverlet.collector",
"version": "6.0.4"
}
},
{
"description": "Add the Microsoft.NET.Test.Sdk package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package Microsoft.NET.Test.Sdk --version 17.14.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "Microsoft.NET.Test.Sdk",
"version": "17.14.0"
}
},
{
"description": "Add the NUnit package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit --version 4.3.2 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "NUnit",
"version": "4.3.2"
}
},
{
"description": "Add the NUnit.Analyzers package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit.Analyzers --version 4.7.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "NUnit.Analyzers",
"version": "4.7.0"
}
},
{
"description": "Add the NUnit3TestAdapter package reference.",
"manualInstructions": [{ "text": "Run 'dotnet add package NUnit3TestAdapter --version 5.0.0 --no-restore'" }],
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": true,
"args": {
"files": [ "Company.TestProject1.fsproj" ],
"referenceType": "package",
"reference": "NUnit3TestAdapter",
"version": "5.0.0"
}
},
{
"condition": "(!skipRestore)",
"description": "Restore NuGet packages required by this project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,5 @@
<Compile Include="Program.fs"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
</ItemGroup>

</Project>
Loading
Loading