Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd02a425

Browse files
committed
More places in IDE unit tests that need to use Assembly.EscapedCodeBase
1 parent942d292 commitd02a425

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎vsintegration/src/unittests/Tests.LanguageService.General.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type GeneralTests() =
6565

6666
letpublicTypesInAsm(asmfile:string)=
6767
printfn"Validating assembly '%s'" asmfile
68-
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().CodeBase)).LocalPath|> Path.GetDirectoryName
68+
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase)).LocalPath|> Path.GetDirectoryName
6969
letasm= Assembly.LoadFrom(Path.Combine(codeBase, asmfile))
7070

7171
// For public types that have ComVisible, validate that the constructor is internal
@@ -175,7 +175,7 @@ type GeneralTests() =
175175
memberpublicthis.``PublicSurfaceArea.DotNetReflectionAndTypeProviders``()=
176176
lettp= publicTypesInAsm@"FSharp.Data.TypeProviders.dll"
177177
Assert.AreEqual(1, tp)// the 'DataProviders' type that is decorated with [<TypeProvider>] must be public\
178-
letcurDir=(new Uri(Assembly.GetExecutingAssembly().CodeBase)).LocalPath|> Path.GetDirectoryName
178+
letcurDir=(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase)).LocalPath|> Path.GetDirectoryName
179179
letscript="""
180180
open Microsoft.FSharp.Core.CompilerServices
181181

‎vsintegration/src/unittests/Tests.ProjectSystem.MultiTargeting.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type MultiTargeting() =
2929
memberprivatethis.prepTest(projFile)=
3030
letdirName= Path.GetDirectoryName(projFile)
3131
letlibDirName= Directory.CreateDirectory(Path.Combine(dirName,"lib")).FullName
32-
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().CodeBase)).LocalPath|> Path.GetDirectoryName
32+
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase)).LocalPath|> Path.GetDirectoryName
3333
letrefLibPath= Path.Combine(libDirName,"FSharp.Core.Unittests.dll")
3434
File.Copy(Path.Combine(codeBase,"FSharp.Core.Unittests.dll"), refLibPath)
3535
File.AppendAllText(projFile, TheTests.FsprojTextWithProjectReferencesAndOtherFlags([],[refLibPath],[],null,"","v2.0"))

‎vsintegration/src/unittests/Tests.ProjectSystem.References.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ type References() =
559559
DoWithTempFile"Test.fsproj"(fun projFile->
560560
letdirName= Path.GetDirectoryName(projFile)
561561
letlibDirName= Directory.CreateDirectory(Path.Combine(dirName,"lib")).FullName
562-
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().CodeBase)).LocalPath|> Path.GetDirectoryName
562+
letcodeBase=(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase)).LocalPath|> Path.GetDirectoryName
563563
letrefLibPath= Path.Combine(libDirName,"nunit.core.dll")
564564
File.Copy(Path.Combine(codeBase,"nunit.core.dll"), refLibPath)
565565
File.AppendAllText(projFile, TheTests.SimpleFsprojText([],[refLibPath],""))
@@ -574,7 +574,7 @@ type References() =
574574
letl=new List<ReferenceContainerNode>()
575575
project.FindNodesOfType(l)
576576
l.[0]
577-
letmscorlibPath=(new Uri("".GetType().Assembly.CodeBase)).LocalPath
577+
letmscorlibPath=(new Uri("".GetType().Assembly.EscapedCodeBase)).LocalPath
578578
letselectorData=new VSCOMPONENTSELECTORDATA(``type``= VSCOMPONENTTYPE.VSCOMPONENTTYPE_ComPlus, bstrFile= mscorlibPath)
579579
refContainer.AddReferenceFromSelectorData(selectorData)|> Assert.IsNotNull
580580
letl=new List<AssemblyReferenceNode>()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp