use sdk version 1.0.0-preview3-004007
- no more `3` suffix for commands - use `dotnet-msbuild` to run tests - it's prerelease - add test library with multi fw - workaround for error `RuntimeIdentifier property not set` with crossgen and net451 - refactor sdk/fsharp.core.netcore package version in test suite - use specific version of Microsoft.FSharp.Core.netcore because latest give warning on restore Some notes: RuntimeIdentifier is required for net451? Otherwise `dotnet build` error: (CheckRuntimeIdentifier target) -> C:\Users\%USERNAME%\.nuget\packages\microsoft.net.sdk\1.0.0-alpha-20161029-1\build\Microsoft.NET.RuntimeIdentifierInference.targets(45,5): error : RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64
This commit is contained in:
Родитель
379c75a325
Коммит
b5dd998bc6
|
@ -32,7 +32,7 @@ to create the package `dotnet-compile-fsc.1.0.0-preview2-013076`
|
|||
|
||||
Work in progress.
|
||||
|
||||
Require .NET Core SDK preview3 ( http://github.com/dotnet/cli ), tested with `1.0.0-preview3-003884`
|
||||
Require .NET Core SDK preview3 ( http://github.com/dotnet/cli ), tested with `1.0.0-preview3-004007`
|
||||
|
||||
Example apps in `examples/preview3`
|
||||
See also `src/FSharp.Net.Sdk` and `test-msbuild` directories.
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -18,11 +19,11 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>1.0.0-alpha-20161029-1</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.3.*</Version>
|
||||
<Version>1.0.0-alpha-000001</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
@ -31,7 +32,7 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>1.0.0-alpha-161023</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
Require .NET Core sdk preview3
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
Tested with .NET Core sdk version `1.0.0-preview3-004007`
|
||||
|
||||
- dotnet restore3
|
||||
- dotnet build3
|
||||
- dotnet run3 -f net451
|
||||
- dotnet run3 -f netcoreapp1.0
|
||||
- dotnet pack3
|
||||
- `dotnet restore`
|
||||
- ~~`dotnet build`~~ doenst work atm
|
||||
- use `dotnet build -r win7-x64` instead as workaround
|
||||
- `dotnet run -f netcoreapp1.0`
|
||||
- ~~`dotnet run -f net451`~~ doesnt work atm
|
||||
- use `bin\Debug\net451\ExampleConsoleApp.exe` instead as workaround
|
||||
- ~~`dotnet pack`~~
|
||||
- use `dotnet pack /p:RuntimeIdentifier=win7-x64` instead as workaround
|
||||
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>1.0.0-alpha-161023</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>1.0.0-alpha-20161029-1</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.3.*</Version>
|
||||
<Version>1.0.0-alpha-000001</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Require .NET Core sdk preview3
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
Tested with .NET Core sdk version `1.0.0-preview3-004007`
|
||||
|
||||
- dotnet restore3
|
||||
- dotnet build3
|
||||
- dotnet run3
|
||||
- `dotnet restore`
|
||||
- `dotnet build`
|
||||
- `dotnet run`
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>1.0.0-alpha-161023</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>1.0.0-alpha-20161029-1</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.3.*</Version>
|
||||
<Version>1.0.0-alpha-000001</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
Require .NET Core sdk preview3
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
Tested with .NET Core sdk version `1.0.0-preview3-004007`
|
||||
|
||||
- dotnet restore3
|
||||
- dotnet build3
|
||||
- `dotnet restore`
|
||||
- `dotnet build`
|
||||
- `dotnet pack`
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
Tested with .NET Core sdk version `1.0.0-preview3-004007`
|
||||
|
||||
## On restore
|
||||
|
||||
The targets and props file are auto imported if the package is referenced.
|
||||
|
||||
The auto-import is from `obj\{ProjectName}.fsproj.nuget.g.targets` and `obj\{ProjectName}.fsproj.nuget.g.props`
|
||||
generated on `dotnet restore3`
|
||||
generated on `dotnet restore`
|
||||
|
||||
|
||||
## The `CoreCompile` task
|
||||
|
@ -18,7 +18,7 @@ generated on `dotnet restore3`
|
|||
|
||||
## Notes
|
||||
|
||||
The `Authors` property is required for `dotnet pack3`
|
||||
The `Authors` property is required for `dotnet pack`
|
||||
Because the `obj\{Configuration}\dotnet-compile-fsc.rsp` is created (like preview2) the intellisense in VS Code already works using Ionide.
|
||||
|
||||
## TODO
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"version": "0.3.21",
|
||||
"version": "1.0.0-alpha-*",
|
||||
"frameworks": {
|
||||
"netstandard1.3": {}
|
||||
},
|
||||
"packOptions": {
|
||||
"summary": "Sample .NET Sdk and F# integration using dotnet-compile-fsc.",
|
||||
"summary": "Sample .NET Sdk and F# integration",
|
||||
"tags": [ "f#", "sdk" ],
|
||||
"owners": [ "Enrico Sada" ],
|
||||
"releaseNotes": "",
|
||||
|
@ -12,7 +12,7 @@
|
|||
"requireLicenseAcceptance": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/exampleorg/example"
|
||||
"url": "https://github.com/dotnet/netcorecli-fsc"
|
||||
},
|
||||
"files": {
|
||||
"mappings": {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
FSharp.Core 1.0.0-alpha-161031 generate a warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved
|
||||
|
||||
Dependency "System.Runtime.Numerics, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
|
||||
Could not resolve this reference. Could not locate the assembly "System.Runtime.Numerics, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
|
||||
For SearchPath "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6".
|
||||
Considered "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\System.Runtime.Numerics.winmd", but it didn't exist.
|
||||
Considered "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\System.Runtime.Numerics.dll", but it didn't exist.
|
||||
Considered "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\System.Runtime.Numerics.exe", but it didn't exist.
|
||||
Required by "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\FSharp.Core.dll".
|
||||
There was a conflict between "System.Runtime.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.Numerics, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
|
||||
"System.Runtime.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.Numerics, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
|
||||
References which depend on "System.Runtime.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\e.sada\.nuget\packages\system.runtime.numerics\4.0.1\ref\netstandard1.1\System.Runtime.Numerics.dll].
|
||||
C:\Users\e.sada\.nuget\packages\system.runtime.numerics\4.0.1\ref\netstandard1.1\System.Runtime.Numerics.dll
|
||||
Project file item includes which caused reference "C:\Users\e.sada\.nuget\packages\system.runtime.numerics\4.0.1\ref\netstandard1.1\System.Runtime.Numerics.dll".
|
||||
C:\Users\e.sada\.nuget\packages\system.runtime.numerics\4.0.1\ref\netstandard1.1\System.Runtime.Numerics.dll
|
||||
References which depend on "System.Runtime.Numerics, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
|
||||
C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\FSharp.Core.dll
|
||||
Project file item includes which caused reference "C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\FSharp.Core.dll".
|
||||
C:\Users\e.sada\.nuget\packages\microsoft.fsharp.core.netcore\1.0.0-alpha-161031\lib\netstandard1.6\FSharp.Core.dll
|
|
@ -1,18 +1,16 @@
|
|||
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
Tested with .NET Core sdk version `1.0.0-preview3-004007`
|
||||
|
||||
See also `src\FSharp.NET.Sdk\README.md`
|
||||
|
||||
To use msbuild based fsproj, use the same sdk commands of `preview2`, but with `3` suffix.
|
||||
So `dotnet build3` instead of `dotnet build`, etc.
|
||||
To run tests, do `dotnet msbuild run-tests.targets /t:RunAll`
|
||||
or to run a specific test `dotnet msbuild run-tests.targets /t:TestName`
|
||||
|
||||
The normal commands like `dotnet build`, `dotnet restore` atm, expect the `project.json` so
|
||||
like `preview2`.
|
||||
To show the list of all avaiable tests run `dotnet msbuild run-tests.targets /t:TestSuiteInfo`
|
||||
|
||||
Tested:
|
||||
|
||||
- `dotnet restore3`
|
||||
- `dotnet build3`
|
||||
- `dotnet run3`
|
||||
- `dotnet pack3`
|
||||
Under test:
|
||||
|
||||
- `dotnet restore`
|
||||
- `dotnet build`
|
||||
- `dotnet run`
|
||||
- `dotnet pack`
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
|
|
|
@ -4,5 +4,16 @@ open System
|
|||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
printfn "Hello World from F#!"
|
||||
let fromfw =
|
||||
#if NET451
|
||||
"net451"
|
||||
#else
|
||||
#if NETCOREAPP1_0
|
||||
"netcoreapp1.0"
|
||||
#else
|
||||
"Unknown framework"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
printfn "Hello World from F#! using %s" fromfw
|
||||
0 // return an integer exit code
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -20,7 +21,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
|
@ -33,7 +34,7 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net451</TargetFramework>
|
||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -20,7 +21,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace TestLibrary
|
||||
|
||||
open Lib
|
||||
|
||||
type Helper() =
|
||||
|
||||
static member GetMessage () = Lib.message ()
|
||||
|
||||
static member SayHi () = Lib.sayHi ()
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
module Lib
|
||||
|
||||
open System
|
||||
|
||||
let message () =
|
||||
"This string came from the test library!"
|
||||
|
||||
let sayHi () =
|
||||
Console.WriteLine("Hello there!")
|
|
@ -0,0 +1,53 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<Import Project="..\TestSuite.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper2.fs" />
|
||||
<Compile Include="Helper.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>$(MicrosoftNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>$(FSharpNETSdkVersion)</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="NETStandard.Library">
|
||||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>$(MicrosoftFSharpCorenetcoreVersion)</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
<PackageReference Include="FSharp.Core">
|
||||
<Version>4.0.1.7-alpha</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -1,7 +1,16 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup Condition=" '$(FSharpNETSdkVersion)' == '' ">
|
||||
<FSharpNETSdkVersion>0.3.*</FSharpNETSdkVersion>
|
||||
<FSharpNETSdkVersion>1.0.0-alpha-*</FSharpNETSdkVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(MicrosoftFSharpCorenetcoreVersion)' == '' ">
|
||||
<MicrosoftFSharpCorenetcoreVersion>1.0.0-alpha-161023</MicrosoftFSharpCorenetcoreVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(MicrosoftNETSdkVersion)' == '' ">
|
||||
<MicrosoftNETSdkVersion>1.0.0-alpha-20161029-1</MicrosoftNETSdkVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run3" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
<Error
|
||||
Text="Expected 'Hello World from F#!' but was '$(OutputOfExec)'"
|
||||
Condition="'$(OutputOfExec)' != 'Hello World from F#!'" />
|
||||
Condition="! $(OutputOfExec.Contains('Hello World from F#!'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestApp">
|
||||
|
@ -22,15 +22,15 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run3" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
<Error
|
||||
Text="Expected 'This string came from the test library!' but was '$(OutputOfExec)'"
|
||||
Condition="'$(OutputOfExec)' != 'This string came from the test library!'" />
|
||||
<!--<Exec Command="dotnet pack3" WorkingDirectory="$(ProjectDirectory)" />-->
|
||||
Condition="! $(OutputOfExec.Contains('This string came from the test library!'))" />
|
||||
<!--<Exec Command="dotnet pack" WorkingDirectory="$(ProjectDirectory)" />-->
|
||||
</Target>
|
||||
|
||||
<Target Name="TestAppConsoleNet451">
|
||||
|
@ -39,14 +39,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run3" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
<Error
|
||||
Text="Expected 'Hello World from F#!' but was '$(OutputOfExec)'"
|
||||
Condition="'$(OutputOfExec)' != 'Hello World from F#!'" />
|
||||
Condition="! $(OutputOfExec.Contains('Hello World from F#!'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestAppConsoleCrossGen">
|
||||
|
@ -55,9 +55,23 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build -r win7-x64" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run -f netcoreapp1.0" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
<Error
|
||||
Text="Expected 'Hello World from F#! using netcoreapp1.0' but was '$(OutputOfExec)'"
|
||||
Condition="! $(OutputOfExec.Contains('Hello World from F#! using netcoreapp1.0'))" />
|
||||
<!-- dotnet run -f net451 raise error about RuntimeIdentifier property not set -->
|
||||
<Exec Command="bin\Debug\net451\TestAppConsole.exe" WorkingDirectory="$(ProjectDirectory)" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
|
||||
</Exec>
|
||||
<Error
|
||||
Text="Expected 'Hello World from F#! using net451' but was '$(OutputOfExec)'"
|
||||
Condition="! $(OutputOfExec.Contains('Hello World from F#! using net451'))" />
|
||||
<!-- dotnet pack raise error about RuntimeIdentifier property not set -->
|
||||
<Exec Command="dotnet pack /p:RuntimeIdentifier=win7-x64" WorkingDirectory="$(ProjectDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TestLibrary">
|
||||
|
@ -66,20 +80,69 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack3" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack" WorkingDirectory="$(ProjectDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Build" />
|
||||
<Target Name="TestLibraryCrossGen">
|
||||
<PropertyGroup>
|
||||
<ProjectDirectory>TestLibraryCrossGen</ProjectDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack" WorkingDirectory="$(ProjectDirectory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SmokeTestExamplesPreview3">
|
||||
<PropertyGroup>
|
||||
<ProjectDirectory>..\examples\preview3\console</ProjectDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run" WorkingDirectory="$(ProjectDirectory)" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ProjectDirectory>..\examples\preview3\lib</ProjectDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack" WorkingDirectory="$(ProjectDirectory)" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ProjectDirectory>..\examples\preview3\console-crossgen</ProjectDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<RemoveDir Directories="$(ProjectDirectory)\bin; $(ProjectDirectory)\obj" />
|
||||
<Exec Command="dotnet restore" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet build -r win7-x64" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet run -f netcoreapp1.0" WorkingDirectory="$(ProjectDirectory)" />
|
||||
<Exec Command="dotnet pack /p:RuntimeIdentifier=win7-x64" WorkingDirectory="$(ProjectDirectory)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<AllTests Include="TestAppConsole" />
|
||||
<AllTests Include="TestApp" />
|
||||
<AllTests Include="TestAppConsoleNet451" />
|
||||
<AllTests Include="TestAppConsoleCrossGen" />
|
||||
<AllTests Include="TestLibrary" />
|
||||
<AllTests Include="TestLibraryCrossGen" />
|
||||
<AllTests Include="TestAppConsoleCrossGen" />
|
||||
<AllTests Include="SmokeTestExamplesPreview3" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="RunAll" DependsOnTargets="@(AllTests)" />
|
||||
|
||||
<Target Name="TestSuiteInfo">
|
||||
<ItemGroup>
|
||||
<TestLI Include="@(AllTests -> '- %(Identity)%0A')" />
|
||||
</ItemGroup>
|
||||
<Message Importance="high" Text="Use '/t:RunAll' to run all tests" />
|
||||
<Message Importance="high" Text="or '/t:TestName' to run a specific test" />
|
||||
<Message Importance="high" Text="Tests avaiable:%0A @(TestLI,' ')" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче