Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Release
vsdebug
vsrelease
Proto
sign_temp
.libs
Makefile
configure
Expand Down Expand Up @@ -94,4 +95,5 @@ tests/fsharpqa/Source/*FSharpQA_Failures.lst
*.orig
*.mdf
*.ldf
*.cto
tests/**/FSharp.Core.dll
42 changes: 11 additions & 31 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ For **Debug** this corresponds to these steps, which you can run individually fo
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259
msbuild VisualFSharp.sln
msbuild vsintegration/fsharp-vsintegration-src-build.proj
msbuild vsintegration/fsharp-vsintegration-project-templates-build.proj
msbuild vsintegration/fsharp-vsintegration-item-templates-build.proj
msbuild vsintegration/fsharp-vsintegration-deployment-build.proj
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj
msbuild tests/fsharp/FSharp.Tests.fsproj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a mix of forward and backslashes here

src\update.cmd debug -ngen
tests\BuildTestTools.cmd debug

Expand All @@ -123,39 +127,15 @@ For **Release** this corresponds to these steps, which you can run individually
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
msbuild src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
msbuild VisualFSharp.sln /p:Configuration=Release
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
msbuild vsintegration/fsharp-vsintegration-src-build.proj /p:Configuration=Release
msbuild vsintegration/fsharp-vsintegration-project-templates-build.proj /p:Configuration=Release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the replacement for these instructions? Does a build now clobber the F# SDK and installed Visual F# IDE Tools on the machine? If so, for which VS version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No replacement. This PR removes the special 9055 version redirection, and uses one unified assembly version. VS developers run the VSIX they want to debug, and VS will load all the correct assemblies at runtime. I'll update the md file to make this more clearer and send a PR out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you already overwrote it :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I put a new version of the info in, but I'm not sure if it's quite what you intended. Please take a look :)

msbuild vsintegration/fsharp-vsintegration-item-templates-build.proj /p:Configuration=Release
msbuild vsintegration/fsharp-vsintegration-deployment-build.proj /p:Configuration=Release
msbuild vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
msbuild tests/fsharp/FSharp.Tests.fsproj /p:Configuration=Release
src\update.cmd release -ngen
tests\BuildTestTools.cmd release

### 4. [Optional] Install the Visual F# IDE Tools and Clobber the F# SDK on the machine

**Note:** Step #2 below will install a VSIX extension into Visual Studio 2015 that changes the Visual F# IDE Tools
components installed into Visual Studio 2015. You can revert this step by disabling or uninstalling the addin.

**Note:** Step #3 below will clobber the machine-wide installed F# SDK on your machine. This replaces the ``fsi.exe``/``fsiAnyCpu.exe`` used
by Visual F# Interactive and the ``fsc.exe`` used by ``Microsoft.FSharp.targets``. Repairing Visual Studio 2015 is currently the
only way to revert this step.

**Note:** After you complete the install, the FSharp.Core referenced by your projects will not be updated. If you want to make
a project that references your updated FSharp.Core, you must explicitly change the ``TargetFSharpCoreVersion`` in the .fsproj
file to ``4.4.0.5099`` (or a corresponding portable version number with suffix ``5099``).

For **Debug**:

1. Ensure that the VSIX package is uninstalled. In VS, select Tools/Extensions and Updates and if the package `VisualStudio.FSharp.EnableOpenSource` is installed, select Uninstall
1. Run ``debug\net40\bin\EnableOpenSource.vsix``
1. Run ``vsintegration\update-vsintegration.cmd debug`` (clobbers the installed F# SDK)

For **Release**:

1. Ensure that the VSIX package is uninstalled. In VS, select Tools/Extensions and Updates and if the package `VisualStudio.FSharp.EnableOpenSource` is installed, select Uninstall
1. Run ``release\net40\bin\EnableOpenSource.vsix``
1. Run ``vsintegration\update-vsintegration.cmd release`` (clobbers the installed F# SDK)

Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools with updated F# Interactive.


### Notes on the build

1. The `update.cmd` script adds required strong name validation skips, and NGens the compiler and libraries. This requires admin privileges.
Expand Down
988 changes: 884 additions & 104 deletions VisualFSharp.sln

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ if '%TEST_COMPILERUNIT%' == '1' (
%_msbuildexe% %msbuildflags% src/fsharp-compiler-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: compiler unittests build failed && goto :failure
)
if '%TEST_COREUNIT%' == '1' (
if '%TEST_NET40_COREUNIT%' == '1' (
%_msbuildexe% %msbuildflags% src/fsharp-library-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: library unittests build failed && goto :failure
)
Expand All @@ -268,18 +268,25 @@ if '%TEST_PORTABLE_COREUNIT%' == '1' (
)

if '%BUILD_VS%' == '1' (
%_msbuildexe% %msbuildflags% VisualFSharp.sln /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration build failed && goto :failure
%_msbuildexe% %msbuildflags% vsintegration/fsharp-vsintegration-src-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration src build failed && goto :failure

%_msbuildexe% %msbuildflags% vsintegration/fsharp-vsintegration-project-templates-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration project templates build failed && goto :failure

%_msbuildexe% %msbuildflags% vsintegration/fsharp-vsintegration-item-templates-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration item templates build failed && goto :failure

%_msbuildexe% %msbuildflags% vsintegration/fsharp-vsintegration-deployment-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration deployment build failed && goto :failure

%_msbuildexe% %msbuildflags% vsintegration/fsharp-vsintegration-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
@if ERRORLEVEL 1 echo Error: VS integration unittests build failed && goto :failure
)

@echo on
call src\update.cmd %BUILD_CONFIG_LOWERCASE% -ngen

REM Remove lingering copies of the OSS FSharp.Core from the GAC
gacutil /u "FSharp.Core, Version=4.4.1.9055, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"

REM This clobbers the installed F# SDK on the machine
call vsintegration\update-vsintegration.cmd %BUILD_CONFIG_LOWERCASE%
pushd tests

@echo on
Expand Down
43 changes: 43 additions & 0 deletions microbuild-everything.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not specific to MicroBuild is it? If not, then change it's name to just build-everything.proj please

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<ItemGroup>
<ProjectsWithDefaultFramework Include="src/fsharp-library-build.proj" />
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-build.proj" />
<ProjectsWithDefaultFramework Include="src/fsharp-typeproviders-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-src-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-project-templates-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-item-templates-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-deployment-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-unittests-build.proj" />
<ProjectsWithDefaultFramework Include="src/fsharp-library-unittests-build.proj" />
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-unittests-build.proj" />
<ProjectsWithDefaultFramework Include="tests/fsharp/FSharp.Tests.fsproj" />

<ProjectsWithPortableFramework Include="src/fsharp-library-build.proj" />
<ProjectsWithPortableFramework Include="src/fsharp-library-unittests-build.proj" />
</ItemGroup>

<Target Name="Build">
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Build" BuildInParallel="true"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="TargetFramework=portable47"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="TargetFramework=portable7"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="TargetFramework=portable78"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="TargetFramework=portable259"/>
</Target>

<Target Name="Rebuild">
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Rebuild" BuildInParallel="true"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="TargetFramework=portable47"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="TargetFramework=portable7"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="TargetFramework=portable78"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="TargetFramework=portable259"/>
</Target>

<Target Name="Clean">
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Clean" BuildInParallel="true"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="TargetFramework=portable47"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="TargetFramework=portable7"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="TargetFramework=portable78"/>
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="TargetFramework=portable259"/>
</Target>
</Project>
2 changes: 2 additions & 0 deletions packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<package id="NUnit.Runners" version="3.0.0" targetFramework="net45" />
<package id="NUnit" version="3.0.0" targetFramework="net45" />
<package id="NUnit.Console" version="3.0.0" targetFramework="net45" />
<package id="NUnit3TestAdapter" version="3.0.8-ctp-8" targetFramework="net45" />
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
<package id="FSharp.SRGen.Build.Tasks" version="2.0.0" targetFramework="net46" />
<package id="MicroBuild.Core" version="0.2.0" />
</packages>
45 changes: 25 additions & 20 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,50 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsPortableProfile Condition="'$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259'">true</IsPortableProfile>
<FSCoreVersion Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">4.4.1.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'net20'">2.4.1.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable7'">3.7.41.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable47'">3.47.41.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable78'">3.78.41.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable259'">3.259.41.9055</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' != 'net20' and $(IsPortableProfile) != 'true'">4.4.1.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'net20'">2.4.1.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable7'">3.7.41.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable47'">3.47.41.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable78'">3.78.41.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable259'">3.259.41.0</FSCoreVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' or '$(Configuration)' == 'VSDebug' or '$(Configuration)' == 'VSRelease' ">
<Choose>
<When Condition="'$(ProjectLanguage)' == 'FSharp'">
<Choose>
<When Condition="'$(AssemblyName)' == 'FSharp.Core'">
<When Condition="'$(AssemblyName)' == 'FSharp.Core' or '$(AssemblyName)' == 'FSharp.Build' or '$(AssemblyName)' == 'FSharp.Compiler' or '$(AssemblyName)' == 'FSharp.Compiler.Interactive.Settings' or '$(AssemblyName)' == 'FSharp.Compiler.Server.Shared' or '$(AssemblyName)' == 'fsc' or '$(AssemblyName)' == 'fsi' or '$(AssemblyName)' == 'FsiAnyCPU' or '$(AssemblyName)' == 'FSharp.Data.TypeProviders'" >
<PropertyGroup>
<OtherFlags>$(OtherFlags) --version:$(FSCoreVersion)</OtherFlags>
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<When Condition="'$(AssemblyName)' == 'FSharp.LanguageService' or '$(AssemblyName)' == 'FSharp.LanguageService.Compiler' or '$(AssemblyName)' == 'FSharp.LanguageService.Base' or '$(AssemblyName)' == 'FSharp.Editor' or '$(AssemblyName)' == 'FSharp.VS.FSI' or '$(AssemblyName)' == 'FSharp.ProjectSystem.FSharp'">
<When Condition="'$(AssemblyName)' == 'FSharp.LanguageService' or '$(AssemblyName)' == 'FSharp.LanguageService.Compiler' or '$(AssemblyName)' == 'FSharp.Editor' or '$(AssemblyName)' == 'FSharp.VS.FSI' or '$(AssemblyName)' == 'FSharp.ProjectSystem.FSharp'">
<PropertyGroup>
<OtherFlags>$(OtherFlags) --version:14.0.0.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion>14.4.1.0</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<!-- do not strong-name the runtime unit tests, as they have non-strong-named dependencies -->
<When Condition="'$(AssemblyName)' == 'FSharp.Core.Unittests'">
<When Condition="'$(AssemblyName)' == 'FSharp.Core.Unittests' or '$(AssemblyName)' == 'FSharp.Compiler.Unittests'">
<PropertyGroup>
<OtherFlags>$(OtherFlags) --version:4.4.1.9055</OtherFlags>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="'$(SIGN_WITH_MSFT_KEY)' == 'true'">
<OtherFlags>$(OtherFlags) --version:4.4.1.9055 --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<OtherFlags>$(OtherFlags) --delaysign+ --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
</PropertyGroup>
<PropertyGroup Condition="'$(SIGN_WITH_MSFT_KEY)' != 'true'">
<OtherFlags>$(OtherFlags) --version:4.4.1.9055 --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"</OtherFlags>
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</Otherwise>
</Choose>
Expand All @@ -57,6 +58,8 @@
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</Otherwise>
</Choose>
Expand All @@ -65,8 +68,9 @@
<PropertyGroup Condition="'$(StrongNames)' != 'true'">
<!-- For the proto build, portable and Silverlight framework implementations, we don't use strong names. -->
<!-- For Silverlight, there is no way to disable strong name verification, so using the Microsoft name is not possible -->
<OtherFlags>$(OtherFlags) --version:4.4.1.9055</OtherFlags>
<DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</Otherwise>
</Choose>
Expand All @@ -89,7 +93,7 @@
<Optimize>true</Optimize>
</PropertyGroup>

<!-- Flags used to build the bootstrap compiler. -->
<!-- Flags used to build the bootstrap compiler. -->
<PropertyGroup Condition="'$(Configuration)'=='Proto'">
<Optimize>true</Optimize>
<DefineConstants>DEBUG;NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
Expand Down Expand Up @@ -759,6 +763,7 @@
</CreateItem>
</Target>

<Import Project="Microbuild.Settings.targets" />
<Import Project="..\packages\FSharp.SRGen.Build.Tasks.$(FsSrGenBuildTasksVersion)\content\FSharp.SRGen.targets" />

<Target Name="ReorderCompileItems"
Expand Down
Loading