Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e100d1

Browse files
committed
Enable build of FSharp.Data.TypeProviders.dll
This enables the build of FSharp.Data.TypeProviders.dll via xbuild. TheWSDL functionality is disabled for nowdue toConfigurationChannelFactory not being defined on Mono.None of the functionality is likely to work on Linux or Mac because thecommand-line tools used by the type providers will not be found by theregistry searches used on Windows.
1 parenta02edf1 commit9e100d1

File tree

5 files changed

+82
-71
lines changed

5 files changed

+82
-71
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#light
2+
namespaceMicrosoft.FSharp
3+
openSystem.Reflection
4+
[<assembly:AssemblyDescription("FSharp.Data.TypeProviders.dll")>]
5+
[<assembly:AssemblyTitle("FSharp.Data.TypeProviders.dll")>]
6+
[<assembly:AssemblyCopyright("\169 Microsoft Corporation and other contributors. Apache 2.0 License.")>]
7+
[<assembly:AssemblyProduct("F# (open source edition)")>]
8+
do()
9+
10+
#if NO_STRONG_NAMES
11+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests")>]
12+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests")>]
13+
#endif
14+
15+
#if STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY
16+
[<assembly:AssemblyFileVersion("4.0.40401.666")>]// ensure we replace any 4.0.30319.* or 4.0.31105.* versions in the GAC. These are the FileVersions for RTM VS2010 and SP1 VS2010
17+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
18+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
19+
#endif
20+
21+
#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
22+
[<assembly:AssemblyFileVersion("4.0.40401.666")>]// ensure we replace any 4.0.30319.* or 4.0.31105.* versions in the GAC. These are the FileVersions for RTM VS2010 and SP1 VS2010
23+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
24+
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("SystematicUnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
25+
#endif
26+
do()

‎src/fsharp-library-build.proj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!-- Core library: all frameworks-->
1414
<ItemGroup>
1515
<ProjectFilesInclude="fsharp\FSharp.Core\FSharp.Core.fsproj"/>
16+
<ProjectFilesInclude="fsharp\FSharp.Data.TypeProviders\FSharp.Data.TypeProviders.fsproj"Condition="'$(TargetFramework)'=='net40'"/>
1617
</ItemGroup>
1718

1819
<ImportProject="root.traversal.targets"/>

‎src/fsharp/FSharp.Data.TypeProviders/FSharp.Data.TypeProviders.Shared.fsproj‎

Lines changed: 0 additions & 50 deletions
This file was deleted.

‎src/fsharp/FSharp.Data.TypeProviders/FSharp.Data.TypeProviders.fsproj‎

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<PropertyGroup>
44
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..</FSharpSourcesRoot>
55
</PropertyGroup>
6-
<ImportProject="$(FSharpSourcesRoot)\FSharpTeam.Settings.targets"Condition=" Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
7-
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.Settings.targets"Condition=" !Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
6+
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
87
<PropertyGroup>
98
<ConfigurationCondition=" '$(Configuration)' == ''">Debug</Configuration>
109
<PlatformCondition=" '$(Platform)' == ''">AnyCPU</Platform>
@@ -13,18 +12,47 @@
1312
<AllowCrossTargeting>true</AllowCrossTargeting>
1413
<TargetFrameworkVersionCondition=" '$(TargetFrameworkVersion)' == ''">v4.0</TargetFrameworkVersion>
1514
<ProjectGuid>{cb7d20c4-6506-406d-9144-5342c3595f03}</ProjectGuid>
16-
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
17-
</PropertyGroup>
18-
<ImportProject="$(FSharpSourcesRoot)\fs2Sharp.Data.TypeProviders\FSharp.Data.TypeProviders.Shared.fsproj"
19-
Condition="'$(TargetFramework)' 25' AND
20-
'$(TargetFramework)' 23-wp'" />
15+
<DefineConstants>TPEMIT_INTERNAL_AND_MINIMAL_FOR_TYPE_CONTAINERS;$(DefineConstants)</DefineConstants>
16+
</PropertyGroup>
2117
<ItemGroup>
2218
<!--This is used for compiling the run2ype provider DLL for WP7, Silverlight etc.-->
2319
<!--This is the only file used.-->
2420
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\TypeProviderRuntimeAttribute.fs"Condition="'$(TargetFramework)' == 'net20' or '$(TargetFramework)' == 'wp7' or '$(TargetFramework)'=='sl4'">
2521
<Link>TypeProviderRuntimeAttribute.fs</Link>
2622
<Visible>true</Visible>
2723
</Compile>
24+
<FsSrGenInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\FSData.txt" >
25+
<Link>FSData.txt</Link>
26+
<Visible>true</Visible>
27+
</FsSrGen>
28+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\Util.fsi">
29+
<Link>Util.fsi</Link>
30+
<Visible>true</Visible>
31+
</Compile>
32+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\Util.fs">
33+
<Link>Util.fs</Link>
34+
<Visible>true</Visible>
35+
</Compile>
36+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\InternalsVisibleTo.fs">
37+
<Link>InternalsVisibleTo.fs</Link>
38+
<Visible>true</Visible>
39+
</Compile>
40+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\TypeProviderEmit.fsi">
41+
<Link>TypeProviderEmit.fsi</Link>
42+
<Visible>true</Visible>
43+
</Compile>
44+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\TypeProviderEmit.fs">
45+
<Link>TypeProviderEmit.fs</Link>
46+
<Visible>true</Visible>
47+
</Compile>
48+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\TypeProvidersImpl.fs">
49+
<Link>TypeProvidersImpl.fs</Link>
50+
<Visible>true</Visible>
51+
</Compile>
52+
<CompileInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\TypeProviders.fs">
53+
<Link>TypeProviders.fs</Link>
54+
<Visible>true</Visible>
55+
</Compile>
2856
</ItemGroup>
2957

3058
<ItemGroup>
@@ -38,20 +66,14 @@
3866
<ReferenceInclude="System.Core" />
3967
<ReferenceInclude="System.Configuration" />
4068
<ReferenceInclude="System.ServiceModel" />
69+
<ReferenceInclude="System.Xml" />
70+
<ReferenceInclude="System.Data" />
71+
<ReferenceInclude="System.Xml.Linq" />
4172
<ReferenceInclude="nunit.framework"Condition="'$(BuildUnittests)'!='false'" />
42-
<ReferenceInclude="FSharp.Core"Condition="! $(BuildFSharpCoreDll) OR ! Exists( '$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj' )">
43-
<Name>FSharp.Core</Name>
44-
<AssemblyName>FSharp.Core.dll</AssemblyName>
45-
<HintPath>$(FSharpCoreDllHintPath)</HintPath>
46-
<Private>true</Private>
47-
</Reference>
48-
<ProjectReferenceInclude="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj"Condition="$(BuildFSharpCoreDll) AND Exists( '$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj' )">
73+
<ProjectReferenceInclude="..\FSharp.Core\FSharp.Core.fsproj">
4974
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
5075
<Name>FSharp.Core</Name>
5176
</ProjectReference>
5277
</ItemGroup>
53-
<ImportProject="$(FSharpSourcesRoot)\FSharpTeam.targets"Condition=" Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
54-
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.targets"Condition=" !Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
55-
<ImportProject="$(MSBuildExtensionsPath)\FSharp\1.0\Microsoft.FSharp.Targets"Condition=" !Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
56-
<ImportProject="$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin\FSharp.SRGen.targets"Condition=" !Exists('$(FSharpSourcesRoot)\FSharpTeam.targets')" />
57-
</Project>
78+
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.targets" />
79+
</Project>

‎src/fsharp/FSharp.Data.TypeProviders/TypeProviders.fs‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ type public DataProviders(config:TypeProviderConfig) =
963963
letodataServiceType(typePath,itemName)= odataServiceTypeCache.Apply(typePath, itemName)
964964

965965

966-
966+
#if WSDL
967967
letwsdlReorg namespaceName endpointNames(serviceUri:string,_localSchemaDir,_,_,_,_,_,_,_)(types:Type list)=
968968
/// Make the expression that creates the instance of the underlying full context type stored in the simplified context object.
969969
/// This function is used when no endpoint name is available (because either none were in the config file, or there was trouble getting
@@ -1123,6 +1123,9 @@ type public DataProviders(config:TypeProviderConfig) =
11231123
letwsdlServiceType(typePath,itemName)= wsdlServiceTypeCache.Apply(typePath, itemName)
11241124

11251125
letwsdlServiceTypeUninstantiated= typeDefinition("WsdlService", wsdlServiceTypeHelp)
1126+
#endif
1127+
1128+
11261129
letodataServiceTypeUninstantiated= typeDefinition("ODataService", odataServiceTypeHelp)
11271130
letdbmlFileTypeUninstantiated= typeDefinition("DbmlFile", dbmlFileTypeHelp)
11281131
letedmxFileTypeUninstantiated= typeDefinition("EdmxFile", edmxFileTypeHelp)
@@ -1144,7 +1147,10 @@ type public DataProviders(config:TypeProviderConfig) =
11441147
sqlEntityConnectionTypeUninstantiated
11451148
dbmlFileTypeUninstantiated
11461149
odataServiceTypeUninstantiated
1147-
wsdlServiceTypeUninstantiated|]
1150+
#if WSDL
1151+
wsdlServiceTypeUninstantiated
1152+
#endif
1153+
|]
11481154

11491155
memberthis.ResolveTypeName typeName=
11501156
match typeNamewith
@@ -1153,7 +1159,9 @@ type public DataProviders(config:TypeProviderConfig) =
11531159
|"SqlEntityConnection"-> sqlEntityConnectionTypeUninstantiated:> Type
11541160
|"DbmlFile"-> dbmlFileTypeUninstantiated:> Type
11551161
|"ODataService"-> odataServiceTypeUninstantiated:> Type
1162+
#if WSDL
11561163
|"WsdlService"-> wsdlServiceTypeUninstantiated:> Type
1164+
#endif
11571165
|_->null
11581166

11591167
interface ITypeProviderwith
@@ -1164,7 +1172,9 @@ type public DataProviders(config:TypeProviderConfig) =
11641172
letparameters=
11651173
match typeWithoutArguments.Namewith
11661174
|"ODataService"-> odataServiceStaticParameters
1175+
#if WSDL
11671176
|"WsdlService"-> wsdlServiceStaticParameters
1177+
#endif
11681178
|"SqlDataConnection"-> sqlDataConnectionStaticParameters
11691179
|"SqlEntityConnection"-> sqlEntityConnectionStaticParameters
11701180
|"DbmlFile"-> dbmlStaticParameters
@@ -1222,6 +1232,7 @@ type public DataProviders(config:TypeProviderConfig) =
12221232
(oneNamedParam(dbmlStaticParameters,"ContextTypeName"): string),
12231233
(oneNamedParam(dbmlStaticParameters,"Serializable"): bool)))
12241234

1235+
#if WSDL
12251236
|"WsdlService"->
12261237
wsdlServiceType
12271238
(typePath,
@@ -1234,6 +1245,7 @@ type public DataProviders(config:TypeProviderConfig) =
12341245
(oneNamedParam(wsdlServiceStaticParameters,"Serializable"): bool),
12351246
(oneNamedParam(wsdlServiceStaticParameters,"Async"): bool),
12361247
(oneNamedParam(wsdlServiceStaticParameters,"CollectionType"): string)))
1248+
#endif
12371249

12381250
|"ODataService"->
12391251
odataServiceType

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp