diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml index ed30cb74ef24..a93dcd1af94e 100644 --- a/.vsts-signed.yaml +++ b/.vsts-signed.yaml @@ -11,117 +11,142 @@ variables: #- name: SkipTests # defaultValue: false -jobs: -- job: Full_Signed - pool: - name: VSEng-MicroBuildVS2019 - timeoutInMinutes: 300 - variables: - BuildConfiguration: 'Release' - steps: - - # Install Signing Plugin - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 - displayName: Install Signing Plugin - inputs: - signType: real - esrpSigning: true - condition: and(succeeded(), ne(variables['SignType'], '')) - - # Build - - script: eng\CIBuild.cmd - -configuration $(BuildConfiguration) - -testAll - -officialSkipTests $(SkipTests) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:VisualStudioDropName=$(VisualStudioDropName) - /p:DotNetSignType=$(SignType) - /p:DotNetPublishToBlobFeed=true - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:PublishToSymbolServer=true - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - displayName: Build - - # Publish logs - - task: PublishBuildArtifacts@1 - displayName: Publish Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' - ArtifactName: 'Build Diagnostic Files' - publishLocation: Container - continueOnError: true - condition: succeededOrFailed() - - # Publish test results - - task: PublishBuildArtifacts@1 - displayName: Publish Test Results - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults' - ArtifactName: 'Test Results' - publishLocation: Container - continueOnError: true - condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) - - # Upload VSTS Drop - - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 - displayName: Upload VSTS Drop - inputs: - DropName: $(VisualStudioDropName) - DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - condition: succeeded() - - # Publish an artifact that the RoslynInsertionTool is able to find by its name. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - ArtifactName: 'VSSetup' - condition: succeeded() - - # Archive NuGet packages to DevOps. - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Packages - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)' - ArtifactName: 'Packages' - condition: succeeded() - - # Publish nightly package to ADO - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Nightly - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix' - ArtifactName: 'Nightly' - condition: succeeded() - - # Package publish - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' - ArtifactName: AssetManifests - continueOnError: true - condition: succeeded() - - # Publish native PDBs for archiving - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Symbols - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/SymStore/$(BuildConfiguration)' - ArtifactName: NativeSymbols - condition: succeeded() - - # Execute cleanup tasks - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Execute cleanup tasks - condition: succeededOrFailed() - -- template: /eng/common/templates/job/publish-build-assets.yml - parameters: - dependsOn: - - Full_Signed +stages: +- stage: build + displayName: Build + + jobs: + - job: Full_Signed pool: - vmImage: windows-2019 - enablePublishBuildArtifacts: true + name: VSEng-MicroBuildVS2019 + timeoutInMinutes: 300 + variables: + BuildConfiguration: 'Release' + steps: + + # Install Signing Plugin + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 + displayName: Install Signing Plugin + inputs: + signType: real + esrpSigning: true + condition: and(succeeded(), ne(variables['SignType'], '')) + + # Build + - script: eng\CIBuild.cmd + -configuration $(BuildConfiguration) + -testAll + -officialSkipTests $(SkipTests) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:VisualStudioDropName=$(VisualStudioDropName) + /p:DotNetSignType=$(SignType) + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:PublishToSymbolServer=true + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + displayName: Build + + # Publish logs + - task: PublishBuildArtifacts@1 + displayName: Publish Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(BuildConfiguration)' + ArtifactName: 'Build Diagnostic Files' + publishLocation: Container + continueOnError: true + condition: succeededOrFailed() + + # Publish test results + - task: PublishBuildArtifacts@1 + displayName: Publish Test Results + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults' + ArtifactName: 'Test Results' + publishLocation: Container + continueOnError: true + condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true')) + + # Upload VSTS Drop + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropName: $(VisualStudioDropName) + DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' + condition: succeeded() + + # Publish an artifact that the RoslynInsertionTool is able to find by its name. + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact VSSetup + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' + ArtifactName: 'VSSetup' + condition: succeeded() + + # Archive NuGet packages to DevOps. + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Packages + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)' + ArtifactName: 'Packages' + condition: succeeded() + + # Publish nightly package to ADO + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Nightly + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\VisualFSharpFull.vsix' + ArtifactName: 'Nightly' + condition: succeeded() + + # Package publish + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' + ArtifactName: AssetManifests + continueOnError: true + condition: succeeded() + + # Publish PackageArtifacts for Arcade verification + - task: PublishBuildArtifacts@1 + displayName: Publish PackageArtifacts + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' + ArtifactName: 'PackageArtifacts' + condition: succeeded() + + # Publish BlobArtifacts for Arcade verification + - task: PublishBuildArtifacts@1 + displayName: Publish BlobArtifacts + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(BuildConfiguration)\Shipping' + ArtifactName: 'BlobArtifacts' + condition: succeeded() + + # Publish native PDBs for archiving + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Symbols + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/SymStore/$(BuildConfiguration)' + ArtifactName: NativeSymbols + condition: succeeded() + + # Execute cleanup tasks + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 + displayName: Execute cleanup tasks + condition: succeededOrFailed() + + - template: /eng/common/templates/job/publish-build-assets.yml + parameters: + dependsOn: + - Full_Signed + pool: + vmImage: windows-2019 + enablePublishBuildArtifacts: true + +- template: eng/common/templates/post-build/post-build.yml + parameters: + # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false diff --git a/NuGet.config b/NuGet.config index a8664a73c574..9acafaa472f5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,10 +18,15 @@ - - + + - + + + + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 87306e5c604f..53288c73d3f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,285 +28,305 @@ variables: #- name: SkipTests # defaultValue: false -jobs: +stages: +- stage: build + displayName: Build + jobs: -#---------------------------------------------------------------------------------------------------------------------# -# Signed build # -#---------------------------------------------------------------------------------------------------------------------# -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: - - job: Full_Signed - pool: - name: NetCoreInternal-Int-Pool - queue: buildpool.windows.10.amd64.vs2019 - timeoutInMinutes: 300 - variables: - - group: DotNet-Blob-Feed - - group: DotNet-Symbol-Server-Pats - - name: _SignType - value: Real - - name: _DotNetPublishToBlobFeed - value: true - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd - -configuration $(_BuildConfig) - -prepareMachine - -testAll - -officialSkipTests $(SkipTests) - /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:TeamName=$(_TeamName) - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - /p:DotNetPublishToBlobFeed=true - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:PublishToSymbolServer=true - /p:VisualStudioDropName=$(VisualStudioDropName) - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: ne(variables['SkipTests'], 'true') - - task: PublishBuildArtifacts@1 - displayName: Publish Test Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)' - ArtifactName: 'Test Logs' - publishLocation: Container - continueOnError: true - condition: ne(variables['SkipTests'], 'true') - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Packages - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)' - ArtifactName: 'Packages' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact VSSetup - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' - ArtifactName: 'VSSetup' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Nightly - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix' - ArtifactName: 'Nightly' - condition: succeeded() - - task: PublishBuildArtifacts@1 - displayName: Publish Artifact Symbols - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' - ArtifactName: 'NativeSymbols' - condition: succeeded() + #-------------------------------------------------------------------------------------------------------------------# + # Signed build # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: + - job: Full_Signed + pool: + name: NetCoreInternal-Pool + queue: buildpool.windows.10.amd64.vs2019 + timeoutInMinutes: 300 + variables: + - group: DotNet-Blob-Feed + - group: DotNet-Symbol-Server-Pats + - group: DotNet-DevDiv-Insertion-Workflow-Variables + - name: _SignType + value: Real + - name: _DotNetPublishToBlobFeed + value: true + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + -testAll + -officialSkipTests $(SkipTests) + /p:SignType=$(_SignType) + /p:DotNetSignType=$(_SignType) + /p:MicroBuild_SigningEnabled=true + /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:TeamName=$(_TeamName) + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:PublishToSymbolServer=true + /p:VisualStudioDropName=$(VisualStudioDropName) + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)' + ArtifactName: 'Test Logs' + publishLocation: Container + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Packages + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)' + ArtifactName: 'Packages' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact VSSetup + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + ArtifactName: 'VSSetup' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Nightly + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix' + ArtifactName: 'Nightly' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Symbols + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' + ArtifactName: 'NativeSymbols' + condition: succeeded() + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropName: $(VisualStudioDropName) + DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + AccessToken: $(dn-bot-devdiv-drop-rw-code-rw) + condition: succeeded() -#---------------------------------------------------------------------------------------------------------------------# -# PR builds # -#---------------------------------------------------------------------------------------------------------------------# -- ${{ if eq(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: + #-------------------------------------------------------------------------------------------------------------------# + # PR builds # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: - # Windows - - job: Windows - pool: - vmImage: windows-2019 - timeoutInMinutes: 120 - strategy: - maxParallel: 4 - matrix: - desktop_release: - _configuration: Release - _testKind: testDesktop - coreclr_release: - _configuration: Release - _testKind: testCoreclr - fsharpqa_release: - _configuration: Release - _testKind: testFSharpQA - vs_release: - _configuration: Release - _testKind: testVs - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' - continueOnError: true - condition: ne(variables['_testKind'], 'testFSharpQA') - - task: PublishBuildArtifacts@1 - displayName: Publish Test Logs - inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' - ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' - publishLocation: Container - continueOnError: true - condition: eq(variables['_testKind'], 'testFSharpQA') + # Windows + - job: Windows + pool: + vmImage: windows-2019 + timeoutInMinutes: 120 + strategy: + maxParallel: 4 + matrix: + desktop_release: + _configuration: Release + _testKind: testDesktop + coreclr_release: + _configuration: Release + _testKind: testCoreclr + fsharpqa_release: + _configuration: Release + _testKind: testFSharpQA + vs_release: + _configuration: Release + _testKind: testVs + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' + continueOnError: true + condition: ne(variables['_testKind'], 'testFSharpQA') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' + ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' + publishLocation: Container + continueOnError: true + condition: eq(variables['_testKind'], 'testFSharpQA') - # Linux - - job: Linux - pool: - vmImage: ubuntu-16.04 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: always() + # Linux + - job: Linux + pool: + vmImage: ubuntu-16.04 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() - # MacOS - - job: MacOS - pool: - vmImage: macOS-10.13 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: always() + # MacOS + - job: MacOS + pool: + vmImage: macOS-10.13 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() - # Source Build Linux - - job: SourceBuild_Linux - pool: - vmImage: ubuntu-16.04 - steps: - - checkout: self - clean: true - - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - displayName: Build + # Source Build Linux + - job: SourceBuild_Linux + pool: + vmImage: ubuntu-16.04 + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration Release /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true + displayName: Build - # Source Build Windows - - job: SourceBuild_Windows - pool: - vmImage: windows-2019 - steps: - - checkout: self - clean: true - - script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true - displayName: Build + # Source Build Windows + - job: SourceBuild_Windows + pool: + vmImage: windows-2019 + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -configuration Release -noSign /p:DotNetBuildFromSource=true /p:FSharpSourceBuild=true + displayName: Build - # Up-to-date - - job: UpToDate_Windows - pool: - vmImage: windows-2019 - steps: - - checkout: self - clean: true - - task: PowerShell@2 - displayName: Run up-to-date build check - inputs: - filePath: eng\tests\UpToDate.ps1 - arguments: -configuration $(_BuildConfig) -ci -binaryLog + # Up-to-date + - job: UpToDate_Windows + pool: + vmImage: windows-2019 + steps: + - checkout: self + clean: true + - task: PowerShell@2 + displayName: Run up-to-date build check + inputs: + filePath: eng\tests\UpToDate.ps1 + arguments: -configuration $(_BuildConfig) -ci -binaryLog -#---------------------------------------------------------------------------------------------------------------------# -# FCS builds # -#---------------------------------------------------------------------------------------------------------------------# + #-------------------------------------------------------------------------------------------------------------------# + # FCS builds # + #-------------------------------------------------------------------------------------------------------------------# -- ${{ if eq(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishTestResults: false - enablePublishBuildAssets: true - enablePublishUsingPipelines: false - enableTelemetry: true - helixRepo: dotnet/fsharp - jobs: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: false + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: - - job: Windows_FCS - pool: - vmImage: windows-2019 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: fcs\build.cmd TestAndNuget - displayName: Build / Test - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' - continueOnError: true - condition: always() + - job: Windows_FCS + pool: + vmImage: windows-2019 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: fcs\build.cmd TestAndNuget + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' + continueOnError: true + condition: always() - - job: Linux_FCS - pool: - vmImage: ubuntu-16.04 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./fcs/build.sh Build - displayName: Build + - job: Linux_FCS + pool: + vmImage: ubuntu-16.04 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build - - job: MacOS_FCS - pool: - vmImage: macOS-10.13 - variables: - - name: _SignType - value: Test - steps: - - checkout: self - clean: true - - script: ./fcs/build.sh Build - displayName: Build + - job: MacOS_FCS + pool: + vmImage: macOS-10.13 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./fcs/build.sh Build + displayName: Build + +#---------------------------------------------------------------------------------------------------------------------# +# Post Build # +#---------------------------------------------------------------------------------------------------------------------# +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/common/templates/post-build/post-build.yml + parameters: + # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 314fc6637d11..adbe1a2eb4a4 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -278,6 +278,25 @@ function Prepare-TempDir() { Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir } +function EnablePreviewSdks() { + if (Test-Path variable:global:_MSBuildExe) { + return + } + $vsInfo = LocateVisualStudio + if ($vsInfo -eq $null) { + # Preview SDKs are allowed when no Visual Studio instance is installed + return + } + + $vsId = $vsInfo.instanceId + $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] + + $instanceDir = Join-Path ${env:USERPROFILE} "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId" + Create-Directory $instanceDir + $sdkFile = Join-Path $instanceDir "sdk.txt" + 'UsePreviews=True' | Set-Content $sdkFile +} + try { Process-Arguments @@ -289,6 +308,7 @@ try { if ($ci) { Prepare-TempDir + EnablePreviewSdks # enable us to build netcoreapp2.1 binaries $global:_DotNetInstallDir = Join-Path $RepoRoot ".dotnet" diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8a78856321ee..92b380533f7a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - a8e982d3bac01d8f4f91a4c57191147570079448 + def377f94747dac91482aad67b33a1c011ffc770 diff --git a/eng/Versions.props b/eng/Versions.props index a1b0227d5b76..cc1b4f20e347 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -12,25 +12,25 @@ beta - 4.7 + 4.8 $(FSLanguageVersion) - $(FSCoreMajorVersion).3 + $(FSCoreMajorVersion).1 $(FSCoreMajorVersion).0 $(FSCoreVersionPrefix).0 - 4.6.2 + 4.7.0 $(FSCorePackageVersion)-$(PreReleaseVersionLabel).* - 10.6 + 10.7 $(FSPackageMajorVersion).0 $(FSPackageVersion) $(FSPackageVersion).0 16 - 3 + 4 $(VSMajorVersion).0 $(VSMajorVersion).$(VSMinorVersion).0 $(VSAssemblyVersionPrefix).0 @@ -59,10 +59,9 @@ https://dotnet.myget.org/F/interactive-window/api/v3/index.json; https://myget.org/F/vs-devcore/api/v3/index.json; https://myget.org/F/vs-editor/api/v3/index.json; - https://vside.myget.org/F/vssdk/api/v3/index.json; - https://vside.myget.org/F/vs-impl/api/v3/index.json; + https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json; + https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json; https://myget.org/F/roslyn_concord/api/v3/index.json; - https://vside.myget.org/F/devcore/api/v3/index.json; $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\RoslynPackageVersion.txt').Trim()) @@ -101,6 +100,8 @@ $(RoslynVersion) $(RoslynVersion) $(RoslynVersion) + $(RoslynVersion) + 2.0.17 $(RoslynVersion) 16.0.461 @@ -117,6 +118,8 @@ 16.1.89 1.1.4322 16.1.89 + 16.1.89 + 16.0.28226-alpha 16.1.28916.169 16.1.28917.181 16.1.3121 @@ -126,6 +129,7 @@ 8.0.50728 7.10.6071 16.1.28917.181 + 16.1.89 8.0.50728 16.0.201-pre-g7d366164d0 2.3.6152103 @@ -142,7 +146,9 @@ 10.0.30320 11.0.61031 12.0.30111 + 16.0.0 16.1.89 + 16.1.89 7.10.6071 8.0.50728 10.0.30320 @@ -169,7 +175,8 @@ 1.0.30 8.0.0-alpha 2.7.0 - 2.0.3 + 3.0.0-preview-27318-01 + 3.0.0-preview-27318-01 15.8.0 1.0.0 4.3.0 diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config index fb9b71286370..3f97ac2f16cc 100644 --- a/eng/common/sdl/packages.config +++ b/eng/common/sdl/packages.config @@ -1,4 +1,4 @@  - + diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 5837f3d56d3a..f657a4dc91de 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -46,7 +46,7 @@ jobs: continueOnError: ${{ parameters.continueOnError }} - ${{ if eq(parameters.overrideParameters, '') }}: - powershell: eng/common/sdl/execute-all-sdl-tools.ps1 - -GuardianPackageName Microsoft.Guardian.Cli.0.6.0 + -GuardianPackageName Microsoft.Guardian.Cli.0.7.1 -NugetPackageDirectory $(Build.SourcesDirectory)\.packages -AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw) ${{ parameters.additionalParameters }} diff --git a/eng/targets/Settings.props b/eng/targets/Settings.props index 6360088320fa..329028818205 100644 --- a/eng/targets/Settings.props +++ b/eng/targets/Settings.props @@ -2,7 +2,6 @@ MIT - Microsoft and F# Software Foundation Visual F# Compiler FSharp functional programming $(ArtifactsBinDir) diff --git a/global.json b/global.json index fe2ea05490f0..341cf0849986 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19378.1", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19380.3", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets index 9254d577705d..e0c253f4916f 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets @@ -273,13 +273,6 @@ this file. $(OtherFlags) - - - preview - - {0} for F# {1} - F# {1} の {0} + F# {1} のための {0} diff --git a/src/fsharp/FSharp.Compiler.LanguageServer/FSharp.Compiler.LanguageServer.fsproj b/src/fsharp/FSharp.Compiler.LanguageServer/FSharp.Compiler.LanguageServer.fsproj index 3180a0a52fba..48e2c5104a55 100644 --- a/src/fsharp/FSharp.Compiler.LanguageServer/FSharp.Compiler.LanguageServer.fsproj +++ b/src/fsharp/FSharp.Compiler.LanguageServer/FSharp.Compiler.LanguageServer.fsproj @@ -8,6 +8,7 @@ netcoreapp2.1 true Implements the Language Server Protocol (LSP) for F#. + true diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj index 4afaa51f7fff..4bc3e61c1647 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj @@ -6,7 +6,7 @@ FSharp.Core FSharp.Core.nuspec true - FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion) + FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation. diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf index e1e2a27ab6ec..c1837555d36f 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + Hodnota maxDegreeOfParallelism musí být kladná, ale vyskytla se hodnota {0}. diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf index be95b723e68b..bb113a5dd446 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism muss positiv sein, lautete jedoch "{0}". diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf index ad05289fb660..da7f89193635 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism debe ser positivo, era {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf index 46f595fa219c..7dc0ce7839dd 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism doit être positif, était {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf index ea57def3beb5..170e1e51a8ca 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + Il valore di maxDegreeOfParallelism deve essere positivo. È {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf index a62609fafb12..23b3da2999c6 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism には正の値を指定する必要がありますが、{0} が指定されました diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf index 018fd4ac35ac..0b5c94149abf 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism은 양수여야 하는데 {0}였습니다. diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf index 67c614650b94..2fdde8861c9e 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + Wartość maxDegreeOfParallelism musi być dodatnia, a była równa {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf index 01192de36207..78d9107a4720 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism deve ser positivo, foi {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf index 81aa2e856175..c45569be9553 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + Параметр maxDegreeOfParallelism должен иметь положительное значение, указано значение {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf index ab262b8e56db..f168225ae6f2 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism pozitif olmalıdır, değeri: {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf index 58fcba36d976..4995ea340881 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism 必须是正数,它之前是 {0} diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf index 7ebdf213bf59..e89c723874d7 100644 --- a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf +++ b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf @@ -564,7 +564,7 @@ Bad integer supplied to dynamic formatter - 提供給動態格式子的整數錯誤 + 提供給動態格式器的整數錯誤 @@ -709,7 +709,7 @@ maxDegreeOfParallelism must be positive, was {0} - maxDegreeOfParallelism must be positive, was {0} + maxDegreeOfParallelism 必須為正數,原先為 {0} diff --git a/src/fsharp/LanguageFeatures.fs b/src/fsharp/LanguageFeatures.fs index 0ec95606ab17..10fc1cc9c39f 100644 --- a/src/fsharp/LanguageFeatures.fs +++ b/src/fsharp/LanguageFeatures.fs @@ -53,10 +53,10 @@ type LanguageVersion (specifiedVersion) = LanguageFeature.SingleUnderscorePattern, languageVersion47 LanguageFeature.WildCardInForLoop, languageVersion47 LanguageFeature.RelaxWhitespace, languageVersion47 - LanguageFeature.NameOf, languageVersion47 + LanguageFeature.NameOf, previewVersion LanguageFeature.ImplicitYield, languageVersion47 - LanguageFeature.OpenStaticClasses, languageVersion47 LanguageFeature.PackageManagement, previewVersion + LanguageFeature.OpenStaticClasses, previewVersion |] let specified = diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 895f2d1f7298..cf590b69ee39 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -938,6 +938,19 @@ let TakeObjAddrForMethodCall g amap (minfo: MethInfo) isMutable m objArgs f = let hasCallInfo = ccallInfo.IsSome let mustTakeAddress = hasCallInfo || minfo.ObjArgNeedsAddress(amap, m) let objArgTy = tyOfExpr g objArgExpr + + let isMutable = + match isMutable with + | DefinitelyMutates + | NeverMutates + | AddressOfOp -> isMutable + | PossiblyMutates -> + // Check to see if the method is read-only. Perf optimization. + // If there is an extension member whose first arg is an inref, we must return NeverMutates. + if mustTakeAddress && (minfo.IsReadOnly || minfo.IsReadOnlyExtensionMember (amap, m)) then + NeverMutates + else + isMutable let wrap, objArgExprAddr, isReadOnly, _isWriteOnly = mkExprAddrOfExpr g mustTakeAddress hasCallInfo isMutable objArgExpr None m diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index af800ac659d2..5ae1df003fff 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -36,6 +36,7 @@ type NameResolver(g: TcGlobals, amap: Import.ImportMap, infoReader: InfoReader, instantiationGenerator: (range -> Typars -> TypeInst)) = + /// Used to transform typars into new inference typars // instantiationGenerator is a function to help us create the // type parameters by copying them from type parameter specifications read @@ -50,6 +51,7 @@ type NameResolver(g: TcGlobals, member nr.g = g member nr.amap = amap member nr.InfoReader = infoReader + member nr.languageSupportsNameOf = g.langVersion.SupportsFeature LanguageFeature.NameOf //------------------------------------------------------------------------- // Helpers for unionconstrs and recdfields @@ -756,14 +758,14 @@ let AddUnionCases2 bulkAddMode (eUnqualifiedItems: UnqualifiedItems) (ucrefs: Un let item = Item.UnionCase(GeneralizeUnionCaseRef ucref, false) acc.Add (ucref.CaseName, item)) -let AddStaticContentOfTyconRefToNameEnv (g:TcGlobals) (amap: Import.ImportMap) m (nenv: NameResolutionEnv) (tcref:TyconRef) = +let AddStaticContentOfTyconRefToNameEnv (g:TcGlobals) (amap: Import.ImportMap) ad m (nenv: NameResolutionEnv) (tcref:TyconRef) = // If OpenStaticClasses is not enabled then don't do this if amap.g.langVersion.SupportsFeature LanguageFeature.OpenStaticClasses then let ty = generalizedTyconRef tcref let infoReader = InfoReader(g,amap) let items = [| let methGroups = - AllMethInfosOfTypeInScope ResultCollectionSettings.AllResults infoReader nenv None AccessorDomain.AccessibleFromSomeFSharpCode PreferOverrides m ty + AllMethInfosOfTypeInScope ResultCollectionSettings.AllResults infoReader nenv None ad PreferOverrides m ty |> List.groupBy (fun m -> m.LogicalName) for (methName, methGroup) in methGroups do @@ -772,20 +774,30 @@ let AddStaticContentOfTyconRefToNameEnv (g:TcGlobals) (amap: Import.ImportMap) m yield KeyValuePair(methName, Item.MethodGroup(methName, methGroup, None)) let propInfos = - AllPropInfosOfTypeInScope ResultCollectionSettings.AllResults infoReader nenv None AccessorDomain.AccessibleFromSomeFSharpCode PreferOverrides m ty + AllPropInfosOfTypeInScope ResultCollectionSettings.AllResults infoReader nenv None ad PreferOverrides m ty |> List.groupBy (fun m -> m.PropertyName) for (propName, propInfos) in propInfos do let propInfos = propInfos |> List.filter (fun m -> m.IsStatic) for propInfo in propInfos do - yield KeyValuePair(propName , Item.Property(propName,[propInfo])) |] + yield KeyValuePair(propName , Item.Property(propName,[propInfo])) + + let fields = + infoReader.GetILFieldInfosOfType(None, ad, m, ty) + |> List.groupBy (fun f -> f.FieldName) + + for (fieldName, fieldInfos) in fields do + let fieldInfos = fieldInfos |> List.filter (fun fi -> fi.IsStatic) + for fieldInfo in fieldInfos do + yield KeyValuePair(fieldName, Item.ILField(fieldInfo)) + |] { nenv with eUnqualifiedItems = nenv.eUnqualifiedItems.AddAndMarkAsCollapsible items } else nenv /// Add any implied contents of a type definition to the environment. -let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g: TcGlobals) amap m nenv (tcref: TyconRef) = +let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g: TcGlobals) amap ad m nenv (tcref: TyconRef) = let isIL = tcref.IsILTycon let ucrefs = if isIL then [] else tcref.UnionCasesAsList |> List.map tcref.MakeNestedUnionCaseRef @@ -858,16 +870,16 @@ let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g: TcGlobals) let nenv = if TryFindFSharpBoolAttribute g g.attrib_AutoOpenAttribute tcref.Attribs = Some true && isStaticClass g tcref then - AddStaticContentOfTyconRefToNameEnv g amap m nenv tcref + AddStaticContentOfTyconRefToNameEnv g amap ad m nenv tcref else nenv nenv /// Add a set of type definitions to the name resolution environment -let AddTyconRefsToNameEnv bulkAddMode ownDefinition g amap m root nenv tcrefs = +let AddTyconRefsToNameEnv bulkAddMode ownDefinition g amap ad m root nenv tcrefs = if isNil tcrefs then nenv else - let env = List.fold (AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition g amap m) nenv tcrefs + let env = List.fold (AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition g amap ad m) nenv tcrefs // Add most of the contents of the tycons en-masse, then flatten the tables if we're opening a module or namespace let tcrefs = Array.ofList tcrefs { env with @@ -966,7 +978,7 @@ and AddModuleOrNamespaceContentsToNameEnv (g: TcGlobals) amap (ad: AccessorDomai let tcref = modref.NestedTyconRef tycon if IsEntityAccessible amap m ad tcref then Some tcref else None) - let nenv = (nenv, tcrefs) ||> AddTyconRefsToNameEnv BulkAdd.Yes false g amap m false + let nenv = (nenv, tcrefs) ||> AddTyconRefsToNameEnv BulkAdd.Yes false g amap ad m false let vrefs = mty.AllValsAndMembers.ToList() |> List.choose (fun x -> if IsAccessible ad x.Accessibility then TryMkValRefInModRef modref x else None) @@ -991,7 +1003,7 @@ and AddEntityContentsToNameEnv g amap ad m root nenv (modref: EntityRef) = if modref.IsModuleOrNamespace then AddModuleOrNamespaceContentsToNameEnv g amap ad m root nenv modref else - AddStaticContentOfTyconRefToNameEnv g amap m nenv modref + AddStaticContentOfTyconRefToNameEnv g amap ad m nenv modref /// Add a single modules or namespace to the name resolution environment let AddModuleOrNamespaceRefToNameEnv g amap m root ad nenv (modref: EntityRef) = @@ -2496,6 +2508,15 @@ let ChooseTyconRefInExpr (ncenv: NameResolver, m, ad, nenv, id: Ident, typeNameR /// that may represent further actions, e.g. further lookups. let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified m ad nenv (typeNameResInfo: TypeNameResolutionInfo) (id: Ident) (rest: Ident list) isOpenDecl = let resInfo = ResolutionInfo.Empty + let canSuggestThisItem (item:Item) = + // All items can be suggested except nameof when it comes from FSharp.Core.dll and the nameof feature is not enabled + match item with + | Item.Value v -> + let isNameOfOperator = valRefEq ncenv.g ncenv.g.nameof_vref v + if isNameOfOperator && not (ncenv.g.langVersion.SupportsFeature LanguageFeature.NameOf) then false + else true + | _ -> true + if first && id.idText = MangledGlobalName then match rest with | [] -> @@ -2534,7 +2555,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified match fresh with | Item.Value value -> let isNameOfOperator = valRefEq ncenv.g ncenv.g.nameof_vref value - if isNameOfOperator && not (ncenv.g.langVersion.SupportsFeature LanguageFeature.NameOf) then + if isNameOfOperator && not (ncenv.languageSupportsNameOf) then // Do not resolve `nameof` if the feature is unsupported, even if it is FSharp.Core None else @@ -2570,7 +2591,8 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified | _ -> let suggestNamesAndTypes (addToBuffer: string -> unit) = for e in nenv.eUnqualifiedItems do - addToBuffer e.Value.DisplayName + if canSuggestThisItem e.Value then + addToBuffer e.Value.DisplayName for e in nenv.TyconsByDemangledNameAndArity fullyQualified do if IsEntityAccessible ncenv.amap m ad e.Value then @@ -2666,7 +2688,8 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified addToBuffer e.Value.DisplayName for e in nenv.eUnqualifiedItems do - addToBuffer e.Value.DisplayName + if canSuggestThisItem e.Value then + addToBuffer e.Value.DisplayName match innerSearch with | Exception (UndefinedName(0, _, id1, suggestionsF)) when Range.equals id.idRange id1.idRange -> diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index 4d809d435a36..a1567ed43bfe 100755 --- a/src/fsharp/NameResolution.fsi +++ b/src/fsharp/NameResolution.fsi @@ -22,6 +22,7 @@ type NameResolver = member InfoReader : InfoReader member amap : ImportMap member g : TcGlobals + member languageSupportsNameOf : bool /// Get the active pattern elements defined in a module, if any. Cache in the slot in the module type. val ActivePatternElemsOfModuleOrNamespace : ModuleOrNamespaceRef -> NameMap @@ -186,7 +187,7 @@ val internal AddValRefToNameEnv : NameResolutionEnv -> ValRef val internal AddActivePatternResultTagsToNameEnv : ActivePatternInfo -> NameResolutionEnv -> TType -> range -> NameResolutionEnv /// Add a list of type definitions to the name resolution environment -val internal AddTyconRefsToNameEnv : BulkAdd -> bool -> TcGlobals -> ImportMap -> range -> bool -> NameResolutionEnv -> TyconRef list -> NameResolutionEnv +val internal AddTyconRefsToNameEnv : BulkAdd -> bool -> TcGlobals -> ImportMap -> AccessorDomain -> range -> bool -> NameResolutionEnv -> TyconRef list -> NameResolutionEnv /// Add an F# exception definition to the name resolution environment val internal AddExceptionDeclsToNameEnv : BulkAdd -> NameResolutionEnv -> TyconRef -> NameResolutionEnv diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index dd1ec5c2af5b..d97766ac1b9d 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -263,7 +263,8 @@ let GetLimitValByRef cenv env m v = { scope = scope; flags = flags } let LimitVal cenv (v: Val) limit = - cenv.limitVals.[v.Stamp] <- limit + if not v.IgnoresByrefScope then + cenv.limitVals.[v.Stamp] <- limit let BindVal cenv env (v: Val) = //printfn "binding %s..." v.DisplayName diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index 18894044784e..91a63819dabc 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -3004,8 +3004,8 @@ let isByrefTyconRef (g: TcGlobals) (tcref: TyconRef) = let isByrefLikeTyconRef (g: TcGlobals) m (tcref: TyconRef) = tcref.CanDeref && match tcref.TryIsByRefLike with - | Some res -> res - | None -> + | ValueSome res -> res + | _ -> let res = isByrefTyconRef g tcref || (isStructTyconRef tcref && TyconRefHasAttribute g m g.attrib_IsByRefLikeAttribute tcref) @@ -5941,34 +5941,56 @@ let mkAndSimplifyMatch spBind exprm matchm ty tree targets = //------------------------------------------------------------------------- type Mutates = AddressOfOp | DefinitelyMutates | PossiblyMutates | NeverMutates -exception DefensiveCopyWarning of string * range +exception DefensiveCopyWarning of string * range let isRecdOrStructTyconRefAssumedImmutable (g: TcGlobals) (tcref: TyconRef) = tcref.CanDeref && not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref) || - tyconRefEq g tcref g.decimal_tcr || + tyconRefEq g tcref g.decimal_tcr || tyconRefEq g tcref g.date_tcr -let isRecdOrStructTyconRefReadOnly (g: TcGlobals) m (tcref: TyconRef) = +let isTyconRefReadOnly g m (tcref: TyconRef) = tcref.CanDeref && - match tcref.TryIsReadOnly with - | Some res -> res - | None -> - let isImmutable = isRecdOrStructTyconRefAssumedImmutable g tcref - let hasAttrib = TyconRefHasAttribute g m g.attrib_IsReadOnlyAttribute tcref - let res = isImmutable || hasAttrib - tcref.SetIsReadOnly res + if + match tcref.TryIsReadOnly with + | ValueSome res -> res + | _ -> + let res = TyconRefHasAttribute g m g.attrib_IsReadOnlyAttribute tcref + tcref.SetIsReadOnly res + res + then true + else tcref.IsEnumTycon + +let isTyconRefAssumedReadOnly g (tcref: TyconRef) = + tcref.CanDeref && + match tcref.TryIsAssumedReadOnly with + | ValueSome res -> res + | _ -> + let res = isRecdOrStructTyconRefAssumedImmutable g tcref + tcref.SetIsAssumedReadOnly res res -let isRecdOrStructTyReadOnly (g: TcGlobals) m ty = +let isRecdOrStructTyconRefReadOnlyAux g m isInref (tcref: TyconRef) = + if isInref && tcref.IsILStructOrEnumTycon then + isTyconRefReadOnly g m tcref + else + isTyconRefReadOnly g m tcref || isTyconRefAssumedReadOnly g tcref + +let isRecdOrStructTyconRefReadOnly g m tcref = + isRecdOrStructTyconRefReadOnlyAux g m false tcref + +let isRecdOrStructTyReadOnlyAux (g: TcGlobals) m isInref ty = match tryDestAppTy g ty with | ValueNone -> false - | ValueSome tcref -> isRecdOrStructTyconRefReadOnly g m tcref + | ValueSome tcref -> isRecdOrStructTyconRefReadOnlyAux g m isInref tcref + +let isRecdOrStructTyReadOnly g m ty = + isRecdOrStructTyReadOnlyAux g m false ty -let CanTakeAddressOf g m ty mut = +let CanTakeAddressOf g m isInref ty mut = match mut with | NeverMutates -> true - | PossiblyMutates -> isRecdOrStructTyReadOnly g m ty + | PossiblyMutates -> isRecdOrStructTyReadOnlyAux g m isInref ty | DefinitelyMutates -> false | AddressOfOp -> true // you can take the address but you might get a (readonly) inref as a result @@ -5996,7 +6018,7 @@ let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref: ValRef) mut = // || valRefInThisAssembly g.compilingFslib vref // This is because we don't actually guarantee to generate static backing fields for all values like these, e.g. simple constants "let x = 1". // We always generate a static property but there is no field to take an address of - CanTakeAddressOf g m vref.Type mut + CanTakeAddressOf g m false vref.Type mut let MustTakeAddressOfVal (g: TcGlobals) (vref: ValRef) = vref.IsMutable && @@ -6008,7 +6030,7 @@ let MustTakeAddressOfByrefGet (g: TcGlobals) (vref: ValRef) = let CanTakeAddressOfByrefGet (g: TcGlobals) (vref: ValRef) mut = isInByrefTy g vref.Type && - CanTakeAddressOf g vref.Range (destByrefTy g vref.Type) mut + CanTakeAddressOf g vref.Range true (destByrefTy g vref.Type) mut let MustTakeAddressOfRecdField (rfref: RecdField) = // Static mutable fields must be private, hence we don't have to take their address @@ -6021,14 +6043,18 @@ let CanTakeAddressOfRecdFieldRef (g: TcGlobals) m (rfref: RecdFieldRef) tinst mu // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib rfref.TyconRef && not rfref.RecdField.IsMutable && - CanTakeAddressOf g m (actualTyOfRecdFieldRef rfref tinst) mut + CanTakeAddressOf g m false (actualTyOfRecdFieldRef rfref tinst) mut let CanTakeAddressOfUnionFieldRef (g: TcGlobals) m (uref: UnionCaseRef) cidx tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib uref.TyconRef && let rfref = uref.FieldByIndex cidx not rfref.IsMutable && - CanTakeAddressOf g m (actualTyOfUnionFieldRef uref cidx tinst) mut + CanTakeAddressOf g m false (actualTyOfUnionFieldRef uref cidx tinst) mut + +let mkDerefAddrExpr mAddrGet expr mExpr exprTy = + let v, _ = mkCompGenLocal mAddrGet "byrefReturn" exprTy + mkCompGenLet mExpr v expr (mkAddrGet mAddrGet (mkLocalValRef v)) /// Make the address-of expression and return a wrapper that adds any allocated locals at an appropriate scope. /// Also return a flag that indicates if the resulting pointer is a not a pointer where writing is allowed and will @@ -6166,8 +6192,12 @@ let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress // Take a defensive copy let tmp, _ = match mut with - | NeverMutates -> mkCompGenLocal m "copyOfStruct" ty + | NeverMutates -> mkCompGenLocal m "copyOfStruct" ty | _ -> mkMutableCompGenLocal m "copyOfStruct" ty + + // This local is special in that it ignore byref scoping rules. + tmp.SetIgnoresByrefScope() + let readonly = true let writeonly = false Some (tmp, expr), (mkValAddr m readonly (mkLocalValRef tmp)), readonly, writeonly diff --git a/src/fsharp/TastOps.fsi b/src/fsharp/TastOps.fsi index 1da22742300f..6119007d52c3 100755 --- a/src/fsharp/TastOps.fsi +++ b/src/fsharp/TastOps.fsi @@ -369,6 +369,9 @@ exception DefensiveCopyWarning of string * range type Mutates = AddressOfOp | DefinitelyMutates | PossiblyMutates | NeverMutates +/// Helper to create an expression that dereferences an address. +val mkDerefAddrExpr: mAddrGet: range -> expr: Expr -> mExpr: range -> exprTy: TType -> Expr + /// Helper to take the address of an expression val mkExprAddrOfExprAux : TcGlobals -> bool -> bool -> Mutates -> Expr -> ValRef option -> range -> (Val * Expr) option * Expr * bool * bool diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index bf70c63a178e..58cc3af35f10 100644 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -358,7 +358,7 @@ let AddLocalExnDefnAndReport tcSink scopem env (exnc: Tycon) = /// Add a list of type definitions to TcEnv let AddLocalTyconRefs ownDefinition g amap m tcrefs env = if isNil tcrefs then env else - { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.No ownDefinition g amap m false env.eNameResEnv tcrefs } + { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.No ownDefinition g amap env.eAccessRights m false env.eNameResEnv tcrefs } /// Add a list of type definitions to TcEnv let AddLocalTycons g amap m (tycons: Tycon list) env = @@ -407,7 +407,7 @@ let AddNonLocalCcu g amap scopem env assemblyName (ccu: CcuThunk, internalsVisib let env = AddRootModuleOrNamespaceRefs g amap scopem env modrefs let env = if isNil tcrefs then env else - { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.Yes false g amap scopem true env.eNameResEnv tcrefs } + { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.Yes false g amap env.eAccessRights scopem true env.eNameResEnv tcrefs } env /// Adjust the TcEnv to account for a fully processed "namespace" declaration in thie file @@ -418,7 +418,7 @@ let AddLocalRootModuleOrNamespace tcSink g amap scopem env (mtyp: ModuleOrNamesp let tcrefs = mtyp.TypeAndExceptionDefinitions |> List.map mkLocalTyconRef let env = AddRootModuleOrNamespaceRefs g amap scopem env modrefs let env = { env with - eNameResEnv = if isNil tcrefs then env.eNameResEnv else AddTyconRefsToNameEnv BulkAdd.No false g amap scopem true env.eNameResEnv tcrefs + eNameResEnv = if isNil tcrefs then env.eNameResEnv else AddTyconRefsToNameEnv BulkAdd.No false g amap env.eAccessRights scopem true env.eNameResEnv tcrefs eUngeneralizableItems = addFreeItemOfModuleTy mtyp env.eUngeneralizableItems } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env @@ -3394,8 +3394,7 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr let currentExpr, enumElemTy = // Implicitly dereference byref for expr 'for x in ...' if isByrefTy cenv.g enumElemTy then - let v, _ = mkCompGenLocal m "byrefReturn" enumElemTy - let expr = mkCompGenLet currentExpr.Range v currentExpr (mkAddrGet m (mkLocalValRef v)) + let expr = mkDerefAddrExpr m currentExpr currentExpr.Range enumElemTy expr, destByrefTy cenv.g enumElemTy else currentExpr, enumElemTy @@ -4139,9 +4138,8 @@ let buildApp cenv expr resultTy arg m = | _ when isByrefTy g resultTy -> // Handle byref returns, byref-typed returns get implicitly dereferenced - let v, _ = mkCompGenLocal m "byrefReturn" resultTy let expr = expr.SupplyArgument (arg, m) - let expr = mkCompGenLet m v expr.Expr (mkAddrGet m (mkLocalValRef v)) + let expr = mkDerefAddrExpr m expr.Expr m resultTy let resultTy = destByrefTy g resultTy MakeApplicableExprNoFlex cenv expr, resultTy @@ -10214,8 +10212,7 @@ and TcMethodApplication // byref-typed returns get implicitly dereferenced let vty = tyOfExpr cenv.g callExpr0 if isByrefTy cenv.g vty then - let v, _ = mkCompGenLocal mMethExpr "byrefReturn" vty - mkCompGenLet mMethExpr v callExpr0 (mkAddrGet mMethExpr (mkLocalValRef v)) + mkDerefAddrExpr mMethExpr callExpr0 mMethExpr vty else callExpr0 diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf index 404171af9a33..0e7145c703e2 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf @@ -14,27 +14,27 @@ - INPUT FILES - - - EINGABEDATEIEN - + – EINGABEDATEIEN – - CODE GENERATION - - - CODEGENERIERUNG - + – CODEGENERIERUNG – - ERRORS AND WARNINGS - - - FEHLER UND WARNUNGEN - + – FEHLER UND WARNUNGEN – - LANGUAGE - - - SPRACHE - + – SPRACHE – - MISCELLANEOUS - - - VERSCHIEDENES - + – VERSCHIEDENES – @@ -199,7 +199,7 @@ - Aborting main thread... - - Hauptthread wird abgebrochen... + – Hauptthread wird abgebrochen... diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf index 0751b4601e42..c70b2e1dd3c2 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf @@ -129,7 +129,7 @@ gen - gen + 全般 diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf index 295ea6749571..4ba5fc71b714 100644 --- a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf @@ -74,7 +74,7 @@ Execute interactions on a Windows Forms event loop (on by default) - 在 Windows Form 事件迴圈上執行互動 (預設為開啟) + 在 Windows Forms 事件迴圈上執行互動 (預設為開啟) @@ -99,7 +99,7 @@ A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. - 啟動 F# Interactive 處理序時發生問題。這可能是因為背景處理序主控台對於支援某些 Windows 系統上具備 Unicode 支援功能之應用程式的已知問題所造成。請嘗試選取 [工具]5D; -> [選項]5D; -> [F# Interactive for Visual Studio]5D;,然後輸入 '--fsi-server-no-unicode'。 + 啟動 F# 互動處理序時發生問題。這可能是因為背景處理序主控台對於支援某些 Windows 系統上具備 Unicode 支援功能之應用程式的已知問題所造成。請嘗試選取 [工具] -> [選項] -> [F# Interactive for Visual Studio],然後輸入 '--fsi-server-no-unicode'。 @@ -139,7 +139,7 @@ F# Interactive directives: - F# Interactive 指示詞: + F# 互動指示詞: @@ -174,7 +174,7 @@ F# Interactive command line options: - F# Interactive 命令列選項: + F# 互動命令列選項: @@ -214,7 +214,7 @@ --> Referenced '{0}' (file may be locked by F# Interactive process) - --> 參考的 '{0}' (檔案可能已被 F# Interactive 處理序鎖定) + --> 參考的 '{0}' (檔案可能已被 F# 互動處理序鎖定) @@ -264,7 +264,7 @@ Prevents references from being locked by the F# Interactive process - 避免參考遭 F# 互動式處理序封鎖 + 避免參考遭 F# 互動處理序封鎖 diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs index dd6f8b0e3f3e..4ca16f77cdd2 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -835,7 +835,15 @@ type ILMethInfo = member x.IsDllImport (g: TcGlobals) = match g.attrib_DllImportAttribute with | None -> false - | Some (AttribInfo(tref, _)) ->x.RawMetadata.CustomAttrs |> TryDecodeILAttribute g tref |> Option.isSome + | Some attr -> + x.RawMetadata.CustomAttrs + |> TryFindILAttribute attr + + /// Indicates if the method is marked with the [] attribute. This is done by looking at the IL custom attributes on + /// the method. + member x.IsReadOnly (g: TcGlobals) = + x.RawMetadata.CustomAttrs + |> TryFindILAttribute g.attrib_IsReadOnlyAttribute /// Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. /// An instance extension method returns one object argument. @@ -1238,6 +1246,25 @@ type MethInfo = member x.IsStruct = isStructTy x.TcGlobals x.ApparentEnclosingType + /// Indicates if this method is read-only; usually by the [] attribute. + /// Must be an instance method. + /// Receiver must be a struct type. + member x.IsReadOnly = + // Perf Review: Is there a way we can cache this result? + x.IsInstance && + x.IsStruct && + match x with + | ILMeth (g, ilMethInfo, _) -> ilMethInfo.IsReadOnly g + | FSMeth _ -> false // F# defined methods not supported yet. Must be a language feature. + | _ -> false + + /// Indicates if this method is an extension member that is read-only. + /// An extension member is considered read-only if the first argument is a read-only byref (inref) type. + member x.IsReadOnlyExtensionMember (amap: Import.ImportMap, m) = + x.IsExtensionMember && + x.TryObjArgByrefType(amap, m, x.FormalMethodInst) + |> Option.exists (isInByrefTy amap.g) + /// Build IL method infos. static member CreateILMeth (amap: Import.ImportMap, m, ty: TType, md: ILMethodDef) = let tinfo = ILTypeInfo.FromType amap.g ty diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs index d59c33f700f7..6e063cd83141 100644 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -116,133 +116,137 @@ type ValFlags(flags: int64) = new (recValInfo, baseOrThis, isCompGen, inlineInfo, isMutable, isModuleOrMemberBinding, isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal) = let flags = (match baseOrThis with - | BaseVal -> 0b0000000000000000000L - | CtorThisVal -> 0b0000000000000000010L - | NormalVal -> 0b0000000000000000100L - | MemberThisVal -> 0b0000000000000000110L) ||| - (if isCompGen then 0b0000000000000001000L - else 0b00000000000000000000L) ||| + | BaseVal -> 0b00000000000000000000L + | CtorThisVal -> 0b00000000000000000010L + | NormalVal -> 0b00000000000000000100L + | MemberThisVal -> 0b00000000000000000110L) ||| + (if isCompGen then 0b00000000000000001000L + else 0b000000000000000000000L) ||| (match inlineInfo with - | ValInline.PseudoVal -> 0b0000000000000000000L - | ValInline.Always -> 0b0000000000000010000L - | ValInline.Optional -> 0b0000000000000100000L - | ValInline.Never -> 0b0000000000000110000L) ||| + | ValInline.PseudoVal -> 0b00000000000000000000L + | ValInline.Always -> 0b00000000000000010000L + | ValInline.Optional -> 0b00000000000000100000L + | ValInline.Never -> 0b00000000000000110000L) ||| (match isMutable with - | Immutable -> 0b0000000000000000000L - | Mutable -> 0b0000000000001000000L) ||| + | Immutable -> 0b00000000000000000000L + | Mutable -> 0b00000000000001000000L) ||| (match isModuleOrMemberBinding with - | false -> 0b0000000000000000000L - | true -> 0b0000000000010000000L) ||| + | false -> 0b00000000000000000000L + | true -> 0b00000000000010000000L) ||| (match isExtensionMember with - | false -> 0b0000000000000000000L - | true -> 0b0000000000100000000L) ||| + | false -> 0b00000000000000000000L + | true -> 0b00000000000100000000L) ||| (match isIncrClassSpecialMember with - | false -> 0b0000000000000000000L - | true -> 0b0000000001000000000L) ||| + | false -> 0b00000000000000000000L + | true -> 0b00000000001000000000L) ||| (match isTyFunc with - | false -> 0b0000000000000000000L - | true -> 0b0000000010000000000L) ||| + | false -> 0b00000000000000000000L + | true -> 0b00000000010000000000L) ||| (match recValInfo with - | ValNotInRecScope -> 0b0000000000000000000L - | ValInRecScope true -> 0b0000000100000000000L - | ValInRecScope false -> 0b0000001000000000000L) ||| + | ValNotInRecScope -> 0b00000000000000000000L + | ValInRecScope true -> 0b00000000100000000000L + | ValInRecScope false -> 0b00000001000000000000L) ||| (match allowTypeInst with - | false -> 0b0000000000000000000L - | true -> 0b0000100000000000000L) ||| + | false -> 0b00000000000000000000L + | true -> 0b00000100000000000000L) ||| (match isGeneratedEventVal with - | false -> 0b0000000000000000000L - | true -> 0b0100000000000000000L) + | false -> 0b00000000000000000000L + | true -> 0b00100000000000000000L) ValFlags flags member x.BaseOrThisInfo = - match (flags &&& 0b0000000000000000110L) with - | 0b0000000000000000000L -> BaseVal - | 0b0000000000000000010L -> CtorThisVal - | 0b0000000000000000100L -> NormalVal - | 0b0000000000000000110L -> MemberThisVal + match (flags &&& 0b00000000000000000110L) with + | 0b00000000000000000000L -> BaseVal + | 0b00000000000000000010L -> CtorThisVal + | 0b00000000000000000100L -> NormalVal + | 0b00000000000000000110L -> MemberThisVal | _ -> failwith "unreachable" - member x.IsCompilerGenerated = (flags &&& 0b0000000000000001000L) <> 0x0L + member x.IsCompilerGenerated = (flags &&& 0b00000000000000001000L) <> 0x0L member x.SetIsCompilerGenerated isCompGen = - let flags = (flags &&& ~~~0b0000000000000001000L) ||| + let flags = (flags &&& ~~~0b00000000000000001000L) ||| (match isCompGen with - | false -> 0b0000000000000000000L - | true -> 0b0000000000000001000L) + | false -> 0b00000000000000000000L + | true -> 0b00000000000000001000L) ValFlags flags member x.InlineInfo = - match (flags &&& 0b0000000000000110000L) with - | 0b0000000000000000000L -> ValInline.PseudoVal - | 0b0000000000000010000L -> ValInline.Always - | 0b0000000000000100000L -> ValInline.Optional - | 0b0000000000000110000L -> ValInline.Never + match (flags &&& 0b00000000000000110000L) with + | 0b00000000000000000000L -> ValInline.PseudoVal + | 0b00000000000000010000L -> ValInline.Always + | 0b00000000000000100000L -> ValInline.Optional + | 0b00000000000000110000L -> ValInline.Never | _ -> failwith "unreachable" member x.MutabilityInfo = - match (flags &&& 0b0000000000001000000L) with - | 0b0000000000000000000L -> Immutable - | 0b0000000000001000000L -> Mutable + match (flags &&& 0b00000000000001000000L) with + | 0b00000000000000000000L -> Immutable + | 0b00000000000001000000L -> Mutable | _ -> failwith "unreachable" member x.IsMemberOrModuleBinding = - match (flags &&& 0b0000000000010000000L) with - | 0b0000000000000000000L -> false - | 0b0000000000010000000L -> true + match (flags &&& 0b00000000000010000000L) with + | 0b00000000000000000000L -> false + | 0b00000000000010000000L -> true | _ -> failwith "unreachable" - member x.WithIsMemberOrModuleBinding = ValFlags(flags ||| 0b0000000000010000000L) + member x.WithIsMemberOrModuleBinding = ValFlags(flags ||| 0b00000000000010000000L) - member x.IsExtensionMember = (flags &&& 0b0000000000100000000L) <> 0L + member x.IsExtensionMember = (flags &&& 0b00000000000100000000L) <> 0L - member x.IsIncrClassSpecialMember = (flags &&& 0b0000000001000000000L) <> 0L + member x.IsIncrClassSpecialMember = (flags &&& 0b00000000001000000000L) <> 0L - member x.IsTypeFunction = (flags &&& 0b0000000010000000000L) <> 0L + member x.IsTypeFunction = (flags &&& 0b00000000010000000000L) <> 0L - member x.RecursiveValInfo = match (flags &&& 0b0000001100000000000L) with - | 0b0000000000000000000L -> ValNotInRecScope - | 0b0000000100000000000L -> ValInRecScope true - | 0b0000001000000000000L -> ValInRecScope false + member x.RecursiveValInfo = match (flags &&& 0b00000001100000000000L) with + | 0b00000000000000000000L -> ValNotInRecScope + | 0b00000000100000000000L -> ValInRecScope true + | 0b00000001000000000000L -> ValInRecScope false | _ -> failwith "unreachable" member x.WithRecursiveValInfo recValInfo = let flags = - (flags &&& ~~~0b0000001100000000000L) ||| + (flags &&& ~~~0b00000001100000000000L) ||| (match recValInfo with - | ValNotInRecScope -> 0b0000000000000000000L - | ValInRecScope true -> 0b0000000100000000000L - | ValInRecScope false -> 0b0000001000000000000L) + | ValNotInRecScope -> 0b00000000000000000000L + | ValInRecScope true -> 0b00000000100000000000L + | ValInRecScope false -> 0b00000001000000000000L) ValFlags flags - member x.MakesNoCriticalTailcalls = (flags &&& 0b0000010000000000000L) <> 0L + member x.MakesNoCriticalTailcalls = (flags &&& 0b00000010000000000000L) <> 0L - member x.WithMakesNoCriticalTailcalls = ValFlags(flags ||| 0b0000010000000000000L) + member x.WithMakesNoCriticalTailcalls = ValFlags(flags ||| 0b00000010000000000000L) - member x.PermitsExplicitTypeInstantiation = (flags &&& 0b0000100000000000000L) <> 0L + member x.PermitsExplicitTypeInstantiation = (flags &&& 0b00000100000000000000L) <> 0L - member x.HasBeenReferenced = (flags &&& 0b0001000000000000000L) <> 0L + member x.HasBeenReferenced = (flags &&& 0b00001000000000000000L) <> 0L - member x.WithHasBeenReferenced = ValFlags(flags ||| 0b0001000000000000000L) + member x.WithHasBeenReferenced = ValFlags(flags ||| 0b00001000000000000000L) - member x.IsCompiledAsStaticPropertyWithoutField = (flags &&& 0b0010000000000000000L) <> 0L + member x.IsCompiledAsStaticPropertyWithoutField = (flags &&& 0b00010000000000000000L) <> 0L - member x.WithIsCompiledAsStaticPropertyWithoutField = ValFlags(flags ||| 0b0010000000000000000L) + member x.WithIsCompiledAsStaticPropertyWithoutField = ValFlags(flags ||| 0b00010000000000000000L) - member x.IsGeneratedEventVal = (flags &&& 0b0100000000000000000L) <> 0L + member x.IsGeneratedEventVal = (flags &&& 0b00100000000000000000L) <> 0L - member x.IsFixed = (flags &&& 0b1000000000000000000L) <> 0L + member x.IsFixed = (flags &&& 0b01000000000000000000L) <> 0L - member x.WithIsFixed = ValFlags(flags ||| 0b1000000000000000000L) + member x.WithIsFixed = ValFlags(flags ||| 0b01000000000000000000L) + + member x.IgnoresByrefScope = (flags &&& 0b10000000000000000000L) <> 0L + + member x.WithIgnoresByrefScope = ValFlags(flags ||| 0b10000000000000000000L) /// Get the flags as included in the F# binary metadata member x.PickledBits = @@ -250,7 +254,7 @@ type ValFlags(flags: int64) = // Clear the IsCompiledAsStaticPropertyWithoutField, only used to determine whether to use a true field for a value, and to eliminate the optimization info for observable bindings // Clear the HasBeenReferenced, only used to report "unreferenced variable" warnings and to help collect 'it' values in FSI.EXE // Clear the IsGeneratedEventVal, since there's no use in propagating specialname information for generated add/remove event vals - (flags &&& ~~~0b0011001100000000000L) + (flags &&& ~~~0b10011001100000000000L) /// Represents the kind of a type parameter [] @@ -423,9 +427,9 @@ type EntityFlags(flags: int64) = /// These two bits represents the on-demand analysis about whether the entity has the IsByRefLike attribute member x.TryIsByRefLike = (flags &&& 0b000000011000000L) |> function - | 0b000000011000000L -> Some true - | 0b000000010000000L -> Some false - | _ -> None + | 0b000000011000000L -> ValueSome true + | 0b000000010000000L -> ValueSome false + | _ -> ValueNone /// Adjust the on-demand analysis about whether the entity has the IsByRefLike attribute member x.WithIsByRefLike flag = @@ -436,14 +440,14 @@ type EntityFlags(flags: int64) = | false -> 0b000000010000000L) EntityFlags flags - /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute member x.TryIsReadOnly = (flags &&& 0b000001100000000L) |> function - | 0b000001100000000L -> Some true - | 0b000001000000000L -> Some false - | _ -> None + | 0b000001100000000L -> ValueSome true + | 0b000001000000000L -> ValueSome false + | _ -> ValueNone - /// Adjust the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + /// Adjust the on-demand analysis about whether the entity has the IsReadOnly attribute member x.WithIsReadOnly flag = let flags = (flags &&& ~~~0b000001100000000L) ||| @@ -452,8 +456,24 @@ type EntityFlags(flags: int64) = | false -> 0b000001000000000L) EntityFlags flags + /// These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct + member x.TryIsAssumedReadOnly = (flags &&& 0b000110000000000L) + |> function + | 0b000110000000000L -> ValueSome true + | 0b000100000000000L -> ValueSome false + | _ -> ValueNone + + /// Adjust the on-demand analysis about whether the entity is assumed to be a readonly struct + member x.WithIsAssumedReadOnly flag = + let flags = + (flags &&& ~~~0b000110000000000L) ||| + (match flag with + | true -> 0b000110000000000L + | false -> 0b000100000000000L) + EntityFlags flags + /// Get the flags as included in the F# binary metadata - member x.PickledBits = (flags &&& ~~~0b000001111000100L) + member x.PickledBits = (flags &&& ~~~0b000111111000100L) #if DEBUG @@ -1065,12 +1085,18 @@ and /// Represents a type definition, exception definition, module definition or /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute member x.SetIsByRefLike b = x.entity_flags <- x.entity_flags.WithIsByRefLike b - /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute member x.TryIsReadOnly = x.entity_flags.TryIsReadOnly - /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute member x.SetIsReadOnly b = x.entity_flags <- x.entity_flags.WithIsReadOnly b + /// These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct + member x.TryIsAssumedReadOnly = x.entity_flags.TryIsAssumedReadOnly + + /// Set the on-demand analysis about whether the entity is assumed to be a readonly struct + member x.SetIsAssumedReadOnly b = x.entity_flags <- x.entity_flags.WithIsAssumedReadOnly b + /// Indicates if this is an F# type definition whose r.h.s. is known to be some kind of F# object model definition member x.IsFSharpObjectModelTycon = match x.TypeReprInfo with | TFSharpObjectRepr _ -> true | _ -> false @@ -2725,6 +2751,9 @@ and [] /// Indicates if the value is pinned/fixed member x.IsFixed = x.val_flags.IsFixed + /// Indicates if the value will ignore byref scoping rules + member x.IgnoresByrefScope = x.val_flags.IgnoresByrefScope + /// Indicates if this value allows the use of an explicit type instantiation (i.e. does it itself have explicit type arguments, /// or does it have a signature?) member x.PermitsExplicitTypeInstantiation = x.val_flags.PermitsExplicitTypeInstantiation @@ -2948,6 +2977,8 @@ and [] member x.SetIsFixed() = x.val_flags <- x.val_flags.WithIsFixed + member x.SetIgnoresByrefScope() = x.val_flags <- x.val_flags.WithIgnoresByrefScope + member x.SetValReprInfo info = match x.val_opt_data with | Some optData -> optData.val_repr_info <- info @@ -3551,12 +3582,18 @@ and /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute member x.SetIsByRefLike b = x.Deref.SetIsByRefLike b - /// The on-demand analysis about whether the entity has the IsByRefLike attribute + /// The on-demand analysis about whether the entity has the IsReadOnly attribute member x.TryIsReadOnly = x.Deref.TryIsReadOnly - /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute member x.SetIsReadOnly b = x.Deref.SetIsReadOnly b + /// The on-demand analysis about whether the entity is assumed to be a readonly struct + member x.TryIsAssumedReadOnly = x.Deref.TryIsAssumedReadOnly + + /// Set the on-demand analysis about whether the entity is assumed to be a readonly struct + member x.SetIsAssumedReadOnly b = x.Deref.SetIsAssumedReadOnly b + /// Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, /// which in F# is called a 'unknown representation' type). member x.IsHiddenReprTycon = x.Deref.IsHiddenReprTycon diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 0fc9dc3f857f..0f281feee495 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Zobrazte si povolené hodnoty verze jazyka a pak zadejte požadovanou verzi, například latest nebo preview. Supported language versions: - Supported language versions: + Podporované jazykové verze: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Nerozpoznaná hodnota {0} pro parametr --langversion; seznam možností zobrazíte zadáním --langversion:? @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Neočekávaný symbol . v definici členu. Očekávalo se with, = nebo jiný token. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Zadejte algoritmus pro výpočet kontrolního součtu zdrojového souboru uloženého v PDB. Podporované hodnoty jsou: SHA1 nebo SHA256 (výchozí). Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Algoritmus {0} není podporovaný. @@ -2039,7 +2039,7 @@ Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - Poznámky typu u metod getter nebo setter vlastnosti se musí předávat až po get() nebo set(v). Příklad: with get() : string = + Poznámky typu u metod getter nebo setter vlastnosti se musí předávat až po get() nebo set(v). Příklad: with get() : string = ... @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + Výraz není pojmenovaný. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + Použití operátoru nameof jako hodnoty funkce první třídy není povolené. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 3d26c0da89e8..210ee3c0ad64 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Zeigen Sie die zulässigen Werte für die Sprachversion an. Geben Sie die Sprachversion als "latest" oder "preview" an. Supported language versions: - Supported language versions: + Unterstützte Sprachversionen: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Unbekannter Wert "{0}" für "--langversion". Verwenden Sie "--langversion:?", um die vollständige Liste anzuzeigen. @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Unerwartetes Symbol "." in der Memberdefinition. Erwartet wurde "with", "=" oder ein anderes Token. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Geben Sie einen Algorithmus für die Berechnung der Quelldateiprüfsumme an, welcher in PDB gespeichert ist. Unterstützte Werte sind: SHA1 oder SHA256 (Standard) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Algorithmus "{0}" wird nicht unterstützt @@ -344,7 +344,7 @@ Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - Ungültige Direktive. Erwartet wurde "#time", "#time \"on\"" oder '#time \"off\"". + Ungültige Direktive. Erwartet wurde "#time", '#time \"on\"' oder '#time \"off\"'. @@ -3969,7 +3969,7 @@ This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - Diese Definition kann nur in einem Typ mit einem primären Konstruktor verwendet werden. Ziehen Sie in Betracht, Argumente zur Typdefinition hinzuzufügen, z. B. "type X(args) = ...". + Diese Definition kann nur in einem Typ mit einem primären Konstruktor verwendet werden. Ziehen Sie in Betracht, Argumente zur Typdefinition hinzuzufügen, z.B. "type X(args) = ...". @@ -4424,7 +4424,7 @@ - INPUT FILES - - - EINGABEDATEIEN - + – EINGABEDATEIEN – @@ -4434,7 +4434,7 @@ - CODE GENERATION - - - CODEGENERIERUNG - + - CODE GENERATION - @@ -4444,17 +4444,17 @@ - MISCELLANEOUS - - - VERSCHIEDENES - + – VERSCHIEDENES – - LANGUAGE - - - SPRACHE - + – SPRACHE – - ERRORS AND WARNINGS - - - FEHLER UND WARNUNGEN - + – FEHLER UND WARNUNGEN – @@ -4979,7 +4979,7 @@ This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). - Dies ist kein gültiges numerisches Literal. Die folgenden numerischen Literale sind z. B. gültig: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Dies ist kein gültiges numerisches Literal. Die folgenden numerischen Literale sind z.B. gültig: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). @@ -5164,12 +5164,12 @@ Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - Entfernen Sie die Leerzeichen zwischen dem Typnamen und dem Typparameter, z. B. "\"type C<'T>\"", statt "type \"C <'T>\"". Typparameter müssen direkt an den Typnamen angeschlossen werden. + Entfernen Sie die Leerzeichen zwischen dem Typnamen und dem Typparameter, z.B. "\"type C<'T>\"", statt "type \"C <'T>\"". Typparameter müssen direkt an den Typnamen angeschlossen werden. Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - Entfernen Sie die Leerzeichen zwischen dem Typnamen und Typparameter, z. B. "\"C<'T>\"" statt "\"C <'T>\"". Typparameter müssen direkt an den Typnamen angeschlossen werden. + Entfernen Sie die Leerzeichen zwischen dem Typnamen und Typparameter, z.B. "\"C<'T>\"" statt "\"C <'T>\"". Typparameter müssen direkt an den Typnamen angeschlossen werden. @@ -5574,7 +5574,7 @@ Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - Statische Verknüpfungen dürfen beim Generieren einer Assembly mit Verweis auf System.Runtime (z. B. eine .NET Core- oder eine portierbare Assembly) nicht für eine Assembly verwendet werden, die auf mscorlib verweist (z. B. eine .NET Framework-Assembly). + Statische Verknüpfungen dürfen beim Generieren einer Assembly mit Verweis auf System.Runtime (z.B. eine .NET Core- oder eine portierbare Assembly) nicht für eine Assembly verwendet werden, die auf mscorlib verweist (z.B. eine .NET Framework-Assembly). @@ -5584,7 +5584,7 @@ Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded) - Deterministische Builds unterstützen nur portable PDB-Dateien (--debug:portable oder --debug:embedded) + Deterministische Builds unterstützen nur portierbare PDBs ("--debug:portable" oder "--debug:embedded"). @@ -6159,7 +6159,7 @@ 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - 'member val'-Definitionen sind nur in Typen mit einem primären Konstruktor zulässig. Möglicherweise sollten Sie Ihrer Typdefinition Argumente hinzufügen, z. B. 'type X(args) = ...'. + 'member val'-Definitionen sind nur in Typen mit einem primären Konstruktor zulässig. Möglicherweise sollten Sie Ihrer Typdefinition Argumente hinzufügen, z.B. 'type X(args) = ...'. @@ -6214,7 +6214,7 @@ This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. - Dies ist kein bekannter Abfrageoperator. Abfrageoperatoren sind Bezeichner wie z. B. 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' und 'averageBy', die mithilfe der entsprechenden Methoden für den Typ 'QueryBuilder' definiert werden. + Dies ist kein bekannter Abfrageoperator. Abfrageoperatoren sind Bezeichner wie z.B. 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' und 'averageBy', die mithilfe der entsprechenden Methoden für den Typ 'QueryBuilder' definiert werden. @@ -6254,7 +6254,7 @@ Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - Argumente für Abfrageoperatoren erfordern möglicherweise Klammern, z. B. "where (x > y)" oder "groupBy (x.Length / 10)". + Argumente für Abfrageoperatoren erfordern möglicherweise Klammern, z.B. "where (x > y)" oder "groupBy (x.Length / 10)". @@ -6839,7 +6839,7 @@ Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. - Wird in Abfrageausdrücken verwendet, um festzulegen, welche Felder oder Spalten extrahiert werden. Dies ist kontextabhängiges Schlüsselwort, d. h. es ist kein reserviertes Wort und funktioniert nur im entsprechenden Kontext als Schlüsselwort. + Wird in Abfrageausdrücken verwendet, um festzulegen, welche Felder oder Spalten extrahiert werden. Dies ist kontextabhängiges Schlüsselwort, d. h. es ist kein reserviertes Wort und funktioniert nur im entsprechenden Kontext als Schlüsselwort. @@ -7059,7 +7059,7 @@ A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' - Ein in einem Modul definierter Wert muss änderbar sein, um die Adresse anzunehmen, z. B. "let mutable x = ...". + Ein in einem Modul definierter Wert muss änderbar sein, um die Adresse anzunehmen, z.B. "let mutable x = ...". @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + Ausdruck hat keinen Namen. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + Die Verwendung des Operators "nameof" als erstklassiger Funktionswert ist nicht zulässig. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 68a75ea22246..ceafc8b791a9 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Mostrar los valores permitidos para la versión de idioma, especificar la versión de idioma como "latest" "preview" Supported language versions: - Supported language versions: + Versiones de lenguaje admitidas: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Valor no reconocido "{0}" para --langversion, use --langversion:? para una lista completa @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Símbolo inesperado "." en la definición de miembro. Se esperaba "with", "=" u otro token. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Especifique el algoritmo para calcular la suma de comprobación del archivo de origen almacenada en PDB. Los valores admitidos son SHA1 o SHA256 (predeterminado) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + No se admite el algoritmo '{0}' @@ -149,7 +149,7 @@ All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. - All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}". @@ -4964,7 +4964,7 @@ Invalid floating point number - número de punto flotante no válido. + Número de punto flotante no válido. @@ -5199,7 +5199,7 @@ The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. - Se infirió que el parámetro "{0}" tiene un tipo byref. Los parámetros de tipo byref deben recibir una anotación de tipo explícita, por ejemplo,"'x1: byref<int>". Cuando se usa, la referencia de un parámetro byref se elimina de forma implícita. + Se infirió que el parámetro "{0}" tiene un tipo byref. Los parámetros de tipo byref deben recibir una anotación de tipo explícita, por ejemplo,"x1: byref<int>". Cuando se usa, la referencia de un parámetro byref se elimina de forma implícita. @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + La expresión no tiene un nombre. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + No se permite el uso del operador "nameof" como un valor de función de primera clase. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 1ceb481db3bf..522e5ea74eb1 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Afficher les valeurs autorisées pour la version du langage, spécifier la version du langage comme 'dernière' ou 'préversion' Supported language versions: - Supported language versions: + Versions linguistiques prises en charge : Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Valeur non reconnue '{0}' pour --langversion use --langversion:? pour la liste complète @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Symbole '.' inattendu dans la définition du membre. 'with','=' ou autre jeton attendu. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Spécifiez l'algorithme pour calculer la somme de contrôle du fichier source stocké au format PDB. Les valeurs prises en charge sont : SHA1 ou SHA256 (par défaut) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Algorithme '{0}' non pris en charge @@ -2259,7 +2259,7 @@ Invalid literal in type - littéral non valide dans le type + Littéral non valide dans le type @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + L'expression n'a pas de nom. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + L'utilisation de l'opérateur 'nameof' comme valeur de fonction de première classe n'est pas autorisée. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index f1934ae6882f..144e4560806e 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Visualizza i valori consentiti per la versione del linguaggio. Specificare la versione del linguaggio, ad esempio 'latest' o 'preview' Supported language versions: - Supported language versions: + Versioni del linguaggio supportate: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Valore '{0}' non riconosciuto per --langversion. Per l'elenco completo usare --langversion:? @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Simbolo '.' imprevisto nella definizione di membro. È previsto 'with', '=' o un altro token. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Consente di specificare l'algoritmo per calcolare il checksum del file di origine archiviato nel file PDB. I valori supportati sono SHA1 e SHA256 (predefinito). Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + L'algoritmo '{0}' non è supportato @@ -1989,7 +1989,7 @@ Syntax error - errore di sintassi + Errore di sintassi @@ -2304,12 +2304,12 @@ The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - La sintassi 'module ... = struct .. end' non è utilizzata nel codice F#. Provare a utilizzare 'module ... = begin .. end' + La sintassi 'module ... = struct .. end' non è usata nel codice F#. Provare a usare 'module ... = begin .. end' The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - La sintassi 'module ... : sig .. end' non è utilizzata nel codice F#. Provare a utilizzare 'module ... = begin .. end' + La sintassi 'module ... : sig .. end' non è usata nel codice F#. Provare a usare 'module ... = begin .. end' @@ -2679,7 +2679,7 @@ This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. - La proprietà contiene un tipo non valido. Le proprietà che usano più argomenti di indicizzatore devono avere tipi nel formato 'ty1 * ty2 -> ty3'.. Le proprietà che restituiscono funzioni devono avere tipi nel formato '(ti1 -> ti2)'. + La proprietà contiene un tipo non valido. Le proprietà che usano più argomenti di indicizzatore devono avere tipi nel formato 'ty1 * ty2 -> ty3'. Le proprietà che restituiscono funzioni devono avere tipi nel formato '(ti1 -> ti2)'. @@ -2824,7 +2824,7 @@ This is not a valid pattern - Criterio non valido + Questo non è un criterio valido @@ -3299,7 +3299,7 @@ This is not a valid name for an active pattern - Il nome non è valido per un criterio attivo + Questo non è un nome valido per un criterio attivo @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + L'espressione non ha un nome. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + L'operatore 'nameof' non è consentito come valore di funzione di prima classe. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index c9d1ae2bfec6..74e2cf9d4c10 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -4,22 +4,22 @@ {0} for F# {1} - F# {1} の {0} + F# {1} のための {0} Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + 言語バージョンで許可された値を表示し、'最新' や 'プレビュー' などの言語バージョンを指定する Supported language versions: - Supported language versions: + サポートされる言語バージョン: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + --langversion の値 '{0}' が認識されません。完全なリストについては、--langversion:? を使用してください @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + メンバー定義に予期しない記号 '.' があります。'with'、'=' またはその他のトークンが必要です。 Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + PDB に格納されているソース ファイル チェックサムを計算するためのアルゴリズムを指定します。サポートされる値は次のとおりです: SHA1 または SHA256 (既定) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + アルゴリズム '{0}' はサポートされていません @@ -254,7 +254,7 @@ Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' - マネージ リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。 + マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。 @@ -279,7 +279,7 @@ Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. - ライブラリまたは複数ファイル アプリケーション内のファイルは、名前空間またはモジュールの宣言から開始する必要があります (例: 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'。アプリケーションの最後のソース ファイルのみ、このような宣言を省略できます。 + ライブラリまたは複数ファイル アプリケーション内のファイルは、名前空間またはモジュールの宣言から開始する必要があります (例: 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule')。アプリケーションの最後のソース ファイルのみ、このような宣言を省略できます。 @@ -2304,7 +2304,7 @@ The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - F# コードでは 'module ... = struct .. end' という構文は使用されません。'module ... = begin .. end' を使用してください。 + F# コードでは ... 'module ... = struct .. end' という構文は使用されません。'module ... = begin .. end' を使用してください。 @@ -3559,8 +3559,7 @@ Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. - 初期化されていない 'val' フィールドは変更可能で、'[<DefaultValue>]' 属性によってマークされている必要があります。'val' フィールドの代わりに 'let' -バインディングの使用を検討してください。 + 初期化されていない 'val' フィールドは変更可能で、'[<DefaultValue>]' 属性によってマークされている必要があります。'val' フィールドの代わりに 'let' バインディングの使用を検討してください。 @@ -5165,13 +5164,12 @@ Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - 型名と型パラメーター間のスペースを削除します。たとえば、\"C <'T>\" ではなく \"type C<'T>\" と入力します。型パラメーターは型名に隣接していなければなりません。 + 型名と型パラメーターの間のスペースを削除します。たとえば、\"C <'T>\" ではなく \"C<'T>\" とします。型パラメーターは型名に隣接して配置する必要があります。 Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - 型名と型パラメーターの間のスペースを削除します。たとえば、 -\"C <'T>\" ではなく \"C<'T>\" とします。型パラメーターは型名に隣接して配置する必要があります。 + 型名と型パラメーターの間のスペースを削除します。たとえば、\"C <'T>\" ではなく \"C<'T>\" とします。型パラメーターは型名に隣接して配置する必要があります。 @@ -7201,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + 式に名前がありません。 Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + 'nameof' 演算子をファーストクラスの関数値として使用することは許可されていません。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index 5b0229b2ebe2..f57a29aba0e7 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + 언어 버전의 허용된 값을 표시하고 '최신' 또는 '미리 보기'와 같은 언어 버전을 지정합니다. Supported language versions: - Supported language versions: + 지원되는 언어 버전: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + 전체 목록에 대한 --langversion use --langversion:?의 인식할 수 없는 값 '{0}'입니다. @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + 멤버 정의의 예기치 않은 기호 '.'입니다. 'with', '=' 또는 기타 토큰이 필요합니다. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + PDB에 저장된 소스 파일 체크섬을 계산하기 위한 알고리즘을 지정합니다. 지원되는 값은 SHA1 또는 SHA256(기본값)입니다. Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + {0}' 알고리즘은 지원되지 않습니다. @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + 식에 이름이 없습니다. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + 'nameof' 연산자는 첫 번째 클래스 함수 값으로 사용할 수 없습니다. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 057bb2c1db82..6efc15c9a83a 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Wyświetl dozwolone wartości dla wersji językowej; określ wersję językową, np. „latest” lub „preview” Supported language versions: - Supported language versions: + Obsługiwane wersje językowe: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Nierozpoznana wartość „{0}” dla parametru –langversion; podaj parametr –langversion:?, aby uzyskać pełną listę @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Nieoczekiwany symbol „.” w definicji składowej. Oczekiwano ciągu „with”, znaku „=” lub innego tokenu. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Określ algorytm obliczania sumy kontrolnej pliku źródłowego przechowywanej w pliku PDB. Obsługiwane wartości to SHA1 lub SHA256 (domyślnie) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Algorytm „{0}” nie jest obsługiwany @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + Wyrażenie nie ma nazwy. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + Używanie operatora „nameof” jako pierwszoklasowej wartości funkcji nie jest dozwolone. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 7ef69a456d75..7fe18582235f 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Exibe os valores permitidos para a versão do idioma, especifica a versão do idioma, como 'mais recente ' ou 'prévia' Supported language versions: - Supported language versions: + Versões de linguagens com suporte: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Valor não reconhecido '{0}' para --langversion use --langversion:? para a lista completa @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Símbolo inesperado '.' na definição de membro. Esperado 'com', '=' ou outro token. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Especifique o algoritmo para calcular a soma de verificação do arquivo de origem armazenada no PDB. Os valores suportados são: SHA1 ou SHA256 (padrão) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Algoritmo '{0}' sem suporte @@ -1989,7 +1989,7 @@ Syntax error - erro de sintaxe + Erro de sintaxe @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + A expressão não tem um nome. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + O uso do operador ' nameof ' como um valor de função de primeira classe não é permitido. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index 36d33c4d0f4a..835df4bcf5fa 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Отображение допустимых значений для версии языка. Укажите версию языка, например, "latest" или "preview". Supported language versions: - Supported language versions: + Поддерживаемые языковые версии: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + Не удалось распознать значение "{0}" для параметра --langversion. Для получения полного списка допустимых значений выполните команду use --langversion:? @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Неожиданный символ "." в определении члена. Ожидаемые инструкции: "with", "=" или другие токены. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + Укажите алгоритм для вычисления контрольной суммы исходного файла, хранящейся в файле PDB. Поддерживаемые значения: SHA1 или SHA256 (по умолчанию) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + Алгоритм "{0}" не поддерживается @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + Выражение не имеет имени. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + Использование оператора "nameof" в качестве значения функции первого класса не допускается. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index 64f91018940e..2864ec51bfcd 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + Dil sürümü için izin verilen değerleri görüntüleyin, dil sürümünü 'en son' veya 'önizleme' örneklerindeki gibi belirtin Supported language versions: - Supported language versions: + Desteklenen dil sürümleri: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + --langversion için '{0}' değeri tanınmıyor. Tam liste için --langversion:? kullanın @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + Üye tanımında '.' sembolü beklenmiyordu. 'with', '=' veya başka bir belirteç bekleniyordu. Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + PDB içinde depolanan kaynak dosyası sağlama toplamını hesaplama algoritmasını belirtin. Desteklenen değerler: SHA1 veya SHA256 (varsayılan) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + {0}' algoritması desteklenmiyor @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + İfade bir ada sahip değil. Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + 'Nameof' işlecinin birinci sınıf işlev değeri olarak kullanılmasına izin verilmez. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 4d2c0c0b5553..dff88058d08c 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + 显示语言版本的允许值,指定语言版本,如“最新”或“预览” Supported language versions: - Supported language versions: + 支持的语言版本: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + --langversion 的值“{0}”无法识别,使用 --langversion:? 获取完整列表。 @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + 成员定义中有意外的符号 "."。预期 "with"、"+" 或其他标记。 Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + 指定用于计算存储在 PDB 中的源文件校验的算法。支持的值是:SHA1 或 SHA256(默认) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + 不支持算法“{0}” @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + 表达式不具有名称。 Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + 不允许使用 "nameof" 运算符作为第一类函数的值。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index 0ee7978bfb41..141750b76c72 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -9,17 +9,17 @@ Display the allowed values for language version, specify language version such as 'latest' or 'preview' - Display the allowed values for language version, specify language version such as 'latest' or 'preview' + 顯示語言版本允許的值,指定 'latest' 或 'preview' 等語言版本 Supported language versions: - Supported language versions: + 支援的語言版本: Unrecognized value '{0}' for --langversion use --langversion:? for complete list - Unrecognized value '{0}' for --langversion use --langversion:? for complete list + 對 --langversion 為無法識別的值 '{0}',對完整清單使用 --langversion:? @@ -29,17 +29,17 @@ Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. + 成員定義中的非預期符號 '.'。預期為 'with'、'=' 或其他語彙基元。 Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) + 請指定用來計算 PDB 中所儲存來源檔案總和檢查碼的演算法。支援的值為: SHA1 或 SHA256 (預設) Algorithm '{0}' is not supported - Algorithm '{0}' is not supported + 不支援演算法 '{0}' @@ -7199,12 +7199,12 @@ Expression does not have a name. - Expression does not have a name. + 運算式沒有名稱。 Using the 'nameof' operator as a first-class function value is not permitted. - Using the 'nameof' operator as a first-class function value is not permitted. + 不允許使用"nameof" 運算子作為第一類函式值。 diff --git a/src/fsharp/xlf/FSStrings.de.xlf b/src/fsharp/xlf/FSStrings.de.xlf index 60734cae522c..7e373ec5342a 100644 --- a/src/fsharp/xlf/FSStrings.de.xlf +++ b/src/fsharp/xlf/FSStrings.de.xlf @@ -74,7 +74,7 @@ Possible overload: '{0}'. {1}. - Mögliche Überladung: '{0}'. {1}. + Mögliche Überladung: "{0}". {1}. @@ -284,7 +284,7 @@ symbol ':?>' - Symbol ':?>' + Symbol ":?>" @@ -634,7 +634,7 @@ keyword 'const' - Schlüsselwort 'const' + Schlüsselwort "const" @@ -1434,7 +1434,7 @@ This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. - Dieser Wert ist nicht änderbar. Verwenden Sie ggf. ein änderbares Schlüsselwort, z. B. "let mutable {0} = Ausdruck". + Dieser Wert ist nicht änderbar. Verwenden Sie ggf. ein änderbares Schlüsselwort, z.B. "let mutable {0} = Ausdruck". @@ -1549,17 +1549,17 @@ #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. - #I-Direktiven dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, fügen Sie die Compileroption "-I" für diesen Verweis hinzu, oder trennen Sie die Direktive mit "#if INTERACTIVE'/'#endif" ab. + #I-Direktiven dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, fügen Sie die Compileroption "-I" für diesen Verweis hinzu, oder trennen Sie die Direktive mit "#if INTERACTIVE"/"#endif" ab. #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. - #r-Anweisungen dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, oder ersetzen Sie diesen Verweis durch die Compileroption "-r". Wenn diese Anweisung als Benutzereingabe ausgeführt wird, trennen Sie sie mit "#if INTERACTIVE'/'#endif" ab. + #r-Anweisungen dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, oder ersetzen Sie diesen Verweis durch die Compileroption "-r". Wenn diese Anweisung als Benutzereingabe ausgeführt wird, trennen Sie sie mit "#if INTERACTIVE"/"#endif" ab. This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. - Diese Direktive darf nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Entfernen Sie entweder die Direktive, verschieben Sie diesen Code in eine Skriptdatei, oder trennen Sie die Direktive mit "#if INTERACTIVE'/'#endif" ab. + Diese Direktive darf nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Entfernen Sie entweder die Direktive, verschieben Sie diesen Code in eine Skriptdatei, oder trennen Sie die Direktive mit "#if INTERACTIVE"/"#endif" ab. diff --git a/src/fsharp/xlf/FSStrings.es.xlf b/src/fsharp/xlf/FSStrings.es.xlf index 238c6db5034c..6ccd80493d72 100644 --- a/src/fsharp/xlf/FSStrings.es.xlf +++ b/src/fsharp/xlf/FSStrings.es.xlf @@ -954,7 +954,7 @@ comment - Comentario + comentario diff --git a/src/fsharp/xlf/FSStrings.it.xlf b/src/fsharp/xlf/FSStrings.it.xlf index 6ec47804c8c0..c8f96cadaebb 100644 --- a/src/fsharp/xlf/FSStrings.it.xlf +++ b/src/fsharp/xlf/FSStrings.it.xlf @@ -954,7 +954,7 @@ comment - Commento + commento diff --git a/tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj b/tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj index 78c2689eb24b..a9df8d199e51 100644 --- a/tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj +++ b/tests/FSharp.Compiler.LanguageServer.UnitTests/FSharp.Compiler.LanguageServer.UnitTests.fsproj @@ -7,6 +7,7 @@ Library true nunit + true diff --git a/tests/fsharp/Compiler/CompilerAssert.fs b/tests/fsharp/Compiler/CompilerAssert.fs index 89bc15f5f2fd..61058df1e5a1 100644 --- a/tests/fsharp/Compiler/CompilerAssert.fs +++ b/tests/fsharp/Compiler/CompilerAssert.fs @@ -108,11 +108,11 @@ let main argv = 0""" ProjectId = None SourceFiles = [|"test.fs"|] #if !NETCOREAPP - OtherOptions = [|"--preferreduilang:en-US";|] + OtherOptions = [|"--preferreduilang:en-US";"--warn:5"|] #else OtherOptions = let assemblies = getNetCoreAppReferences |> Array.map (fun x -> sprintf "-r:%s" x) - Array.append [|"--preferreduilang:en-US"; "--targetprofile:netcore"; "--noframework"|] assemblies + Array.append [|"--preferreduilang:en-US"; "--targetprofile:netcore"; "--noframework";"--warn:5"|] assemblies #endif ReferencedProjects = [||] IsIncompleteTypeCheckEnvironment = false diff --git a/tests/fsharp/Compiler/ErrorMessages/WarnExpressionTests.fs b/tests/fsharp/Compiler/ErrorMessages/WarnExpressionTests.fs index 7bf6cc211c14..09883b519f61 100644 --- a/tests/fsharp/Compiler/ErrorMessages/WarnExpressionTests.fs +++ b/tests/fsharp/Compiler/ErrorMessages/WarnExpressionTests.fs @@ -105,7 +105,7 @@ let changeX() = (6, 5, 6, 15) "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'." - // [] // Disable this test until we refactor tcImports and tcGlobals + [] let ``Warn If Discarded In List``() = CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:4.6" |] @@ -127,7 +127,7 @@ let view model dispatch = "This expression returns a value of type 'int' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'." |] - // [] // Disable this test until we refactor tcImports and tcGlobals + [] let ``Warn If Discarded In List 2``() = CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:4.6" |] @@ -154,7 +154,7 @@ let view model dispatch = "This expression returns a value of type 'int list' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." |] - // [] // Disable this test until we refactor tcImports and tcGlobals + [] let ``Warn If Discarded In List 3``() = CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:4.6" |] diff --git a/tests/fsharp/Compiler/ILChecker.fs b/tests/fsharp/Compiler/ILChecker.fs index 200206f861fd..ac6873942ccd 100644 --- a/tests/fsharp/Compiler/ILChecker.fs +++ b/tests/fsharp/Compiler/ILChecker.fs @@ -95,3 +95,8 @@ module ILChecker = let checkIL dllFilePath expectedIL = checkILAux [] dllFilePath expectedIL + + let reassembleIL ilFilePath dllFilePath = + let ilasmPath = config.ILASM + let errors, _ = exec ilasmPath ([ sprintf "%s /output=%s /dll" ilFilePath dllFilePath ]) + errors diff --git a/tests/fsharp/Compiler/Language/ByrefTests.fs b/tests/fsharp/Compiler/Language/ByrefTests.fs new file mode 100644 index 000000000000..2797125d7914 --- /dev/null +++ b/tests/fsharp/Compiler/Language/ByrefTests.fs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.UnitTests + +open NUnit.Framework +open FSharp.Compiler.SourceCodeServices + +[] +module ByrefTests = + + [] + let ``No defensive copy on .NET struct`` () = + CompilerAssert.Pass + """ +open System +open System.Runtime.CompilerServices + +let f (x: DateTime) = x.ToLocalTime() +let f2 () = + let x = DateTime.Now + x.ToLocalTime() + +[] +type Extensions = + + [] + static member Test(x: inref) = &x + + [] + static member Test2(x: byref) = &x + +let test (x: inref) = + x.Test() + +let test2 (x: byref) = + x.Test2() + +let test3 (x: byref) = + x.Test() + +let test4 () = + DateTime.Now.Test() + +let test5 (x: inref) = + &x.Test() + +let test6 () = + DateTime.Now.Test().Test().Test() + """ + + [] + let ``Extension method scope errors`` () = + CompilerAssert.TypeCheckWithErrors + """ +open System +open System.Runtime.CompilerServices + +[] +type Extensions = + + [] + static member Test(x: inref) = &x + +let f1 () = + &DateTime.Now.Test() + +let f2 () = + let result = + let dt = DateTime.Now + &dt.Test() + result + +let f3 () = + Extensions.Test(let dt = DateTime.Now in &dt) + +let f4 () = + let dt = DateTime.Now + &Extensions.Test(&dt) + +let f5 () = + &Extensions.Test(let dt = DateTime.Now in &dt) + """ + [| + ( + FSharpErrorSeverity.Error, + 3228, + (12, 6, 12, 25), + "The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." + ) + ( + FSharpErrorSeverity.Error, + 3228, + (17, 10, 17, 19), + "The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." + ) + ( + FSharpErrorSeverity.Error, + 3228, + (21, 5, 21, 50), + "The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." + ) + ( + FSharpErrorSeverity.Error, + 3228, + (25, 6, 25, 26), + "The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." + ) + ( + FSharpErrorSeverity.Error, + 3228, + (28, 6, 28, 51), + "The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." + ) + |] + +// TODO: A better way to test the ones below are to use a custom struct in C# code that contains explicit use of their "readonly" keyword. +#if NETCOREAPP + // NETCORE makes DateTime a readonly struct; therefore, it should not error. + [] + let ``No defensive copy on .NET struct - netcore`` () = + CompilerAssert.Pass + """ +open System +let f (x: inref) = x.ToLocalTime() +let f2 () = + let x = DateTime.Now + let y = &x + y.ToLocalTime() +let f3 (x: inref) = &x +let f4 (x: inref) = + (f3 &x).ToLocalTime() + +open System.Runtime.CompilerServices +[] +type Extensions = + + [] + static member Test(x: inref) = &x + +let test1 () = + DateTime.Now.Test().Date + +let test2 () = + DateTime.Now.Test().Test().Date.Test().Test().Date.Test() + """ +#else + // Note: Currently this is assuming NET472. That may change which might break these tests. Consider using custom C# code. + [] + let ``Defensive copy on .NET struct for inref`` () = + CompilerAssert.TypeCheckWithErrors + """ +open System +let f (x: inref) = x.ToLocalTime() +let f2 () = + let x = DateTime.Now + let y = &x + y.ToLocalTime() +let f3 (x: inref) = &x +let f4 (x: inref) = + (f3 &x).ToLocalTime() + +open System.Runtime.CompilerServices +[] +type Extensions = + + [] + static member Test(x: inref) = &x + +let test1 () = + DateTime.Now.Test().Date + """ + [| + ( + FSharpErrorSeverity.Warning, + 52, + (3, 30, 3, 45), + "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed" + ) + ( + FSharpErrorSeverity.Warning, + 52, + (7, 5, 7, 20), + "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed" + ) + ( + FSharpErrorSeverity.Warning, + 52, + (10, 5, 10, 26), + "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed" + ) + ( + FSharpErrorSeverity.Warning, + 52, + (20, 5, 20, 29), + "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed" + ) + |] +#endif \ No newline at end of file diff --git a/tests/fsharp/Compiler/Language/OpenStaticClasses.fs b/tests/fsharp/Compiler/Language/OpenStaticClasses.fs index bd036d3a109d..5dcc962db39d 100644 --- a/tests/fsharp/Compiler/Language/OpenStaticClasses.fs +++ b/tests/fsharp/Compiler/Language/OpenStaticClasses.fs @@ -8,7 +8,7 @@ open NUnit.Framework (* Tests in this file evaluate whether the language supports accessing functions on static classes using open - The feature was added in FSharp4.7, the test cases ensure that the original errors are reproduced when the langversion:4.6 is specified + The feature was added in preview, the test cases ensure that the original errors are reproduced when the langversion:4.6 is specified *) [] @@ -49,9 +49,9 @@ module OpenSystemMathOnce = |] [] - let ``OpenStaticClassesTests - OpenSystemMathOnce - langversion:v4.7`` () = + let ``OpenStaticClassesTests - OpenSystemMathOnce - langversion:preview`` () = CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.7" |] + [| "--langversion:preview" |] (baseModule + """ module OpenSystemMathOnce = @@ -79,9 +79,9 @@ module OpenSystemMathTwice = |] [] - let ``OpenStaticClassesTests - OpenSystemMathTwice - langversion:v4.7`` () = + let ``OpenStaticClassesTests - OpenSystemMathTwice - langversion:preview`` () = CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.7" |] + [| "--langversion:preview" |] (baseModule + """ module OpenSystemMathOnce = @@ -106,9 +106,9 @@ module OpenMyMathOnce = |] [] - let ``OpenStaticClassesTests - OpenMyMathOnce - langversion:v4.7`` () = + let ``OpenStaticClassesTests - OpenMyMathOnce - langversion:preview`` () = CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.7" |] + [| "--langversion:preview" |] (baseModule + """ module OpenMyMathOnce = @@ -132,9 +132,9 @@ module DontOpenAutoMath = |] [] - let ``OpenStaticClassesTests - DontOpenAutoMath - langversion:v4.7`` () = + let ``OpenStaticClassesTests - DontOpenAutoMath - langversion:preview`` () = CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.7" |] + [| "--langversion:preview" |] (baseModule + """ module DontOpenAutoMath = @@ -160,9 +160,9 @@ module OpenAutoMath = |] [] - let ``OpenStaticClassesTests - OpenAutoMath - langversion:v4.7`` () = + let ``OpenStaticClassesTests - OpenAutoMath - langversion:preview`` () = CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.7" |] + [| "--langversion:preview" |] (baseModule + """ module OpenAutoMath = open AutoOpenMyMath @@ -171,3 +171,18 @@ module OpenAutoMath = let x = AutoMin(1.0, 2.0) let x2 = AutoMin(1, 2)""") [| |] + + [] + let ``OpenStaticClassesTests - OpenAccessibleFields - langversion:preview`` () = + CompilerAssert.TypeCheckWithErrorsAndOptions + [| "--langversion:preview" |] + (baseModule + """ +module OpenAFieldFromMath = + open System.Math + + let pi = PI""") + [||] + + // TODO - wait for Will's integration of testing changes that makes this easlier + // [] + // let ``OpenStaticClassesTests - InternalsVisibleWhenHavingAnIVT - langversion:preview``() = ... \ No newline at end of file diff --git a/tests/fsharp/Compiler/Utilities.fs b/tests/fsharp/Compiler/Utilities.fs new file mode 100644 index 000000000000..29de21ad3e35 --- /dev/null +++ b/tests/fsharp/Compiler/Utilities.fs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module FSharp.Compiler.UnitTests.Utilities + +open System +open System.IO +open System.Collections.Immutable +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CSharp + +// This file mimics how Roslyn handles their compilation references for compilation testing + +[] +type TargetFramework = + | NetStandard20 + | NetCoreApp30 + +module private TestReferences = + + [] + module NetStandard20 = + + let netStandard = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.netstandard).GetReference(display = "netstandard.dll (netstandard 2.0 ref)") + + let mscorlibRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.mscorlib).GetReference(display = "mscorlib.dll (netstandard 2.0 ref)") + + let systemRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Runtime).GetReference(display = "System.Runtime.dll (netstandard 2.0 ref)") + + let systemCoreRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Core).GetReference(display = "System.Core.dll (netstandard 2.0 ref)") + + let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Dynamic_Runtime).GetReference(display = "System.Dynamic.Runtime.dll (netstandard 2.0 ref)") + + [] + module NetCoreApp30 = + + let netStandard = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.netstandard).GetReference(display = "netstandard.dll (netcoreapp 3.0 ref)") + + let mscorlibRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.mscorlib).GetReference(display = "mscorlib.dll (netcoreapp 3.0 ref)") + + let systemRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Runtime).GetReference(display = "System.Runtime.dll (netcoreapp 3.0 ref)") + + let systemCoreRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Core).GetReference(display = "System.Core.dll (netcoreapp 3.0 ref)") + + let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Dynamic_Runtime).GetReference(display = "System.Dynamic.Runtime.dll (netcoreapp 3.0 ref)") + + let systemConsoleRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Console).GetReference(display = "System.Console.dll (netcoreapp 3.0 ref)") + + +[] +module private TargetFrameworkUtil = + + open TestReferences + + let private netStandard20References = + lazy ImmutableArray.Create(NetStandard20.netStandard.Value, NetStandard20.mscorlibRef.Value, NetStandard20.systemRuntimeRef.Value, NetStandard20.systemCoreRef.Value, NetStandard20.systemDynamicRuntimeRef.Value) + + let private netCoreApp30References = + lazy ImmutableArray.Create(NetCoreApp30.netStandard.Value, NetCoreApp30.mscorlibRef.Value, NetCoreApp30.systemRuntimeRef.Value, NetCoreApp30.systemCoreRef.Value, NetCoreApp30.systemDynamicRuntimeRef.Value, NetCoreApp30.systemConsoleRef.Value) + + let getReferences tf = + match tf with + | TargetFramework.NetStandard20 -> netStandard20References.Value + | TargetFramework.NetCoreApp30 -> netCoreApp30References.Value + +type RoslynLanguageVersion = LanguageVersion + +[] +type CSharpCompilationFlags = + | None = 0x0 + | InternalsVisibleTo = 0x1 + +[] +type TestCompilation = + | CSharp of CSharpCompilation * CSharpCompilationFlags + | IL of ilSource: string * result: Lazy + + member this.AssertNoErrorsOrWarnings () = + match this with + | TestCompilation.CSharp (c, _) -> + let diagnostics = c.GetDiagnostics () + + if not diagnostics.IsEmpty then + NUnit.Framework.Assert.Fail ("CSharp source diagnostics:\n" + (diagnostics |> Seq.map (fun x -> x.GetMessage () + "\n") |> Seq.reduce (+))) + + | TestCompilation.IL (_, result) -> + let errors, _ = result.Value + if errors.Length > 0 then + NUnit.Framework.Assert.Fail ("IL source errors: " + errors) + + member this.EmitAsFile (outputPath: string) = + match this with + | TestCompilation.CSharp (c, _) -> + let emitResult = c.Emit outputPath + if not emitResult.Success then + failwithf "Unable to emit C# compilation.\n%A" emitResult.Diagnostics + + | TestCompilation.IL (_, result) -> + let (_, data) = result.Value + File.WriteAllBytes (outputPath, data) + +type CSharpLanguageVersion = + | CSharp8 = 0 + +[] +type CompilationUtil private () = + + static member CreateCSharpCompilation (source: string, lv: CSharpLanguageVersion, ?tf, ?additionalReferences, ?flags) = + let lv = + match lv with + | CSharpLanguageVersion.CSharp8 -> LanguageVersion.CSharp8 + | _ -> LanguageVersion.Default + + let tf = defaultArg tf TargetFramework.NetStandard20 + let additionalReferences = defaultArg additionalReferences ImmutableArray.Empty + let flags = defaultArg flags CSharpCompilationFlags.None + let references = TargetFrameworkUtil.getReferences tf + let c = + CSharpCompilation.Create( + Guid.NewGuid().ToString (), + [ CSharpSyntaxTree.ParseText (source, CSharpParseOptions lv) ], + references.As().AddRange additionalReferences, + CSharpCompilationOptions (OutputKind.DynamicallyLinkedLibrary)) + Some (TestCompilation.CSharp (c, flags)) + + static member CreateILCompilation (source: string) = + let compute = + lazy + let ilFilePath = Path.GetTempFileName () + let tmp = Path.GetTempFileName() + let dllFilePath = Path.ChangeExtension (tmp, ".dll") + try + File.WriteAllText (ilFilePath, source) + let errors = ILChecker.reassembleIL ilFilePath dllFilePath + try + (errors, File.ReadAllBytes dllFilePath) + with + | _ -> (errors, [||]) + finally + try File.Delete ilFilePath with | _ -> () + try File.Delete tmp with | _ -> () + try File.Delete dllFilePath with | _ -> () + Some (TestCompilation.IL (source, compute)) \ No newline at end of file diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index b7f4184af404..79adf613e013 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -32,6 +32,7 @@ + @@ -48,7 +49,9 @@ + + @@ -72,10 +75,14 @@ + + + + diff --git a/tests/fsharp/core/fsfromfsviacs/lib2.cs b/tests/fsharp/core/fsfromfsviacs/lib2.cs index eb6d6acc1413..449f926d7f4e 100644 --- a/tests/fsharp/core/fsfromfsviacs/lib2.cs +++ b/tests/fsharp/core/fsfromfsviacs/lib2.cs @@ -124,4 +124,17 @@ public class ApiWrapper public static Func f4 = new Func((int arg1, string arg2, byte arg3, sbyte arg4) => arg1 + arg2.Length + 1 + arg3 + arg4); public static Func f5 = new Func((int arg1, string arg2, byte arg3, sbyte arg4, Int16 arg5) => arg1 + arg2.Length + 1 + arg3 + arg4 + arg5); } +} + +namespace StructTests +{ + public struct NonReadOnlyStruct + { + public int X { get; set; } + + public void M(int x) + { + X = x; + } + } } \ No newline at end of file diff --git a/tests/fsharp/core/fsfromfsviacs/test.fsx b/tests/fsharp/core/fsfromfsviacs/test.fsx index 072a896c1eb1..47e2e359769c 100644 --- a/tests/fsharp/core/fsfromfsviacs/test.fsx +++ b/tests/fsharp/core/fsfromfsviacs/test.fsx @@ -210,6 +210,75 @@ let ToFSharpFunc() = test "vkejhwew904" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f4)(3)("a")(6uy)(7y) = FSharpFuncTests.ApiWrapper.f4.Invoke(3, "a", 6uy, 7y)) test "vkejhwew905" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f5)(3)("a")(6uy)(7y)(7s) = FSharpFuncTests.ApiWrapper.f5.Invoke(3, "a", 6uy, 7y, 7s)) +module TestStructs = + open StructTests + + let someFunc (s: NonReadOnlyStruct) = + s.M(456) + s.X + + let someByrefFunc (s: byref) = + s.M(456) + s.X + + let someInrefFunc (s: inref) = + s.M(456) + s.X + + let someFuncReturn (s: NonReadOnlyStruct) = + s.X + + let someInrefFuncReturn (s: inref) = + s.X + + let test1 () = + let s = NonReadOnlyStruct() + check "hdlcjiklhen1" s.X 0 + s.M(123) + check "hdlcjiklhen2" s.X 123 + check "hdlcjiklhen3" (someFunc s) 456 + check "hdlcjiklhen4" s.X 123 + + + let test2 () = + let mutable s = NonReadOnlyStruct() + check "hdlcjiklhen5" s.X 0 + s.M(123) + check "hdlcjiklhen6" s.X 123 + check "hdlcjiklhen7" (someByrefFunc &s) 456 + check "hdlcjiklhen8" s.X 456 + + + let test3 () = + let s = NonReadOnlyStruct() + check "hdlcjiklhen9" s.X 0 + s.M(123) + check "hdlcjiklhen10" s.X 123 + check "hdlcjiklhen11" (someInrefFunc &s) 123 + check "hdlcjiklhen12" s.X 123 + + let test4 () = + let s = NonReadOnlyStruct() + check "hdlcjiklhen13" s.X 0 + s.M(123) + check "hdlcjiklhen14" s.X 123 + check "hdlcjiklhen15" (someFuncReturn s) 0 // Technically a bug today, but test is to verify current behavior. + check "hdlcjiklhen16" s.X 123 + + let test5 () = + let s = NonReadOnlyStruct() + check "hdlcjiklhen17" s.X 0 + s.M(123) + check "hdlcjiklhen18" s.X 123 + check "hdlcjiklhen19" (someInrefFuncReturn &s) 123 + check "hdlcjiklhen20" s.X 123 + +TestStructs.test1 () +TestStructs.test2 () +TestStructs.test3 () +TestStructs.test4 () +TestStructs.test5 () + #endif #if TESTS_AS_APP diff --git a/tests/fsharp/core/nameof/version47/test.fsx b/tests/fsharp/core/nameof/preview/test.fsx similarity index 100% rename from tests/fsharp/core/nameof/version47/test.fsx rename to tests/fsharp/core/nameof/preview/test.fsx diff --git a/tests/fsharp/core/nameof/version46/test.fsx b/tests/fsharp/core/nameof/version46/test.fsx index 273427d2d79e..2f17dc5aa035 100644 --- a/tests/fsharp/core/nameof/version46/test.fsx +++ b/tests/fsharp/core/nameof/version46/test.fsx @@ -47,13 +47,13 @@ //The value or constructor 'nameof' is not defined. //The value or constructor 'nameof' is not defined. //The value or constructor 'nameof' is not defined. +//The value or constructor 'name' is not defined. Maybe you want one of the following: #if TESTS_AS_APP module TestSuite_FSharpCore_nameof_46 #endif - #nowarn "44" open System @@ -337,6 +337,10 @@ type Person = | x when x = nameof __.Age -> { __ with Age = value :?> int } | _ -> __ +module Foo = + let nameof = () + let x = name () + do test "local variable name lookup" (BasicNameOfTests.``local variable name lookup`` ()) do test "local int function name" (BasicNameOfTests.``local int function name`` ()) do test "local curried function name" (BasicNameOfTests.``local curried function name`` ()) diff --git a/tests/fsharp/test-framework.fs b/tests/fsharp/test-framework.fs index cace5cf935ce..cb2418f04c64 100644 --- a/tests/fsharp/test-framework.fs +++ b/tests/fsharp/test-framework.fs @@ -105,6 +105,9 @@ module Commands = let ildasm exec ildasmExe flags assembly = exec ildasmExe (sprintf "%s %s" flags (quotepath assembly)) + let ilasm exec ilasmExe flags assembly = + exec ilasmExe (sprintf "%s %s" flags (quotepath assembly)) + let peverify exec peverifyExe flags path = exec peverifyExe (sprintf "%s %s" (quotepath path) flags) @@ -132,6 +135,7 @@ type TestConfig = FSharpCompilerInteractiveSettings : string fsi_flags : string ILDASM : string + ILASM : string PEVERIFY : string Directory: string DotNetExe: string @@ -173,14 +177,16 @@ let config configurationName envVars = let repoRoot = SCRIPT_ROOT ++ ".." ++ ".." let artifactsPath = repoRoot ++ "artifacts" let artifactsBinPath = artifactsPath ++ "bin" + let coreClrRuntimePackageVersion = "3.0.0-preview-27318-01" let csc_flags = "/nologo" let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED" let fsi_flags = "-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror" let Is64BitOperatingSystem = WindowsPlatform.Is64BitOperatingSystem envVars let architectureMoniker = if Is64BitOperatingSystem then "x64" else "x86" let CSC = requireFile (packagesDir ++ "Microsoft.Net.Compilers" ++ "2.7.0" ++ "tools" ++ "csc.exe") - let ILDASM = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ "2.0.3" ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "ildasm.exe") - let coreclrdll = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.Runtime.CoreCLR") ++ "2.0.3" ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "coreclr.dll") + let ILDASM = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "ildasm.exe") + let ILASM = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.ILAsm") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "ilasm.exe") + let coreclrdll = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.Runtime.CoreCLR") ++ coreClrRuntimePackageVersion ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "coreclr.dll") let PEVERIFY = requireFile (artifactsBinPath ++ "PEVerify" ++ configurationName ++ "net472" ++ "PEVerify.exe") let FSI_FOR_SCRIPTS = artifactsBinPath ++ "fsi" ++ configurationName ++ fsiArchitecture ++ "fsi.exe" let FSharpBuild = requireFile (artifactsBinPath ++ "FSharp.Build" ++ configurationName ++ fsharpBuildArchitecture ++ "FSharp.Build.dll") @@ -190,8 +196,9 @@ let config configurationName envVars = let repoLocalDotnetPath = repoRoot ++ ".dotnet" ++ "dotnet.exe" if File.Exists(repoLocalDotnetPath) then repoLocalDotnetPath else "dotnet.exe" - // ildasm requires coreclr.dll to run which has already been restored to the packages directory + // ildasm + ilasm requires coreclr.dll to run which has already been restored to the packages directory File.Copy(coreclrdll, Path.GetDirectoryName(ILDASM) ++ "coreclr.dll", overwrite=true) + File.Copy(coreclrdll, Path.GetDirectoryName(ILASM) ++ "coreclr.dll", overwrite=true) let FSI = requireFile (FSI_FOR_SCRIPTS) #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS @@ -210,6 +217,7 @@ let config configurationName envVars = { EnvironmentVariables = envVars FSCOREDLLPATH = FSCOREDLLPATH ILDASM = ILDASM + ILASM = ILASM PEVERIFY = PEVERIFY CSC = CSC BUILD_CONFIG = configurationName @@ -449,6 +457,7 @@ let fscBothToOut cfg out arg = Printf.ksprintf (Commands.fsc cfg.Directory (exec let fscAppendErrExpectFail cfg errPath arg = Printf.ksprintf (Commands.fsc cfg.Directory (execAppendErrExpectFail cfg errPath) cfg.DotNetExe cfg.FSC) arg let csc cfg arg = Printf.ksprintf (Commands.csc (exec cfg) cfg.CSC) arg let ildasm cfg arg = Printf.ksprintf (Commands.ildasm (exec cfg) cfg.ILDASM) arg +let ilasm cfg arg = Printf.ksprintf (Commands.ilasm (exec cfg) cfg.ILASM) arg let peverify cfg = Commands.peverify (exec cfg) cfg.PEVERIFY "/nologo" let peverifyWithArgs cfg args = Commands.peverify (exec cfg) cfg.PEVERIFY args let fsi cfg = Printf.ksprintf (Commands.fsi (exec cfg) cfg.FSI) diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index 94c46a1dced1..bb3c7b8bda8f 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -1821,13 +1821,13 @@ module VersionTests = let ``nameof-version4.6``() = singleTestBuildAndRunVersion "core/nameof/version46" FSC_BUILDONLY "4.6" [] - let ``nameof-version4.7``() = singleTestBuildAndRun "core/nameof/version47" FSC_BUILDONLY + let ``nameof-versionpreview``() = singleTestBuildAndRunVersion "core/nameof/preview" FSC_BUILDONLY "preview" [] - let ``nameof-execute``() = singleTestBuildAndRun "core/nameof/version47" FSC_BASIC + let ``nameof-execute``() = singleTestBuildAndRunVersion "core/nameof/preview" FSC_BASIC "preview" [] - let ``nameof-fsi``() = singleTestBuildAndRun "core/nameof/version47" FSI_BASIC + let ``nameof-fsi``() = singleTestBuildAndRunVersion "core/nameof/preview" FSI_BASIC "preview" #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS module ToolsTests = diff --git a/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/comparer.fsx b/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/comparer.fsx new file mode 100644 index 000000000000..38adec6afd14 --- /dev/null +++ b/tests/fsharpqa/Source/CompilerOptions/fsi/langversion/comparer.fsx @@ -0,0 +1,32 @@ +// #NoMT #CompilerOptions #RequiresENU +#light + +let arg0 = System.Environment.GetCommandLineArgs().[0] +let path = System.Environment.GetEnvironmentVariable("PATH") +let fn1 = fsi.CommandLineArgs.[1] +let fn2 = fsi.CommandLineArgs.[2] + +// Read file into an array +let File2List (filename:string) = System.IO.File.ReadAllLines(filename) + +let f1 = File2List fn1 +let f2 = File2List fn2 + +let mutable i = 0 +let compare (f1:string[]) (f2:string[]) = + if f1.Length <> f2.Length then failwithf "Help text did not match. f1.Length = %d, f2.Length = %d. Check you have fsc on path, arg0 = %s, PATH=%s" f1.Length f2.Length arg0 path + (f1, f2) ||> Array.forall2 (fun (a:string) (b:string) -> + let aa = System.Text.RegularExpressions.Regex.Replace(a, @"F# Compiler version .+", "F# Compiler") + let bb = System.Text.RegularExpressions.Regex.Replace(b, @"F# Compiler version .+", "F# Compiler") + i <- i+1 + if (aa = bb) then + true + else + printfn "Files differ at line %d:" i + printfn "\t>> %s" a + printfn "\t<< %s" b + false + ) + +exit (if compare f1 f2 then 0 else 1) + diff --git a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst index 53b393330db9..9d473234e60f 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst +++ b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst @@ -1,11 +1,11 @@ - SOURCE=E_NameOfIntConst.fs # E_NameOfIntConst.fs - SOURCE=E_NameOfStringConst.fs # E_NameOfStringConst.fs - SOURCE=E_NameOfAppliedFunction.fs # E_NameOfAppliedFunction.fs - SOURCE=E_NameOfIntegerAppliedFunction.fs # E_NameOfIntegerAppliedFunction.fs - SOURCE=E_NameOfPartiallyAppliedFunction.fs # E_NameOfPartiallyAppliedFunction.fs - SOURCE=E_NameOfDictLookup.fs # E_NameOfDictLookup.fs - SOURCE=E_NameOfAdditionExpr.fs # E_NameOfAdditionExpr.fs - SOURCE=E_NameOfParameterAppliedFunction.fs # E_NameOfParameterAppliedFunction.fs - SOURCE=E_NameOfAsAFunction.fs # E_NameOfAsAFunction.fs - SOURCE=E_NameOfWithPipe.fs # E_NameOfWithPipe.fs - SOURCE=E_NameOfUnresolvableName.fs # E_NameOfUnresolvableName.fs + SOURCE=E_NameOfIntConst.fs SCFLAGS="--langversion:preview" # E_NameOfIntConst.fs + SOURCE=E_NameOfStringConst.fs SCFLAGS="--langversion:preview" # E_NameOfStringConst.fs + SOURCE=E_NameOfAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfAppliedFunction.fs + SOURCE=E_NameOfIntegerAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfIntegerAppliedFunction.fs + SOURCE=E_NameOfPartiallyAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfPartiallyAppliedFunction.fs + SOURCE=E_NameOfDictLookup.fs SCFLAGS="--langversion:preview" # E_NameOfDictLookup.fs + SOURCE=E_NameOfAdditionExpr.fs SCFLAGS="--langversion:preview" # E_NameOfAdditionExpr.fs + SOURCE=E_NameOfParameterAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfParameterAppliedFunction.fs + SOURCE=E_NameOfAsAFunction.fs SCFLAGS="--langversion:preview" # E_NameOfAsAFunction.fs + SOURCE=E_NameOfWithPipe.fs SCFLAGS="--langversion:preview" # E_NameOfWithPipe.fs + SOURCE=E_NameOfUnresolvableName.fs SCFLAGS="--langversion:preview" # E_NameOfUnresolvableName.fs diff --git a/tests/projects/stress/Templates/fsproj.template b/tests/projects/stress/Templates/fsproj.template index 2e87b3a4a854..9af6ff1673dc 100644 --- a/tests/projects/stress/Templates/fsproj.template +++ b/tests/projects/stress/Templates/fsproj.template @@ -36,7 +36,7 @@ - ..\packages\FSharp.Core.4.6.2\lib\net45\FSharp.Core.dll + ..\packages\FSharp.Core.4.7.0\lib\net45\FSharp.Core.dll diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.vstemplate b/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.vstemplate index 457a0d84b661..fea0279b943a 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.vstemplate +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.vstemplate @@ -27,7 +27,7 @@ - + diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/AssemblyInfo.fs.de.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/AssemblyInfo.fs.de.xlf index 87fa85b31c94..8df6ae7fc3b6 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/AssemblyInfo.fs.de.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/AssemblyInfo.fs.de.xlf @@ -19,17 +19,17 @@ Setting ComVisible to false makes the types in this assembly not visible - Durch Festlegen von ComVisible auf 'false' werden die Typen in dieser Assembly unsichtbar + Durch Festlegen von ComVisible auf FALSE sind die Typen in dieser Assembly nicht to COM components. If you need to access a type in this assembly from - für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von + für COM-Komponenten sichtbar. Wenn Sie auf einen Typ in dieser Assembly von COM, set the ComVisible attribute to true on that type. - COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. + COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf TRUE festlegen. diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.cs.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.cs.xlf index ffd1deada4ef..0a1913fea3f1 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.cs.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.cs.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Další informace o F# na https://fsharp.org + Další informace o F# najdete na https://fsharp.org. diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.de.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.de.xlf index 59272645d4f6..8c434e9d7d12 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.de.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.de.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Weitere Informationen zu F# unter "https://fsharp.org". + Weitere Informationen zu F# unter https://fsharp.org. diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.es.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.es.xlf index 081582225ec3..1472966885a2 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.es.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.es.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Más información acerca de F# en https://fsharp.org + Más información sobre F# en https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.fr.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.fr.xlf index c2ed6e21e309..8052d98708d1 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.fr.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.fr.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - En savoir plus sur F# sur le site https://fsharp.org + En savoir plus sur F# : https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.it.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.it.xlf index 5b9b76eb7f91..c9027ad5b691 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.it.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.it.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Altre informazioni su F# all'indirizzo https://fsharp.org + Altre informazioni su F# disponibili all'indirizzo https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ja.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ja.xlf index e0935dc29100..c24608aec3bb 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ja.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ja.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - F# の詳細については、https://fsharp.org を参照してください + F# の詳細については、https://fsharp.org をご覧ください diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ko.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ko.xlf index e41549ea2a6c..7d9f7dc54e79 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ko.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ko.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - hF#에 대해 https://fsharp.org에서 자세히 알아보기 + https://fsharp.org에서 F#에 대해 자세히 알아보기 diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pl.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pl.xlf index 298af71ef08d..763d2db3df37 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pl.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pl.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Dowiedz się więcej na temat języka F# pod adresem https://fsharp.org + Dowiedz się więcej o języku F# na stronie https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pt-BR.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pt-BR.xlf index 701d39192b50..7af54cd8fd5a 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pt-BR.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.pt-BR.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Saiba mais sobre F# em https://fsharp.org + Saiba mais sobre o F# em https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ru.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ru.xlf index 57caaf2c8221..54eb018503e7 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ru.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.ru.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Дополнительные сведения о F# см. на https://fsharp.org + Дополнительные сведения об F# см. на странице https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.tr.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.tr.xlf index deaa07d46bb4..c584140b66bc 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.tr.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.tr.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - F# hakkında daha fazla bilgi için bkz. https://fsharp.org + F# hakkında daha fazla bilgi edinmek için bkz. https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hans.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hans.xlf index 74de5b0fe084..27df727dbda1 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hans.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hans.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - 在 https://fsharp.org 上了解有关 F# 的详细信息 + 了解更多关于 F# 的信息,请访问 https://fsharp.org diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hant.xlf b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hant.xlf index b0f43a7d4a46..5f67238de8b8 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hant.xlf +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/xlf/Program.fs.zh-Hant.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - 請參閱 https://fsharp.org,進一步了解 F# + 前往 https://fsharp.org 深入了解 F# diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/Library.vstemplate b/vsintegration/ProjectTemplates/LibraryProject/Template/Library.vstemplate index 07c8ab1065ee..d7f9a14d8d2e 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/Library.vstemplate +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/Library.vstemplate @@ -27,7 +27,7 @@ - + diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/AssemblyInfo.fs.de.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/AssemblyInfo.fs.de.xlf index 87fa85b31c94..8df6ae7fc3b6 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/AssemblyInfo.fs.de.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/AssemblyInfo.fs.de.xlf @@ -19,17 +19,17 @@ Setting ComVisible to false makes the types in this assembly not visible - Durch Festlegen von ComVisible auf 'false' werden die Typen in dieser Assembly unsichtbar + Durch Festlegen von ComVisible auf FALSE sind die Typen in dieser Assembly nicht to COM components. If you need to access a type in this assembly from - für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von + für COM-Komponenten sichtbar. Wenn Sie auf einen Typ in dieser Assembly von COM, set the ComVisible attribute to true on that type. - COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. + COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf TRUE festlegen. diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.cs.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.cs.xlf index fc829e7113de..e9771690a962 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.cs.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.cs.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Další informace o F# na https://fsharp.org + Další informace o F# najdete na https://fsharp.org. diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.de.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.de.xlf index 28fe2b6f4083..61df76a2804a 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.de.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.de.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Weitere Informationen zu F# unter "https://fsharp.org". + Weitere Informationen zu F# unter https://fsharp.org. diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.es.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.es.xlf index 507619b46b45..96fb3d364768 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.es.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.es.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Más información acerca de F# en https://fsharp.org + Más información sobre F# en https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.fr.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.fr.xlf index 53a859e0d597..cb48575303e2 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.fr.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.fr.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - En savoir plus sur F# sur le site https://fsharp.org + Pour en savoir plus sur le F# : https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.it.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.it.xlf index d65ce6f70cea..42558ead9d1d 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.it.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.it.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Altre informazioni su F# all'indirizzo https://fsharp.org + Altre informazioni su F# disponibili all'indirizzo https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ja.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ja.xlf index 45cbcbec9adf..45967e26bfd8 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ja.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ja.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - F# の詳細については、https://fsharp.org を参照してください + F# の詳細については、https://fsharp.org をご覧ください diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ko.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ko.xlf index 45d7cd9e47cd..661f9e6344d4 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ko.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ko.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - hF#에 대해 https://fsharp.org에서 자세히 알아보기 + https://fsharp.org에서 F#에 대해 자세히 알아보기 diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pl.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pl.xlf index 94269ce71bfc..e32717ff7060 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pl.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pl.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Dowiedz się więcej na temat języka F# pod adresem https://fsharp.org + Dowiedz się więcej o języku F# na stronie https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pt-BR.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pt-BR.xlf index f1be7744b146..1bd32f9343ac 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pt-BR.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.pt-BR.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Saiba mais sobre F# em https://fsharp.org + Saiba mais sobre o F# em https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ru.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ru.xlf index 08746c4a7f62..b8a6d8cced25 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ru.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.ru.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - Дополнительные сведения о F# см. на https://fsharp.org + Дополнительные сведения об F# см. на странице https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.tr.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.tr.xlf index 564cfc2dca43..1b3c2476e690 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.tr.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.tr.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - F# hakkında daha fazla bilgi için bkz. https://fsharp.org + F# hakkında daha fazla bilgi edinmek için bkz. https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hans.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hans.xlf index 0859fdcd1a17..4d849f68e3bd 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hans.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hans.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - 在 https://fsharp.org 上了解有关 F# 的详细信息 + 了解更多关于 F# 的信息,请访问 https://fsharp.org diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hant.xlf b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hant.xlf index 9edde3fd88b9..14ed4156de2b 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hant.xlf +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/xlf/Script.fsx.zh-Hant.xlf @@ -4,7 +4,7 @@ Learn more about F# at https://fsharp.org - 請參閱 https://fsharp.org,進一步了解 F# + 前往 https://fsharp.org 深入了解 F# diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate b/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate index 73b11c8c907c..adb7d6e23065 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate @@ -25,7 +25,7 @@ - + diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf index 5fbb27634d8a..0908855049f6 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf @@ -84,7 +84,7 @@ and they also allow editors (such as Visual Studio) to extract information from them. - und sie ermöglichen das Extrahieren von Informationen über Editoren (z. B. Visual Studio). + und sie ermöglichen das Extrahieren von Informationen über Editoren (z.B. Visual Studio). @@ -104,7 +104,7 @@ A module is a grouping of F# code, such as values, types, and function values. - Ein Modul ist eine Gruppierung von F#-Code, z. B. Werte, Typen und Funktionswerte. + Ein Modul ist eine Gruppierung von F#-Code, z.B. Werte, Typen und Funktionswerte. @@ -199,7 +199,7 @@ You could not use '=' here for this purpose since it is used for equality - Sie können '=' hier nicht verwenden, da es für Gleichheit verwendet wird. + Sie können "=" hier nicht verwenden, da es für Gleichheit verwendet wird. @@ -234,7 +234,7 @@ Apply the function, naming the function return result using 'let'. - Die Funktion anwenden, und das Rückgabeergebnis der Funktion mithilfe von 'let' benennen. + Die Funktion anwenden, und das Rückgabeergebnis der Funktion mithilfe von "let" benennen. @@ -249,7 +249,7 @@ If 'result1' were not of type 'int', then the line would fail to compile. - Wenn "result1" nicht vom Typ "int" wäre, würde die Kompilierung der Zeile fehlschlagen. + Wenn "result1" nicht vom Typ "int" wäre, käme es bei der Kompilierung der Zeile zu einem Fehler. @@ -1294,7 +1294,7 @@ Option values are any kind of value tagged with either 'Some' or 'None'. - Bei Optionswerten handelt es sich um eine beliebige Art von Werten, die entweder mit 'Some' oder mit 'None' markiert sind. + Bei Optionswerten handelt es sich um eine beliebige Art von Werten, die entweder mit "Some" oder mit "None" markiert sind. @@ -1394,7 +1394,7 @@ Values using Units of Measure can be used just like the primitive numeric type for things like printing. - Werte, die Maßeinheiten verwenden, können wie der primitive numerische Typ z. B. zum Drucken genutzt werden. + Werte, die Maßeinheiten verwenden, können wie der primitive numerische Typ z.B. zum Drucken genutzt werden. @@ -1444,7 +1444,7 @@ 'this' specifies a name for the object's self identifier. - 'this' gibt einen Namen für den Selbstbezeichner des Objekts an. + "this" gibt einen Namen für den Selbstbezeichner des Objekts an. @@ -1494,7 +1494,7 @@ use the '<-' operator to mutate the value. - Den '<-'-Operator verwenden, um den Wert zu mutieren + Den "<-"-Operator verwenden, um den Wert zu mutieren @@ -1509,7 +1509,7 @@ An 'int' instance of the state tracker class. Note that the type parameter is inferred. - Eine 'int'-Instanz der 'state tracker'-Klasse. Beachten Sie, dass der Typ-Parameter abgeleitet wird. + Eine int-Instanz der state tracker-Klasse. Beachten Sie, dass der Typ-Parameter abgeleitet wird. diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf index 5694cd3bf7b5..0eda61edb137 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf @@ -1324,7 +1324,7 @@ Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, - 他に多くのリストの組み合わせがあります。次の二乗和をコンピューティングします: + 次に、オブジェクトを表すインターフェイスの型を定義して、顧客の郵便番号の出荷ゾーンをコンピューティングし、 diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf index fea7e0434e68..fd33d17fa377 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf @@ -14,7 +14,7 @@ and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. - 並選取 [以互動方式執行]5D;。您可以從 [檢視]5D; 功能表開啟 F# Interactive 視窗。 + 並選取 [以互動方式執行]。您可以從 [檢視] 功能表開啟 F# 互動式視窗。 diff --git a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef index cc6731507ec5..b0b49ad4efd0 100644 --- a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef +++ b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef @@ -7,6 +7,9 @@ "Name"="F#" @="{871d2a70-12a2-4e42-9440-425dd92a4116}" +[$RootKey$\Editors\{8a5aa6cf-46e3-4520-a70a-7393d15233e9}] +"DeferUntilIntellisenseIsReady"=dword:00000000 + [$RootKey$\Editors\{8a5aa6cf-46e3-4520-a70a-7393d15233e9}\LogicalViews] "{7651a700-06e5-11d1-8ebd-00a0c90f26ea}"="" "{7651a701-06e5-11d1-8ebd-00a0c90f26ea}"="" diff --git a/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj b/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj index 0f3774974e1c..cfab3f5dfa67 100644 --- a/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj +++ b/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj @@ -15,9 +15,9 @@ packages\System.ValueTuple.4.4.0.nupkg true - + PreserveNewest - packages\FSharp.Core.4.6.2.nupkg + packages\FSharp.Core.$(FSharpCoreShippedPackageVersion).nupkg true @@ -27,7 +27,7 @@ - + diff --git a/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs b/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs index a555b47ff3a9..5a2c3eed9662 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs @@ -378,11 +378,15 @@ type internal FSharpProjectOptionsManager match Microsoft.CodeAnalysis.ExternalAccess.FSharp.LanguageServices.FSharpVisualStudioWorkspaceExtensions.TryGetProjectIdByBinPath(workspace, path) with | true, projectId -> projectId | false, _ -> Microsoft.CodeAnalysis.ExternalAccess.FSharp.LanguageServices.FSharpVisualStudioWorkspaceExtensions.GetOrCreateProjectIdForPath(workspace, path, projectDisplayNameOf path) - let path = Microsoft.CodeAnalysis.ExternalAccess.FSharp.LanguageServices.FSharpVisualStudioWorkspaceExtensions.GetProjectFilePath(workspace, projectId); - let fullPath p = - if Path.IsPathRooted(p) || path = null then p - else Path.Combine(Path.GetDirectoryName(path), p) - let sourcePaths = sources |> Seq.map(fun s -> fullPath s.Path) |> Seq.toArray + let path = Microsoft.CodeAnalysis.ExternalAccess.FSharp.LanguageServices.FSharpVisualStudioWorkspaceExtensions.GetProjectFilePath(workspace, projectId) + + let getFullPath p = + let p' = + if Path.IsPathRooted(p) || path = null then p + else Path.Combine(Path.GetDirectoryName(path), p) + Path.GetFullPathSafe(p') + + let sourcePaths = sources |> Seq.map(fun s -> getFullPath s.Path) |> Seq.toArray reactor.SetCpsCommandLineOptions(projectId, sourcePaths, options.ToArray()) diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf index a77fe0da025b..d397b7485088 100644 --- a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf @@ -29,17 +29,17 @@ Cannot navigate to the provided member '{0}'. - Wechseln zum angegebenen Member '{0}' ist nicht möglich. + Wechseln zum angegebenen Member "{0}" ist nicht möglich. Cannot navigate to the provided type '{0}'. - Wechseln zum angegebenen Typ '{0}' ist nicht möglich. + Wechseln zum angegebenen Typ "{0}" ist nicht möglich. Cannot navigate to definition. Type check information is not available, please try later. - Wechseln zur Definition ist nicht möglich. Die Informationen zum Überprüfen des Typen sind nicht verfügbar. Versuchen Sie es später erneut. + Wechseln zur Definition ist nicht möglich. Die Informationen zum Überprüfen des Typen sind nicht verfügbar. Versuchen Sie es später noch mal. diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf index 3b541159f280..8e843b7338eb 100644 --- a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf @@ -4,7 +4,7 @@ (The documentation cache is still being constructed. Please try again in a few seconds.) - (ドキュメント キャッシュの作成中です。何秒か待ってからもう 一度操作を行ってください。 + (ドキュメント キャッシュの作成中です。何秒か待ってからもう 一度操作を行ってください。) diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf index ffc095348b17..2a026b25d588 100644 --- a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf @@ -29,12 +29,12 @@ F# Interface File (*.fsi) - F# Schnittstellendatei (*.fsi) + F#-Schnittstellendatei (*.fsi) F# Script File (*.fsx) - F# Skriptdatei (*.fsx) + F#-Skriptdatei (*.fsx) @@ -59,7 +59,7 @@ Number - Anzahl + Zahl diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf index e0c47b9efa7d..a79fee23068e 100644 --- a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf @@ -19,7 +19,7 @@ Operator - operatore + Operatore @@ -49,7 +49,7 @@ Identifier - identificatore + Identificatore diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf index 2f9badfbb4a7..502d5956dace 100644 --- a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf @@ -49,7 +49,7 @@ Identifier - identificador + Identificador diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf index b9b597b8d533..d5de79f0e5c0 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf @@ -64,7 +64,7 @@ If you change a file name extension, the file may become unusable. Are you sure you want to change it? - Wenn Sie eine Dateinamenerweiterung ändern, wird die Datei möglicherweise unbrauchbar. Möchten Sie sie wirklich ändern? + Wenn Sie eine Dateinamenerweiterung ändern, wird die Datei möglicherweise unbrauchbar. Möchten Sie sie ändern? @@ -129,10 +129,10 @@ - contain only '.' - have any of the following characters: / ? : & \ * " < > | # % Für Dateien und Ordner gilt Folgendes: -- Sie dürfen keine leeren Zeichenfolgen sein. -- Sie dürfen keine für das System reservierten Namen aufweisen, einschließlich "CON", "AUX", PRN", "COM1" oder "LPT2". -- Sie dürfen nicht nur "." enthalten. -- Sie dürfen folgende Zeichen nicht aufweisen: / ? : & \ * " < > | # % +– Sie dürfen keine leeren Zeichenfolgen sein. +– Sie dürfen keine für das System reservierten Namen aufweisen, einschließlich "CON", "AUX", PRN", "COM1" oder "LPT2". +– Sie dürfen nicht ausschließlich "." enthalten. +– Sie dürfen folgende Zeichen nicht aufweisen: / ? : & \ * " < > | # % @@ -252,22 +252,22 @@ Minimal - minimal + Minimal Misc - Verschiedenes + Verschiedene None - NONE + Keine Normal - NORMAL + Normal @@ -802,7 +802,7 @@ Version - VERSION + Version diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf index b94354b317b7..a6784f5ff507 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf @@ -119,7 +119,7 @@ error - Fehler + error @@ -252,7 +252,7 @@ Minimal - mínimo + Mínimo @@ -387,7 +387,7 @@ warning - Advertencia + advertencia diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf index ce42e4ef5090..2f9d2203399d 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf @@ -119,7 +119,7 @@ error - Errore + errore @@ -387,7 +387,7 @@ warning - Avviso + avviso diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf index 00055ae4a893..8c5a5b3bf50b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf @@ -119,7 +119,7 @@ error - Błąd + błąd @@ -387,7 +387,7 @@ warning - Ostrzeżenie + ostrzeżenie @@ -462,7 +462,7 @@ Build - Kompiluj + Kompilacja diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf index f72f70bbe81e..904ef68a5c57 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf @@ -252,7 +252,7 @@ Minimal - mínimo + Mínimo diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf index 52c142cf47a4..ad597cad5bfd 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf @@ -627,7 +627,7 @@ The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. - 專案位置不受信任:{0}{0}{1}{0}{0}執行應用程式時若嘗試執行需要完全信任的動作,可能會產生安全性例外狀況。{0}{0}按一下 [確定]5D; 以忽略並繼續。 + 專案位置不受信任:{0}{0}{1}{0}{0}執行應用程式時若嘗試執行需要完全信任的動作,可能會產生安全性例外狀況。{0}{0}按一下 [確定] 以忽略並繼續。 diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/MenusAndCommands.vsct.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/MenusAndCommands.vsct.zh-Hant.xlf index f1c96d5286c7..918c88242961 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/MenusAndCommands.vsct.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/MenusAndCommands.vsct.zh-Hant.xlf @@ -49,7 +49,7 @@ F# Interactive - F# Interactive + F# 互動 @@ -84,12 +84,12 @@ &Send to F# Interactive - 傳送到 F# Interactive(&S) + 傳送到 F# 互動(&S) &Send to F# Interactive - 傳送到 F# Interactive(&S) + 傳送到 F# 互動(&S) @@ -114,12 +114,12 @@ &Send Project Output to F# Interactive - 傳送專案輸出到 F# Interactive(&S) + 傳送專案輸出到 F# 互動(&S) &Send Project Output to F# Interactive - 傳送專案輸出到 F# Interactive(&S) + 傳送專案輸出到 F# 互動(&S) diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf index 34cc71a6cf91..e27841feae2d 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf @@ -544,7 +544,7 @@ Referencing this version of FSharp.Core will cause your project to be incompatible with older versions of Visual Studio. Do you want to continue? - Odkazování na tuto verzi oboru názvů FSharp.Core zapříčíní nekompatibilitu projektu se staršími verzemi Visual Studia. Chcete pokračovat? + Odkazování na tuto verzi oboru názvů FSharp.Core zapříčiní nekompatibilitu projektu se staršími verzemi sady Visual Studio. Chcete pokračovat? diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf index 0e69ee238b84..e0c79c4a2bf7 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf @@ -434,12 +434,12 @@ Microsoft Visual F# Tools 10.4 for F# 4.6 - F# 4.6 用 Microsoft Visual F# Tools + F# 4.6 用 Microsoft Visual F# Tools 10.4 Microsoft Visual F# Tools 10.4 for F# 4.6 - F# 4.6 用 Microsoft Visual F# Tools + F# 4.6 用 Microsoft Visual F# Tools 10.4 diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf index 827c5be83023..5ae72d11dc85 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf @@ -144,7 +144,7 @@ Build - Kompiluj + Kompilacja diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf index aaa4543ca54d..eb0221892adf 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf @@ -334,17 +334,17 @@ SQL Database Connection (LINQ to SQL, type provider) - Conexão de Banco de Dados SQL (LINQ para SQL, provedor de tipos) + Conexão de Banco de Dados SQL (LINQ to SQL, provedor de tipos) A project item for using the SqlDataConnection (LINQ to SQL) type provider to generate types and consume data in a live SQL database. - Um item de projeto para usar o provedor de tipos SqlDataConnection (LINQ para SQL) para gerar tipos e consumir dados em um banco de dados SQL dinâmico. + Um item de projeto para usar o provedor de tipos SqlDataConnection (LINQ to SQL) para gerar tipos e consumir dados em um banco de dados SQL dinâmico. SQL Database Connection (LINQ to Entities, type provider) - Conexão de Banco de Dados SQL (LINQ para Entidades, provedor de tipos) + Conexão de Banco de Dados SQL (LINQ to Entities, provedor de tipos) @@ -434,12 +434,12 @@ Microsoft Visual F# Tools 10.4 for F# 4.6 - Ferramentas F# do Microsoft Visual 10.4 para F# 4.6 + Microsoft Visual F# Tools 10.4 para F# 4.6 Microsoft Visual F# Tools 10.4 for F# 4.6 - Ferramentas F# do Microsoft Visual 10.4 para F# 4.6 + Microsoft Visual F# Tools 10.4 para F# 4.6 @@ -454,7 +454,7 @@ Visual F# Tools 10.4 for F# 4.6 - Ferramentas F# do Visual 10.4 para F# 4.6 + Visual F# Tools 10.4 para F# 4.6 diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf index 6b452390e2b2..326a36bb8132 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf @@ -409,7 +409,7 @@ F# Interactive - F# Interactive + F# 互動 @@ -459,7 +459,7 @@ F# Interactive - F# Interactive + F# 互動 @@ -509,7 +509,7 @@ Change path and command line arguments passed to the F# Interactive - 變更傳遞到 F# Interactive 的路徑和命令列引數 + 變更傳遞到 F# 互動的路徑和命令列引數 diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf index 88fafb076b20..b106a3db12d5 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf @@ -44,7 +44,7 @@ Target F# runtime: - F#-Ziellaufzeit: + F#-Zielruntime: diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf index 860555f34409..b071e0c5f729 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf @@ -295,7 +295,7 @@ Vyberte prosím platnou cestu ke složce. Solution Explorer), and make changes on the Application tab. - průzkumníku řešení), a proveďte změny v kartě Aplikace. + Průzkumníku řešení), a proveďte změny v kartě Aplikace. @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf index 65b4328fdc2b..4184f3edc597 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf @@ -355,7 +355,7 @@ Wählen Sie einen gültigen Ordnerpfad aus. None - NONE + Keine @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" @@ -2148,12 +2147,12 @@ CONSIDER: get this from CodeDom The file '{0}' already exists. Do you want to replace it? - Die Datei "{0}" ist bereits vorhanden. Möchten Sie sie ersetzen? + Die Datei "{0}" ist bereits vorhanden. Möchten Sie sie ersetzen? {0} = full file path and name The following files already exist. Do you want to replace them? - Die folgenden Dateien sind bereits vorhanden. Möchten Sie sie ersetzen? + Die folgenden Dateien sind bereits vorhanden. Möchten Sie sie ersetzen? diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf index 1153755c3dd4..4b1a5e0d904f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf @@ -39,7 +39,7 @@ Debug - depurar + Depurar @@ -365,7 +365,7 @@ Seleccione una ruta de acceso de carpeta válida. Error - Fehler + Error @@ -614,7 +614,7 @@ Error: Error - Fehler + Error @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf index cd60e9f07e90..99d346991941 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf @@ -39,7 +39,7 @@ Debug - déboguer + Déboguer @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf index dd58cb9a1198..8902030751c4 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf index bdb896a5c834..de4d65e71f84 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" @@ -2930,7 +2929,7 @@ app.config ファイルでの新しい値は '{1}' です The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. - この引き上げられたアクセス許可が原因で、選択されたゾーンでのアプリケーションの実行は失敗します。詳細については、ヘルプ リンクをクリックしてください。 + 要求されたこの引き上げられたアクセス許可が原因で、選択されたゾーンでのアプリケーションの実行は失敗します。詳細については、ヘルプ リンクをクリックしてください。 diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf index 6f540b54250a..e7191ac3c4a7 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf index 73bef853b9f0..6936b8e97f57 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf @@ -59,7 +59,7 @@ Build - Kompiluj + Kompilacja @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf index 3e8a1693485c..fefd197867ef 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" @@ -1969,7 +1968,7 @@ CONSIDER: get this from CodeDom Portable Network Graphics - formato PNG + Formato PNG Friendly Image types @@ -2063,7 +2062,7 @@ CONSIDER: get this from CodeDom Portable Network Graphics - formato PNG + Formato PNG # File dialog filters # # E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources @@ -2072,7 +2071,7 @@ CONSIDER: get this from CodeDom Graphics Interchange Format - Formato de intercâmbio de gráficos + Graphics Interchange Format # File dialog filters # # E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf index 2b5303d91de5..355d363084e9 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf index 73a72b806a27..86ac32f4b37f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf index 474f99a3dcdd..0537632d5fcd 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf index 16b7339b2a41..17c64ffefb91 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf @@ -1828,9 +1828,8 @@ CONSIDER: get this from CodeDom {0} x {1} - {0} x {1} + {0} x {1} Format string for showing a graphic's size - # {0} = width (as an integer) # {1} = height (as an integer) #Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf index 584143c8116d..1b8578d6fe3b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf @@ -9,7 +9,7 @@ Unable to find a code generator (CodeDomProvider). - Code-Generator (CodeDomProvider) kann nicht gefunden werden. + Es wurde kein Code-Generator (CodeDomProvider) gefunden. @@ -259,7 +259,7 @@ The requested operation is not valid while an asynchronous operation is in progress. - Der angeforderte Vorgang ist unzulässig, während ein asynchroner Vorgang läuft. + Der angeforderte Vorgang ist unzulässig, während ein asynchroner Vorgang ausgeführt wird. diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf index 76999ca3e0b5..def3cf204860 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf @@ -279,7 +279,7 @@ The file is already opened in an incompatible editor. - ファイルは、互換性のないエディターで既に開かれています。 + ファイルが、互換性のないエディターで既に開かれています。 diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf index 7178a91c6051..989b2031feea 100644 --- a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf @@ -24,7 +24,7 @@ Misc - Verschiedenes + Verschiedene diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf index b3f7cfc54ad8..6099d3d9fda3 100644 --- a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf @@ -4,17 +4,17 @@ 64-bit F# Interactive - F# Interative de 64 bits + F# Interativo de 64 bits If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) - Se estiver definido como true, e o computador atual for 64 bits, execute o F# Interactive como um processo de 64 bits. (Caso contrário, o F# Interactive será um processo de 32 bits.) + Se estiver definido como true, e o computador atual for 64 bits, execute o F# Interativo como um processo de 64 bits. (Caso contrário, o F# Interactive será um processo de 32 bits.) F# Interactive options - Opções interativas F# + Opções do F# Interativo @@ -34,7 +34,7 @@ Prevents referenced assemblies from being locked by the F# Interactive process. - Impede que os assemblies referenciados sejam bloqueados pelo processo de F# interativo. + Impede que os assemblies referenciados sejam bloqueados pelo processo do F# Interativo. diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf index 3b60c892d472..dd4f7af32681 100644 --- a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf @@ -4,7 +4,7 @@ 64-bit F# Interactive - 64 位元 F# Interactive + 64 位元 F# 互動 @@ -19,7 +19,7 @@ Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) - 由 Visual Studio 額外傳遞給 F# Interactive 可執行檔的命令列引數。(若啟用指令碼偵錯,則會忽略最佳化及偵錯旗標) + 由 Visual Studio 額外傳遞給 F# 互動可執行檔的命令列引數。(若啟用指令碼偵錯,則會忽略最佳化及偵錯旗標) @@ -34,7 +34,7 @@ Prevents referenced assemblies from being locked by the F# Interactive process. - 避免參考的組件遭 F# 互動式處理序封鎖。 + 避免參考的組件遭 F# 互動處理序封鎖。 diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf index e8cc3f22c76f..a3d2f3edb354 100644 --- a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf @@ -34,7 +34,7 @@ Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n - Não foi possível encontrar fsi.exe, o Executável interativo F#.\nEste arquivo não existe:\n\n{0}\n + Não foi possível encontrar fsi.exe, o executável do F# Interativo.\nEste arquivo não existe:\n\n{0}\n diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf index b891d6630c11..ba06ff32813d 100644 --- a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf @@ -29,12 +29,12 @@ F# Interactive - F# Interactive + F# 互動 Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n - 找不到 F# Interactive 可執行檔 fsi.exe。\n這個檔案不存在:\n\n{0}\n + 找不到 F# 互動可執行檔 fsi.exe。\n這個檔案不存在:\n\n{0}\n diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj index f7eea70d9741..c3e21061e0b0 100644 --- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj +++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj @@ -49,23 +49,30 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/vsintegration/tests/Salsa/VsMocks.fs b/vsintegration/tests/Salsa/VsMocks.fs index e498dd1f8fa4..c3008cf636da 100644 --- a/vsintegration/tests/Salsa/VsMocks.fs +++ b/vsintegration/tests/Salsa/VsMocks.fs @@ -1657,41 +1657,27 @@ module internal VsActual = let CreateEditorCatalog() = let thisAssembly = Assembly.GetExecutingAssembly().Location - let editorAssemblyDir = Path.Combine(vsInstallDir, @"IDE\CommonExtensions\Microsoft\Editor") - let privateAssemblyDir = Path.Combine(vsInstallDir, @"IDE\PrivateAssemblies") - let publicAssemblyDir = Path.Combine(vsInstallDir, @"IDE\PublicAssemblies") - - let CreateAssemblyCatalog(path, file) = - let fullPath = Path.GetFullPath(Path.Combine(path, file)) - if File.Exists(fullPath) then - new AssemblyCatalog(fullPath) - else - failwith("could not find " + fullPath) - + let thisAssemblyDir = Path.GetDirectoryName(thisAssembly) let list = new ResizeArray() - - let addMovedFile originalDir alternateDir file = - let path = Path.Combine(originalDir, file) - if File.Exists(path) then - list.Add(CreateAssemblyCatalog(originalDir, file)) + let add p = + let fullPath = Path.GetFullPath(Path.Combine(thisAssemblyDir, p)) + if File.Exists(fullPath) then + list.Add(new AssemblyCatalog(fullPath)) else - list.Add(CreateAssemblyCatalog(alternateDir, file)) + failwith <| sprintf "unable to find assembly %s" p list.Add(new AssemblyCatalog(thisAssembly)) - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.Data.dll")) - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.Logic.dll")) - - // "Microsoft.VisualStudio.Text.Internal.dll" moved locations between dev15 and 16 - // This ensures we can run in both Devs 15 and 16 - addMovedFile privateAssemblyDir editorAssemblyDir "Microsoft.VisualStudio.Text.Internal.dll" - - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.UI.dll")) - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.UI.Wpf.dll")) - list.Add(CreateAssemblyCatalog(privateAssemblyDir, "Microsoft.VisualStudio.Threading.dll")) - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Platform.VSEditor.dll")) - list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Editor.Implementation.dll")) - list.Add(CreateAssemblyCatalog(publicAssemblyDir, "Microsoft.VisualStudio.ComponentModelHost.dll")) - list.Add(CreateAssemblyCatalog(publicAssemblyDir, "Microsoft.VisualStudio.Shell.15.0.dll")) + [ "Microsoft.VisualStudio.Text.Data.dll" + "Microsoft.VisualStudio.Text.Logic.dll" + "Microsoft.VisualStudio.Text.Internal.dll" + "Microsoft.VisualStudio.Text.UI.dll" + "Microsoft.VisualStudio.Text.UI.Wpf.dll" + "Microsoft.VisualStudio.Threading.dll" + "Microsoft.VisualStudio.Platform.VSEditor.dll" + "Microsoft.VisualStudio.Editor.Implementation.dll" + "Microsoft.VisualStudio.ComponentModelHost.dll" + "Microsoft.VisualStudio.Shell.15.0.dll" ] + |> List.iter add new AggregateCatalog(list) let exportProvider = new CompositionContainer(new AggregateCatalog(CreateEditorCatalog()), true, null) diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 7a0bea770172..6a3cae016a6d 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -234,6 +234,7 @@ + @@ -243,6 +244,7 @@ +