Initial work for .net core sdk preview3 (msbuild based projects)
This commit is contained in:
Родитель
c7ca57a160
Коммит
e8a5ab0c98
|
@ -27,3 +27,12 @@ the cached package is used.
|
|||
Use `-VersionSuffix 013076` argument ( for example `build -VersionSuffix 013076`)
|
||||
to create the package `dotnet-compile-fsc.1.0.0-preview2-013076`
|
||||
|
||||
|
||||
## The .NET Core SDK preview3 and msbuild based project system
|
||||
|
||||
Work in progress.
|
||||
|
||||
Require .NET Core SDK preview3 ( http://github.com/dotnet/cli ), tested with `1.0.0-preview3-003884`
|
||||
|
||||
Example apps in `examples/preview3`
|
||||
See also `src/FSharp.Net.Sdk` and `test-msbuild` directories.
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.2.*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="fsharp-sdk" value="https://www.myget.org/F/netcorecli-fsc-preview3/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,8 @@
|
|||
// Learn more about F# at http://fsharp.org
|
||||
|
||||
open System
|
||||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
printfn "Hello World from F#!"
|
||||
0 // return an integer exit code
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
Require .NET Core sdk preview3
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
|
||||
- dotnet restore3
|
||||
- dotnet build3
|
||||
- dotnet run3
|
|
@ -0,0 +1,43 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Library.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library">
|
||||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.2.*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,5 @@
|
|||
namespace Library
|
||||
|
||||
module Say =
|
||||
let hello name =
|
||||
printfn "Hello %s" name
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="fsharp-sdk" value="https://www.myget.org/F/netcorecli-fsc-preview3/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Require .NET Core sdk preview3
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
|
||||
- dotnet restore3
|
||||
- dotnet build3
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
***********************************************************************************************
|
||||
Microsoft.NET.Sdk.CSharp.props
|
||||
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||
created a backup copy. Incorrect changes to this file will make it
|
||||
impossible to load or build your projects from the command-line or the IDE.
|
||||
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
***********************************************************************************************
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn>1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,156 @@
|
|||
<!--
|
||||
***********************************************************************************************
|
||||
FSharp.targets
|
||||
|
||||
WARNING: You CAN MODIFY this file, doesnt care if you are not knowledgeable about MSBuild and
|
||||
without a backup copy.
|
||||
Incorrect changes to this file will make it impossible to load or build your projects
|
||||
from the command-line or the IDE.
|
||||
Just remove this package from nuget cache and re-restore.
|
||||
|
||||
This file defines the steps in the standard build process specific for F# .NET projects.
|
||||
For example, it contains the step that actually calls the F# compiler.
|
||||
Flow is: msbuild -> CoreCompile -> dotnet compile-fsc -> fsc
|
||||
The remainder of the build process is defined in Microsoft.Common.targets, which is imported by
|
||||
this file.
|
||||
|
||||
***********************************************************************************************
|
||||
-->
|
||||
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<DefaultLanguageSourceExtension>.fs</DefaultLanguageSourceExtension>
|
||||
<Language>F#</Language>
|
||||
<TargetRuntime>Managed</TargetRuntime>
|
||||
<AlwaysUseNumericalSuffixInItemNames>true</AlwaysUseNumericalSuffixInItemNames>
|
||||
<DefineCommonItemSchemas Condition=" '$(DefineCommonItemSchemas)' == '' ">true</DefineCommonItemSchemas>
|
||||
<DefineCommonReferenceSchemas Condition=" '$(DefineCommonReferenceSchemas)' == '' ">true</DefineCommonReferenceSchemas>
|
||||
<DefineCommonCapabilities Condition=" '$(DefineCommonCapabilities)' == '' ">true</DefineCommonCapabilities>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CoreCompileDependsOn>_ComputeNonExistentFileProperty;ResolveCodeAnalysisRuleSet</CoreCompileDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CSharpCoreTargetsPath Condition="'$(CSharpCoreTargetsPath)' == ''">Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--<Import Project="$(CSharpCoreTargetsPath)" />-->
|
||||
|
||||
|
||||
<!--Required Task by .Common.target-->
|
||||
|
||||
<PropertyGroup>
|
||||
<CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
|
||||
</PropertyGroup>
|
||||
<Target
|
||||
Name="CreateManifestResourceNames"
|
||||
Condition="'@(EmbeddedResource)' != ''"
|
||||
DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"
|
||||
>
|
||||
|
||||
<Message Text="Prova CreateManifestResourceNames" />
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
Name="ResolveCodeAnalysisRuleSet"
|
||||
Condition="'$(CodeAnalysisRuleSet)' != ''"
|
||||
>
|
||||
|
||||
<Message Text="Prova ResolveCodeAnalysisRuleSet" />
|
||||
</Target>
|
||||
|
||||
<!--End Required Task by .Common.target-->
|
||||
|
||||
<Target
|
||||
Name="CoreCompile"
|
||||
Inputs="$(MSBuildAllProjects);
|
||||
@(Compile);
|
||||
@(_CoreCompileResourceInputs);
|
||||
$(ApplicationIcon);
|
||||
$(AssemblyOriginatorKeyFile);
|
||||
@(ReferencePath);
|
||||
@(CompiledLicenseFile);
|
||||
@(LinkResource);
|
||||
@(EmbeddedDocumentation);
|
||||
$(Win32Resource);
|
||||
$(Win32Manifest);
|
||||
@(CustomAdditionalCompileInputs);
|
||||
$(ResolvedCodeAnalysisRuleSet);
|
||||
@(AdditionalFiles);
|
||||
@(EmbeddedFiles)"
|
||||
Outputs="@(DocFileItem);
|
||||
@(IntermediateAssembly);
|
||||
@(_DebugSymbolsIntermediatePath);
|
||||
$(NonExistentFile);
|
||||
@(CustomAdditionalCompileOutputs)"
|
||||
Returns="@(CscCommandLineArgs)"
|
||||
DependsOnTargets="$(CoreCompileDependsOn)"
|
||||
>
|
||||
<Message Text="FSharp CoreCompile" />
|
||||
|
||||
<Exec Command="dotnet --version" />
|
||||
|
||||
<PropertyGroup>
|
||||
<_IntermediateOutputPathFull>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)'))</_IntermediateOutputPathFull>
|
||||
<_MicrosoftNETBuildTasksTFMDefine>$(MicrosoftNETBuildTasksTFM.Replace('.','_').ToUpper())</_MicrosoftNETBuildTasksTFMDefine>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--STEP1 Create the dotnet-compile-fsc response file lines-->
|
||||
<ItemGroup>
|
||||
<DotnetCompileFscResponseLines Include="--temp-output:$(_IntermediateOutputPathFull)" />
|
||||
<DotnetCompileFscResponseLines Include="--out:$(_IntermediateOutputPathFull)$(TargetName)$(TargetExt)" />
|
||||
|
||||
<DotnetCompileFscResponseLines Condition="'$(OutputType)' == 'Exe'" Include="--emit-entry-point:True" />
|
||||
|
||||
<!--DOC: $(DefineConstants) is a string separated by ';' so let's convert to array-->
|
||||
<DefineConstantsArray Include="$(DefineConstants.Split(';'))" />
|
||||
<DotnetCompileFscResponseLines Include="@(DefineConstantsArray -> '--define:%(Identity)')" />
|
||||
|
||||
<!--HACK: for compatibility with previous sdk-->
|
||||
<DotnetCompileFscResponseLines Include="--define:$(_MicrosoftNETBuildTasksTFMDefine)" />
|
||||
|
||||
<DotnetCompileFscResponseLines Include="--optimize:$(Optimize)" />
|
||||
<DotnetCompileFscResponseLines Include="--debug-type:$(DebugType)" />
|
||||
<DotnetCompileFscResponseLines Include="--output-name:$(TargetName)" />
|
||||
<DotnetCompileFscResponseLines Include="--file-version:1.0.0.0" />
|
||||
<DotnetCompileFscResponseLines Include="--version:1.0.0.0" />
|
||||
<DotnetCompileFscResponseLines Include="--informational-version:1.0.0" />
|
||||
<DotnetCompileFscResponseLines Include="--target-framework:$(NuGetTargetMoniker)" />
|
||||
|
||||
<DotnetCompileFscResponseLines Include="@(ReferencePath -> '--reference:%(FullPath)')" />
|
||||
|
||||
<DotnetCompileFscResponseLines Include="@(Compile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--STEP2 Create the dotnet-compile-fsc response file-->
|
||||
<PropertyGroup>
|
||||
<DotnetCompileFscResponseFilePath>$(_IntermediateOutputPathFull)dotnet-compile.rsp</DotnetCompileFscResponseFilePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(DotnetCompileFscResponseFilePath)" Lines="@(DotnetCompileFscResponseLines)" Overwrite="True" />
|
||||
|
||||
<!--STEP3 set dotnet-compile-fsc path and arguments -->
|
||||
<ItemGroup>
|
||||
<!-- find referenced version of dotnet-compile-fsc -->
|
||||
<DotnetCompileFscVersion Include="@(DotNetCliToolReference -> '%(Version)')" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!--HACK the dotnet additionalprobingpath params doesnt like a trailing slash, so trim it -->
|
||||
<DotnetCompileFscExecCommand>dotnet exec --depsfile $(NuGetPackageRoot).tools\dotnet-compile-fsc\@(DotnetCompileFscVersion)\netcoreapp1.0\dotnet-compile-fsc.deps.json --additionalprobingpath $(NuGetPackageRoot.TrimEnd('\\')) $(NuGetPackageRoot)dotnet-compile-fsc\@(DotnetCompileFscVersion)\lib\netcoreapp1.0\dotnet-compile-fsc.dll</DotnetCompileFscExecCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--STEP4 HACK: invoke dotnet-compile-fsc because already works-->
|
||||
<Exec Command="$(DotnetCompileFscExecCommand) @$(DotnetCompileFscResponseFilePath)"/>
|
||||
|
||||
<Message Text="End FSharp CoreCompile" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup Condition="$(MSBuildProjectFullPath.EndsWith('.fsproj')) == 'true' AND '$(PackProjectInputFile)' == ''">
|
||||
<PackProjectInputFile>$(MSBuildProjectFullPath)</PackProjectInputFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
|
||||
## 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`
|
||||
|
||||
|
||||
## The `CoreCompile` task
|
||||
|
||||
- create the `obj\{Configuration}\dotnet-compile-fsc.rsp` response file
|
||||
- invoke the `dotnet compile-fsc` (it's the `dotnet-compile-fsc` tool app).
|
||||
- like `preview2`, the `dotnet-compile-fsc` invoke the `fsc` passing `obj\{Configuration}\dotnet-compile-fsc.rsp` response
|
||||
file who contains the `fsc` arguments
|
||||
|
||||
## Notes
|
||||
|
||||
The `Authors` property is required for `dotnet pack3`
|
||||
Because the `obj\{Configuration}\dotnet-compile-fsc.rsp` is created (like preview2) the intellisense in VS Code already works using Ionide.
|
||||
|
||||
## TODO
|
||||
|
||||
Next version should use the an MSBuild task instead of invoking the `dotnet-compile-fsc`
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"frameworks": {
|
||||
"netstandard1.3": {}
|
||||
},
|
||||
"packOptions": {
|
||||
"summary": "Sample .NET Sdk and F# integration using dotnet-compile-fsc.",
|
||||
"tags": [ "f#", "sdk" ],
|
||||
"owners": [ "Enrico Sada" ],
|
||||
"releaseNotes": "",
|
||||
"projectUrl": "https://github.com/dotnet/netcorecli-fsc",
|
||||
"requireLicenseAcceptance": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/exampleorg/example"
|
||||
},
|
||||
"files": {
|
||||
"mappings": {
|
||||
"build/netstandard1.0/FSharp.NET.Sdk.props": "FSharp.NET.Sdk.props",
|
||||
"build/netstandard1.0/FSharp.NET.Sdk.targets": "FSharp.NET.Sdk.targets"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="nuget-org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="sdk-package" value="../src/FSharp.NET.Sdk/bin/Debug" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
Tested with .NET Core sdk v1.0.0-preview3-003884
|
||||
|
||||
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.
|
||||
|
||||
The normal commands like `dotnet build`, `dotnet restore` atm, expect the `project.json` so
|
||||
like `preview2`.
|
||||
|
||||
Tested:
|
||||
|
||||
- `dotnet restore3`
|
||||
- `dotnet build3`
|
||||
- `dotnet run3`
|
||||
- `dotnet pack3`
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
// 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 TestApp
|
||||
|
||||
open System
|
||||
open System.Diagnostics
|
||||
|
||||
module Program =
|
||||
|
||||
open TestLibrary
|
||||
|
||||
[<EntryPoint>]
|
||||
let Main (args: string array) =
|
||||
printfn "%s" (TestLibrary.Helper.GetMessage())
|
||||
0
|
|
@ -0,0 +1,47 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.2.*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<ProjectReference Include="..\TestLibrary\TestLibrary.fsproj">
|
||||
<Name>TestLibrary</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"debugType": "portable",
|
||||
"compilerName": "fsc",
|
||||
"compile": {
|
||||
"includeFiles": [
|
||||
"Program.fs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"TestLibrary": {
|
||||
"version": "1.0.0-*",
|
||||
"target": "project"
|
||||
},
|
||||
"Microsoft.NETCore.App": "1.0.0",
|
||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50"
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"dotnet-compile-fsc": {
|
||||
"version": "1.0.0-preview2-*",
|
||||
"imports": "dnxcore50"
|
||||
}
|
||||
},
|
||||
"runtimes": {
|
||||
"win7-x64": {},
|
||||
"win7-x86": {},
|
||||
"osx.10.10-x64": {},
|
||||
"osx.10.11-x64": {},
|
||||
"ubuntu.14.04-x64": {},
|
||||
"ubuntu.16.04-x64": {},
|
||||
"centos.7-x64": {},
|
||||
"rhel.7.2-x64": {},
|
||||
"debian.8-x64": {},
|
||||
"fedora.23-x64": {},
|
||||
"opensuse.13.2-x64": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// Learn more about F# at http://fsharp.org
|
||||
|
||||
open System
|
||||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
printfn "Hello World from F#!"
|
||||
0 // return an integer exit code
|
|
@ -0,0 +1,44 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.2.*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,41 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-preview3</Version>
|
||||
<Authors>Enrico Sada</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.fs" />
|
||||
<EmbeddedResource Include="**\*.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020005</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\src\FSharp.NET.Sdk\FSharp.NET.Sdk.targets" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,8 @@
|
|||
// Learn more about F# at http://fsharp.org
|
||||
|
||||
open System
|
||||
|
||||
[<EntryPoint>]
|
||||
let main argv =
|
||||
printfn "Hello World from F#!"
|
||||
0 // return an integer exit code
|
|
@ -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,44 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
</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="NETStandard.Library">
|
||||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore">
|
||||
<Version>1.0.0-alpha-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk">
|
||||
<Version>1.0.0-alpha-20161012-3</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FSharp.NET.Sdk">
|
||||
<Version>0.2.*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-compile-fsc">
|
||||
<Version>1.0.0-preview2-020000</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче