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
5 changes: 1 addition & 4 deletions Source/dafny.msbuild/DafnyVerifyTask.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Build.Framework;
Expand Down Expand Up @@ -44,9 +43,7 @@ private bool VerifyDafnyFile(ITaskItem file) {

using (System.Diagnostics.Process verifyProcess = new System.Diagnostics.Process()) {
verifyProcess.StartInfo.FileName = DafnyExecutable;
verifyProcess.StartInfo.ArgumentList.Add("/compile:0");
verifyProcess.StartInfo.ArgumentList.Add("/timeLimit:" + TimeLimit);
verifyProcess.StartInfo.ArgumentList.Add(file.ItemSpec);
verifyProcess.StartInfo.Arguments = String.Format("/compile:0 /timeLimit:{0} {1}", TimeLimit, file.ItemSpec);
verifyProcess.StartInfo.UseShellExecute = false;
verifyProcess.StartInfo.RedirectStandardOutput = true;
verifyProcess.StartInfo.RedirectStandardError = true;
Expand Down
4 changes: 2 additions & 2 deletions Source/dafny.msbuild/build/dafny.msbuild.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project TreatAsLocalProperty="TaskFolder;TaskAssembly">
<PropertyGroup>
<!-- Fall back to the bin directory to make local testing much easier -->
<TaskAssembly Condition="Exists('$(MSBuildThisFileDirectory)..\tasks')">$(MSBuildThisFileDirectory)..\tasks\netcoreapp3.0\dafny.msbuild.dll</TaskAssembly>
<TaskAssembly Condition="!Exists('$(MSBuildThisFileDirectory)..\tasks')">$(MSBuildThisFileDirectory)..\bin\Debug\netcoreapp3.0\dafny.msbuild.dll</TaskAssembly>
<TaskAssembly Condition="Exists('$(MSBuildThisFileDirectory)..\tasks')">$(MSBuildThisFileDirectory)..\tasks\netstandard2.0\dafny.msbuild.dll</TaskAssembly>
<TaskAssembly Condition="!Exists('$(MSBuildThisFileDirectory)..\tasks')">$(MSBuildThisFileDirectory)..\bin\Debug\netstandard2.0\dafny.msbuild.dll</TaskAssembly>

<Dafny Condition="'$(OS)' == 'Windows_NT'">Dafny.exe</Dafny>
<Dafny Condition="'$(OS)' != 'Windows_NT'">dafny</Dafny>
Expand Down
11 changes: 5 additions & 6 deletions Source/dafny.msbuild/dafny.msbuild.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>DafnyMSBuild</RootNamespace>
<BuildOutputTargetFolder>tasks</BuildOutputTargetFolder>
<!-- Stop dotnet from complaining about the non-standard layout -->
<NoPackageAnalysis>true</NoPackageAnalysis>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<VersionPrefix>0.3.0</VersionPrefix>
<VersionPrefix>0.4.0</VersionPrefix>
<VersionSuffix Condition="$(Configuration) == 'Debug'">build$([System.DateTime]::Now.ToString('yyyyMMdd-HHmm'))</VersionSuffix>
<RootNamespace>DafnyMSBuild</RootNamespace>
</PropertyGroup>
Expand All @@ -18,9 +18,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" PrivateAssets="All" />
<PackageReference Include="System.Linq.Parallel" Version="4.3.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" PrivateAssets="all" />
<PackageReference Include="System.Linq.Parallel" Version="4.3.0" PrivateAssets="all" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions Test/TestProject/TestProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<ItemGroup>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<!--
A package reference to System.Collections.Immutable (like the following) is required if we are targetting
netstandard2.0 instead of netcoreapp3.0
<PackageReference Include="System.Collections.Immutable" Version="1.7.0" />
-->
</ItemGroup>

<!--
Expand Down