VSPackage.resx already has these resources.
This commit is contained in:
Brett V. Forsgren 2017-11-15 09:28:48 -08:00
Родитель 82a137cdc0
Коммит b2a0416080
4 изменённых файлов: 0 добавлений и 67 удалений

Просмотреть файл

@ -99,9 +99,6 @@ To build and test Visual F# IDE Tools, install these requirements:
- Under the "Windows" workloads, select ".NET desktop development"
- Select "F# language support" under the optional components
- Under the "Other Toolsets" workloads, select "Visual Studio extension development"
- Under the "Individual components" tab select "Windows 10 SDK" as shown below (needed for compiling RC resource, see #2556): \
![image](https://cloud.githubusercontent.com/assets/1249087/23730261/5c78c850-041b-11e7-9d9d-62766351fd0f.png)
- Failing to install this will lead to error FS0193: Could not find file visualfsharp\vsintegration\src\FSharp.ProjectSystem.FSharp\obj\net40\ProjectResources.rc.res.
Steps to build:

Просмотреть файл

@ -1,12 +0,0 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
// Note that, regardless of what numbers are given here, the wix code (src\wix\script.fs) that references these uses 'IconIndex' starting at 0
#define FS 100
#define FSI 101
#define FSX 102
#define FSPROJ 103
// Note that these are not always the same as the .bmp that appears in Solution Explorer, but we think these are best for 'windows folder' for now
FS ICON "Resources\FSharpCodeFile_32.ico"
FSI ICON "Resources\FSharpSignature.ico"
FSX ICON "Resources\FSharpScript.ico"
FSPROJ ICON "Resources\FSharpAboutBox.ico"

Просмотреть файл

@ -21,7 +21,6 @@
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<OtherFlags>$(OtherFlags) --warnon:1182 --subsystemversion:6.00</OtherFlags>
<Tailcalls Condition="'$(CodeCoverage)' != ''">false</Tailcalls>
<RCResourceFile>ProjectResources.rc</RCResourceFile>
<ImportVSSDKTargets>true</ImportVSSDKTargets>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
@ -39,15 +38,6 @@
<Target Name="CopyCtoFile">
<Copy SourceFiles="@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')" DestinationFiles="@(VSCTCompile->'ctofiles\%(FileName).cto')" />
</Target>
<PropertyGroup>
<Win32Resource>$(IntermediateOutputPath)\ProjectResources.rc.res</Win32Resource>
</PropertyGroup>
<Target Name="BeforeBuild" Condition="!Exists('$(IntermediateOutputPath)$(RCResourceFile).res')">
<Exec Command="&quot;$(ProgramFiles)\Windows Kits\10\bin\$(UCRTVersion)\x86\rc.exe&quot; /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)" Condition="Exists('$(ProgramFiles)\Windows Kits\10\bin\$(UCRTVersion)\x86\rc.exe')" />
<Exec Command="&quot;$(ProgramFiles)\Windows Kits\8.1\bin\x86\rc.exe&quot; /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)" Condition="Exists('$(ProgramFiles)\Windows Kits\8.1\bin\x86\rc.exe')" />
<Exec Command="&quot;$(ProgramFiles)\Windows Kits\10\bin\x86\rc.exe&quot; /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)" Condition="Exists('$(ProgramFiles)\Windows Kits\10\bin\x86\rc.exe')" />
<Exec Command="&quot;$(ProgramFiles)\Windows Kits\10\bin\10.0.15063.0\x86\rc.exe&quot; /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)" Condition="Exists('$(ProgramFiles)\Windows Kits\10\bin\10.0.15063.0\x86\rc.exe')" />
</Target>
<Target Name="GatherBinariesToBeSigned" AfterTargets="Localize" Condition="'$(UseGatherBinaries)' == 'true'">
<ItemGroup>
<BinariesToBeSigned Include="$(OutDir)$(AssemblyName).dll" />

Просмотреть файл

@ -630,41 +630,6 @@ type Miscellaneous() =
project.Close() |> ignore
)
module Regression5312 =
// Regression testing ICONS in project system dll
open System
open System.Drawing
open System.Runtime.InteropServices
[<DllImport("shell32.dll", CharSet=CharSet.Auto)>]
extern int32 ExtractIconEx(string szFileName, int nIconIndex,IntPtr[] phiconLarge, IntPtr[] phiconSmall,uint32 nIcons)
[<DllImport("user32.dll", EntryPoint="DestroyIcon", SetLastError=true)>]
extern int DestroyIcon(IntPtr hIcon)
let extractIcon (path:string) (large:bool) =
let n = 10
let hIconLarge = Array.create n IntPtr.Zero
let hIconSmall = Array.create n IntPtr.Zero
try
let readIconCount = ExtractIconEx(path,0,hIconLarge,hIconSmall,uint32 n)
if readIconCount > 0 then
if large then
Array.init readIconCount (fun i -> Icon.FromHandle(hIconLarge.[0]).Clone() :?> Icon)
else
Array.init readIconCount (fun i -> Icon.FromHandle(hIconSmall.[0]).Clone() :?> Icon)
else
[| |]
finally
hIconLarge |> Array.iter (fun ptr -> if ptr <> IntPtr.Zero then DestroyIcon ptr |> ignore<int>)
hIconSmall |> Array.iter (fun ptr -> if ptr <> IntPtr.Zero then DestroyIcon ptr |> ignore<int>)
/// Given path to FSharp.Project.FSharpProject.dll, check the icons are present.
/// Throws of failure.
let checkIcons nExpected (path:string) =
let icons = extractIcon path true
if icons.Length<>nExpected then failwithf "Expected %d icons in %s" nExpected path // "
[<TestFixture>]
type Utilities() =
(*
@ -745,13 +710,6 @@ type Utilities() =
[<Test>]
member public this.``PublicKeyToken.0a00000000000001``() = CheckPublicKeyToString([|0xauy;0uy;0uy;0uy;0uy;0uy;0uy;1uy|], "0a00000000000001")
[<Test>]
member public this.``CheckIconsInProjectSystemDLL_Regression5312``() =
let path = typeof<Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpProjectPackage>.Assembly.Location
Regression5312.checkIcons 4 path
()
[<Test>]
member public this.``Parse MSBuild property of type Int64`` () =
Assert.AreEqual(123L, ProjectNode.ParsePropertyValueToInt64("123"))