Author: rolf
Date: 2007-01-11 05:21:18 -0500 (Thu, 11 Jan 2007)
New Revision: 70848
Added:
trunk/mono-basic/vbnc/vbnc/source/AutoGen/
trunk/mono-basic/vbnc/vbnc/source/ConditionalCompilation/
Removed:
trunk/mono-basic/vbnc/vbnc/source/Auto Gen/
trunk/mono-basic/vbnc/vbnc/source/Conditional Compilation/
Modified:
trunk/mono-basic/class/lib/bootstrap/vbnc.exe
trunk/mono-basic/vbnc/changelog.txt
trunk/mono-basic/vbnc/vbnc/Makefile
trunk/mono-basic/vbnc/vbnc/source/General/AssemblyInfo.vb
trunk/mono-basic/vbnc/vbnc/source/General/TypeManager.vb
trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj
trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj.user
trunk/mono-basic/vbnc/vbnc/vbnc.exe.sources
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/2005VB.vbproj
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/AssemblyInfo.vb
Log:
2007-01-11 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Fixed assembly loading to support loading assemblies placed in the
same directory as the compiler.
Also removed spaces from some directories to ease building on Linux.
Modified: trunk/mono-basic/class/lib/bootstrap/vbnc.exe
===================================================================
(Binary files differ)
Modified: trunk/mono-basic/vbnc/changelog.txt
===================================================================
--- trunk/mono-basic/vbnc/changelog.txt 2007-01-11 10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbnc/changelog.txt 2007-01-11 10:21:18 UTC (rev 70848)
@@ -1,3 +1,6 @@
+2007-01-11 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+ * Fixed assembly loading to support loading assemblies placed in the
same directory as the compiler.
+
2007-01-05 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Fixed a typo and changed e-mail the copyright notice.
* Rewrote member lookup (adding a member cache, inspired by mcs), looks
like it works faster now
Modified: trunk/mono-basic/vbnc/vbnc/Makefile
===================================================================
--- trunk/mono-basic/vbnc/vbnc/Makefile 2007-01-11 10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbnc/vbnc/Makefile 2007-01-11 10:21:18 UTC (rev 70848)
@@ -2,7 +2,7 @@
SUBDIRS =
include ../../build/rules.make
-LOCAL_VBNC_FLAGS = /res:source/vbnc.rsp /res:source/Resources/Errors.resx
+LOCAL_VBNC_FLAGS = @vbnc.exe.rsp
PROGRAM = $(topdir)/class/lib/vbnc/vbnc.exe
PROGRAM_COMPILE = $(BOOT_COMPILE)
Copied: trunk/mono-basic/vbnc/vbnc/source/AutoGen (from rev 70837,
trunk/mono-basic/vbnc/vbnc/source/Auto Gen)
Copied: trunk/mono-basic/vbnc/vbnc/source/ConditionalCompilation (from rev
70837, trunk/mono-basic/vbnc/vbnc/source/Conditional Compilation)
Modified: trunk/mono-basic/vbnc/vbnc/source/General/AssemblyInfo.vb
===================================================================
--- trunk/mono-basic/vbnc/vbnc/source/General/AssemblyInfo.vb 2007-01-11
10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbnc/vbnc/source/General/AssemblyInfo.vb 2007-01-11
10:21:18 UTC (rev 70848)
@@ -49,5 +49,5 @@
' You can specify all the values or you can default the Build and Revision
Numbers
' by using the '*' as shown below:
-<Assembly: AssemblyVersion("0.0.0.4802")>
+<Assembly: AssemblyVersion("0.0.0.4813")>
Modified: trunk/mono-basic/vbnc/vbnc/source/General/TypeManager.vb
===================================================================
--- trunk/mono-basic/vbnc/vbnc/source/General/TypeManager.vb 2007-01-11
10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbnc/vbnc/source/General/TypeManager.vb 2007-01-11
10:21:18 UTC (rev 70848)
@@ -260,26 +260,60 @@
''' <returns></returns>
''' <remarks></remarks>
Private Function LoadAssembly(ByVal Filename As String) As
Reflection.Assembly
- Dim refAss As Reflection.Assembly
- ' Try
- If IO.File.Exists(Filename) OrElse
IO.File.Exists(IO.Path.Combine(IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly.Location),
Filename)) Then
- refAss = Reflection.Assembly.LoadFrom(Filename)
- If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & Filename & "'")
- Return refAss
- End If
- ' Catch ex As IO.FileNotFoundException
- For Each strPath As String In Compiler.CommandLine.LibPath
- Dim strFullPath As String = IO.Path.Combine(strPath, Filename)
- Try
- If IO.File.Exists(strFullPath) Then
- refAss = Reflection.Assembly.LoadFrom(strFullPath)
- If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & strFullPath & "'")
- Return refAss
+ Try
+ Dim refAss As Reflection.Assembly
+ ' Try
+ If IO.File.Exists(Filename) Then
+ 'Compiler.Report.WriteLine("1 - Loading " & Filename)
+ refAss = Reflection.Assembly.LoadFrom(Filename)
+ If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & Filename & "'")
+ Return refAss
+ End If
+
+ Dim fullName As String
+ fullName =
IO.Path.Combine(IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly.Location),
Filename)
+ If IO.File.Exists(fullName) Then
+ Filename = fullName
+ 'Compiler.Report.WriteLine("1.5 - Loading " & Filename)
+ refAss = Reflection.Assembly.LoadFrom(Filename)
+ If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & Filename & "'")
+ Return refAss
+ End If
+
+ If False AndAlso Filename.IndexOfAny(New Char()
{System.IO.Path.DirectorySeparatorChar,
System.IO.Path.AltDirectorySeparatorChar}) = -1 Then
+ Dim assemblyName As String
+ If Filename.EndsWith(".dll",
StringComparison.OrdinalIgnoreCase) OrElse Filename.EndsWith(".exe",
StringComparison.OrdinalIgnoreCase) Then
+ assemblyName = Filename.Substring(0, Filename.Length - 4)
+ Else
+ assemblyName = Filename
End If
- Catch ex2 As Exception
- 'Do nothing, just keep on trying
- End Try
- Next
+ 'Compiler.Report.WriteLine("2 - Loading " & assemblyName)
+ refAss = Reflection.Assembly.Load(assemblyName)
+ If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & refAss.Location & "'")
+ Return refAss
+ End If
+
+ ' Catch ex As IO.FileNotFoundException
+ For Each strPath As String In Compiler.CommandLine.LibPath
+ 'Compiler.Report.WriteLine("Checking path '" & strPath & "'")
+ Dim strFullPath As String = IO.Path.Combine(strPath, Filename)
+ Try
+ If IO.File.Exists(strFullPath) Then
+ 'Compiler.Report.WriteLine("3 - Loading " & Filename &
"(" & strFullPath & ")")
+ refAss = Reflection.Assembly.LoadFrom(strFullPath)
+ If Compiler.CommandLine.Verbose Then
Compiler.Report.WriteLine("Loaded '" & strFullPath & "'")
+ Return refAss
+ End If
+ Catch ex2 As Exception
+ 'Do nothing, just keep on trying
+ End Try
+ Next
+ Catch ex As System.IO.FileNotFoundException
+ Compiler.Report.WriteLine(ex.Message)
+ Compiler.Report.WriteLine(ex.StackTrace)
+ Compiler.Report.WriteLine(ex.FusionLog)
+ Helper.AddError("Could not load assembly")
+ End Try
' End Try
Return Nothing
End Function
Modified: trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj
===================================================================
--- trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj 2007-01-11 10:17:16 UTC
(rev 70847)
+++ trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj 2007-01-11 10:21:18 UTC
(rev 70848)
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@@ -166,12 +166,13 @@
<Import Include="VB=Microsoft.VisualBasic" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="AutoGen\ZCompilerCodeGenerator.vb" />
<Compile Include="Code\CodeBlock.vb" />
<Compile Include="Code\ImplicitCodeBlock.vb" />
- <Compile Include="Conditional Compilation\ConditionalConstant.vb">
- </Compile>
- <Compile Include="Conditional Compilation\ConditionalConstants.vb" />
- <Compile Include="Conditional Compilation\ConditionalExpression.vb" />
+ <Compile Include="ConditionalCompilation\ConditionalCompilation.vb" />
+ <Compile Include="ConditionalCompilation\ConditionalConstant.vb" />
+ <Compile Include="ConditionalCompilation\ConditionalConstants.vb" />
+ <Compile Include="ConditionalCompilation\ConditionalExpression.vb" />
<Compile Include="Descriptors\ArrayTypeDescriptor.vb" />
<Compile Include="Descriptors\ByRefTypeDescriptor.vb" />
<Compile Include="Descriptors\ConstructorDescriptor.vb" />
@@ -668,8 +669,6 @@
<Compile Include="General\CommandLine.vb">
<SubType>Code</SubType>
</Compile>
- <Compile Include="Conditional Compilation\ConditionalCompilation.vb">
- </Compile>
<Compile Include="Enums\Enums.vb">
<SubType>Code</SubType>
</Compile>
@@ -757,9 +756,6 @@
<Compile Include="Types\TypeParameterConstraints.vb" />
<Compile Include="Types\TypeParameterList.vb" />
<Compile Include="Types\TypeParameters.vb" />
- <Compile Include="Auto Gen\ZCompilerCodeGenerator.vb">
- <SubType>Code</SubType>
- </Compile>
<Compile Include="General\TypeResolution.vb">
<SubType>Code</SubType>
</Compile>
Modified: trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj.user
===================================================================
--- trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj.user 2007-01-11 10:17:16 UTC
(rev 70847)
+++ trunk/mono-basic/vbnc/vbnc/source/vbnc.vbproj.user 2007-01-11 10:21:18 UTC
(rev 70848)
@@ -18,7 +18,7 @@
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>true</VerifyUploadedFiles>
<LastOpenVersion>8.0.50215</LastOpenVersion>
- <ProjectView>ProjectFiles</ProjectView>
+ <ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Self
Compile|AnyCPU' ">
<StartArguments>@self.rsp</StartArguments>
Modified: trunk/mono-basic/vbnc/vbnc/vbnc.exe.sources
===================================================================
--- trunk/mono-basic/vbnc/vbnc/vbnc.exe.sources 2007-01-11 10:17:16 UTC (rev
70847)
+++ trunk/mono-basic/vbnc/vbnc/vbnc.exe.sources 2007-01-11 10:21:18 UTC (rev
70848)
@@ -1,8 +1,8 @@
source/Code/CodeBlock.vb
source/Code/ImplicitCodeBlock.vb
-source/Conditional Compilation/ConditionalConstant.vb
-source/Conditional Compilation/ConditionalConstants.vb
-source/Conditional Compilation/ConditionalExpression.vb
+source/ConditionalCompilation/ConditionalConstant.vb
+source/ConditionalCompilation/ConditionalConstants.vb
+source/ConditionalCompilation/ConditionalExpression.vb
source/Descriptors/ArrayTypeDescriptor.vb
source/Descriptors/ByRefTypeDescriptor.vb
source/Descriptors/ConstructorDescriptor.vb
@@ -368,7 +368,7 @@
source/General/BaseObjects`1.vb
source/General/CodeFile.vb
source/General/CommandLine.vb
-source/Conditional Compilation/ConditionalCompilation.vb
+source/ConditionalCompilation/ConditionalCompilation.vb
source/Enums/Enums.vb
source/Expressions/Expression.vb
source/General/Helper.vb
@@ -379,8 +379,6 @@
source/Members/PropertySetDeclaration.vb
source/General/Report.vb
source/General/Scanner.vb
-source/My Application/MyApplication.Designer.vb
-source/My Project/Application.Designer.vb
source/Testing/Testing.vb
source/Tokens/CharLiteralToken.vb
source/Tokens/DateLiteralToken.vb
@@ -431,7 +429,7 @@
source/Types/TypeParameterConstraints.vb
source/Types/TypeParameterList.vb
source/Types/TypeParameters.vb
-source/Auto Gen/ZCompilerCodeGenerator.vb
+source/AutoGen/ZCompilerCodeGenerator.vb
source/General/TypeResolution.vb
source/Expressions/Classifications/ExpressionClassification.Classifications.vb
Modified: trunk/mono-basic/vbruntime/Microsoft.VisualBasic/2005VB.vbproj
===================================================================
--- trunk/mono-basic/vbruntime/Microsoft.VisualBasic/2005VB.vbproj
2007-01-11 10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbruntime/Microsoft.VisualBasic/2005VB.vbproj
2007-01-11 10:21:18 UTC (rev 70848)
@@ -20,7 +20,7 @@
<OutputPath>..\bin\</OutputPath>
<DocumentationFile>Microsoft.VisualBasic.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
- <DefineConstants>NET_2_0=True,_MYTYPE="Empty"</DefineConstants>
+ <DefineConstants>NET_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -30,6 +30,7 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Microsoft.VisualBasic.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
+ <DefineConstants>NET_2_0</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Modified: trunk/mono-basic/vbruntime/Microsoft.VisualBasic/AssemblyInfo.vb
===================================================================
--- trunk/mono-basic/vbruntime/Microsoft.VisualBasic/AssemblyInfo.vb
2007-01-11 10:17:16 UTC (rev 70847)
+++ trunk/mono-basic/vbruntime/Microsoft.VisualBasic/AssemblyInfo.vb
2007-01-11 10:21:18 UTC (rev 70848)
@@ -67,7 +67,7 @@
' <Assembly: AssemblyVersion("1.0.*")>
#If NET_2_0 Then
-<Assembly: AssemblyVersion("8.0.0.0")>
+<Assembly: AssemblyVersion("8.0.0.1")>
#Else
<Assembly: AssemblyVersion("7.0.5000.0")>
#End If
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches