Skip to content

Commit

Permalink
Add support for running dotnet commands against solution
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher committed Nov 16, 2018
1 parent 2b27e2a commit ec1ca83
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/System.IO.Abstractions.TestingHelpers.Tests/bin/Debug/netcoreapp2.0/System.IO.Abstractions.TestingHelpers.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/System.IO.Abstractions.TestingHelpers.Tests",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
,]
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/System.IO.Abstractions.TestingHelpers.Tests/System.IO.Abstractions.TestingHelpers.Tests.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
5 changes: 5 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestable)' == 'true'" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net40</TargetFrameworks>
<Version>0.0.0.1</Version>
<Description>The unit tests for our pre-built mocks</Description>
<Company />
Expand All @@ -10,6 +11,7 @@
<RootNamespace>System.IO.Abstractions.TestingHelpers.Tests</RootNamespace>
<AssemblyOriginatorKeyFile>../StrongName.snk</AssemblyOriginatorKeyFile>
<IsPackable>false</IsPackable>
<IsTestable>true</IsTestable>

<!-- Workaround for https://github.com/nunit/nunit3-vs-adapter/issues/296 -->
<DebugType>Full</DebugType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;netstandard1.4;netstandard2.0;</TargetFrameworks>
<TargetFrameworks>netstandard1.4;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net40</TargetFrameworks>
<PackageId>System.IO.Abstractions.TestingHelpers</PackageId>
<Description>A set of pre-built mocks to help when testing file system interactions.</Description>
<Company />
Expand Down Expand Up @@ -37,7 +38,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13">
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.33">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
5 changes: 3 additions & 2 deletions System.IO.Abstractions/System.IO.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net40;netstandard1.4;netstandard2.0;</TargetFrameworks>
<TargetFrameworks>netstandard1.4;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net40</TargetFrameworks>
<Authors>Tatham Oddie</Authors>
<Company />
<Description>A set of abstractions to help make file system interactions testable.</Description>
Expand Down Expand Up @@ -49,7 +50,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13">
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.33">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
5 changes: 5 additions & 0 deletions after.System.IO.Abstractions.sln.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<Target Name="VSTest">
<MSBuild Projects="@(ProjectReference)" Targets="VSTestIfTestProject" />
</Target>
</Project>

0 comments on commit ec1ca83

Please sign in to comment.