diff --git a/data/templates/file/CSharp/CSharp.WcfRestService.xft b/data/templates/file/CSharp/CSharp.WcfRestService.xft
new file mode 100644
index 0000000000..3db8d9171a
--- /dev/null
+++ b/data/templates/file/CSharp/CSharp.WcfRestService.xft
@@ -0,0 +1,55 @@
+
+
+
+
+
+ WCF REST Service
+
+
+
+
+]]>
+
+
+
+ /// Description of ${ClassName}.
+ ///
+ public class ${ClassName} : I${ClassName}
+ {
+ public string MyOperation(string name)
+ {
+ // implement the operation
+ return string.Format("Operation name: {0}", name);
+ }
+ }
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/data/templates/file/VB/VB.WcfRestService.xft b/data/templates/file/VB/VB.WcfRestService.xft
new file mode 100644
index 0000000000..b06fffa6d0
--- /dev/null
+++ b/data/templates/file/VB/VB.WcfRestService.xft
@@ -0,0 +1,50 @@
+
+
+
+
+
+ WCF REST Service
+
+
+
+
+]]>
+
+
+ _
+Public Interface I${ClassName}
+ _
+ _
+ Function MyOperation(name As String) As String
+End Interface
+
+'''
+''' Description of ${ClassName}.
+'''
+Public Class ${ClassName}
+ Implements I${ClassName}
+ Function MyOperation(name As String) As String Implements I${ClassName}.MyOperation
+ ' implement the operation
+ Return String.Format("Operation name: {0}", name)
+ End Sub
+End Class
+]]>
+
+
+
\ No newline at end of file
diff --git a/data/templates/project/CSharp/CSharp.WcfRestServiceProject.xpt b/data/templates/project/CSharp/CSharp.WcfRestServiceProject.xpt
new file mode 100644
index 0000000000..5755f10a79
--- /dev/null
+++ b/data/templates/project/CSharp/CSharp.WcfRestServiceProject.xpt
@@ -0,0 +1,104 @@
+
+
+
+
+
+ WCF REST Service
+ C#
+ WCF
+ C#.Project.Form
+ WCF REST Service
+ v3.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library
+ {3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Properties
+
+
+
+ bin\
+
+
+
+ bin\
+
+
+
+
+
+
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
diff --git a/data/templates/project/CSharp/CSharp.WcfServiceProject.xpt b/data/templates/project/CSharp/CSharp.WcfServiceProject.xpt
index fe086c77db..76e7ddd7e3 100644
--- a/data/templates/project/CSharp/CSharp.WcfServiceProject.xpt
+++ b/data/templates/project/CSharp/CSharp.WcfServiceProject.xpt
@@ -17,7 +17,7 @@
-
+
@@ -42,12 +42,12 @@
-
+
+<%@ServiceHost language="C#" Debug="true" Service="${StandardNamespace}.Service"%>
]]>
-
+
-
-
-
+
+ contract="${StandardNamespace}.IService" />
diff --git a/data/templates/project/VB/VB.WcfRestServiceProject.xpt b/data/templates/project/VB/VB.WcfRestServiceProject.xpt
new file mode 100644
index 0000000000..8242a82b2b
--- /dev/null
+++ b/data/templates/project/VB/VB.WcfRestServiceProject.xpt
@@ -0,0 +1,99 @@
+
+
+
+
+
+ WCF REST Service
+ VB
+ WCF
+ VBNet.Project.Form
+ WCF REST Service
+ v3.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library
+ {3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Properties
+
+
+
+ bin\
+
+
+
+ bin\
+
+
+
+
+
+
+]]>
+
+
+ _
+Public Interface IService
+ _
+ _
+ Function MyOperation(name As String) As String
+End Interface
+
+Public Class Service
+ Implements IService
+ Function MyOperation(name As String) As String Implements IService.MyOperation
+ ' implement the operation
+ Return String.Format("Operation name: {0}", name)
+ End Function
+End Class
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
diff --git a/data/templates/project/VB/VB.WcfServiceProject.xpt b/data/templates/project/VB/VB.WcfServiceProject.xpt
index 07cfbf24e4..edddb53089 100644
--- a/data/templates/project/VB/VB.WcfServiceProject.xpt
+++ b/data/templates/project/VB/VB.WcfServiceProject.xpt
@@ -17,7 +17,7 @@
-
+
@@ -42,42 +42,27 @@
-
+
+<%@ServiceHost language="VB" Debug="true" Service="${StandardNamespace}.Service"%>
]]>
-
+
_
-Public Interface ICalculator
+Public Interface IService
_
- Function Add(n1 As Double, n2 As Double) As Double
- _
- Function Subtract(n1 As Double, n2 As Double) As Double
- _
- Function Multiply(n1 As Double, n2 As Double) As Double
- _
- Function Divide(n1 As Double, n2 As Double) As Double
+ Sub MyOperation()
End Interface
-Public Class ServiceCalculator
- Implements ICalculator
- Public Function Add(n1 As Double, n2 As Double) As Double Implements ICalculator.Add
- Return n1 + n2
- End Function
- Public Function Subtract(n1 As Double, n2 As Double) As Double Implements ICalculator.Subtract
- Return n1 - n2
- End Function
- Public Function Multiply(n1 As Double, n2 As Double) As Double Implements ICalculator.Multiply
- Return n1 * n2
- End Function
- Public Function Divide(n1 As Double, n2 As Double) As Double Implements ICalculator.Divide
- Return n1 / n2
- End Function
+Public Class Service
+ Implements IService
+ Public Sub MyOperation() Implements IService.MyOperation
+ ' implement the operation
+ End Sub
End Class
]]>
@@ -86,12 +71,10 @@ End Class
-
-
-
+
+ contract="${StandardNamespace}.IService" />
diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj b/src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj
index b5a7360023..34f55841e7 100644
--- a/src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj
+++ b/src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj
@@ -40,6 +40,7 @@
+
..\..\..\..\..\Tools\NUnit\nunit.framework.dll
diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs
index 4749adb149..f239c59619 100644
--- a/src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs
+++ b/src/AddIns/BackendBindings/Boo/BooBinding/Test/ResolverTests.cs
@@ -51,7 +51,7 @@ namespace Grunwald.BooBinding.Tests
lastPC = pc;
HostCallback.GetCurrentProjectContent = delegate { return pc; };
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
- pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
+ pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference("System.Windows.Forms", typeof(System.Windows.Forms.Form).Module.FullyQualifiedName));
pc.ReferencedContents.Add(booLangPC);
ICompilationUnit cu = new BooParser().Parse(pc, fileName, new StringTextBuffer(prog));
ParserService.RegisterParseInformation(fileName, cu);
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
index 31cb150197..72ebc330fb 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
@@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
-
+using System.Linq;
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.Core;
@@ -35,9 +35,9 @@ namespace ICSharpCode.VBNetBinding.Tests
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
Dictionary referencedAssemblies = new Dictionary() {
- { "System", null },
- { "System.Core", null },
- { "Microsoft.VisualBasic", null }
+ { "System", typeof(Uri).Module.FullyQualifiedName },
+ { "System.Core", typeof(Enumerable).Module.FullyQualifiedName },
+ { "Microsoft.VisualBasic", typeof(Microsoft.VisualBasic.Constants).Module.FullyQualifiedName }
};
foreach (var assembly in referencedAssemblies) {
IProjectContent referenceProjectContent = AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference(assembly.Key, assembly.Value ?? assembly.Key);
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/VBNetBinding.Tests.csproj b/src/AddIns/BackendBindings/VBNetBinding/Test/VBNetBinding.Tests.csproj
index fdedcb7e74..2f1bb750be 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Test/VBNetBinding.Tests.csproj
+++ b/src/AddIns/BackendBindings/VBNetBinding/Test/VBNetBinding.Tests.csproj
@@ -32,6 +32,7 @@
None
+
3.0
diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
index 0eee387cdd..2f59a61e1f 100644
--- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
+++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
@@ -33,11 +33,11 @@ namespace ICSharpCode.XamlBinding.Tests
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
Dictionary referencedAssemblies = new Dictionary() {
- { "System", null },
- { "System.Xml", null },
+ { "System", typeof(Uri).Assembly.Location },
+ { "System.Xml", typeof(System.Xml.XmlDocument).Assembly.Location },
{ "System.Xaml", typeof(System.Xaml.XamlReader).Assembly.Location },
{ "WindowsBase", typeof(System.Windows.Media.Matrix).Assembly.Location },
- { "System.Core", null },
+ { "System.Core", typeof(System.Linq.Enumerable).Assembly.Location },
{ "PresentationCore", typeof(System.Windows.Media.Brush).Assembly.Location },
{ "PresentationFramework", typeof(System.Windows.EventSetter).Assembly.Location }
};
diff --git a/src/AddIns/Misc/ResourceToolkit/Test/AbstractTestProjectTestFixture.cs b/src/AddIns/Misc/ResourceToolkit/Test/AbstractTestProjectTestFixture.cs
index aece48bd1a..cb02c90399 100644
--- a/src/AddIns/Misc/ResourceToolkit/Test/AbstractTestProjectTestFixture.cs
+++ b/src/AddIns/Misc/ResourceToolkit/Test/AbstractTestProjectTestFixture.cs
@@ -92,7 +92,7 @@ namespace ResourceToolkit.Tests
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
- pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference("System", "System"));
+ pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference("System", typeof(Uri).Module.FullyQualifiedName));
if (project != null) {
if (project.LanguageProperties != null) {
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/VBNET-Mode.xshd b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/VBNET-Mode.xshd
index 8a4c3e66a7..3487615593 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/VBNET-Mode.xshd
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/VBNET-Mode.xshd
@@ -4,6 +4,7 @@
+
@@ -64,6 +65,7 @@
AddressOf
And
AndAlso
+ Await
Is
IsNot
Like
@@ -208,6 +210,7 @@
Aggregate
Ansi
Ascending
+ Async
Auto
Binary
By
@@ -221,6 +224,7 @@
Group
Infer
Into
+ Iterator
Join
Key
Off
@@ -232,6 +236,7 @@
Unicode
Until
Where
+ Yield
diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
index 34f35002e5..260844a251 100644
--- a/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
+++ b/src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
@@ -378,7 +378,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
});
- MSBuildInternals.ResolveAssemblyReferences(project, referenceItems.ToArray());
+ string mscorlibPath;
+ MSBuildInternals.ResolveAssemblyReferences(project, referenceItems.ToArray(), out mscorlibPath);
WorkbenchSingleton.SafeThreadAsyncCall(
delegate {
@@ -422,7 +423,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
});
- MSBuildInternals.ResolveAssemblyReferences(project, referenceItems.ToArray());
+ string mscorlibPath;
+ MSBuildInternals.ResolveAssemblyReferences(project, referenceItems.ToArray(), out mscorlibPath);
foreach (ReferenceProjectItem rpi in referenceItems) {
if (string.IsNullOrEmpty(rpi.Redist)) continue;
if (!redistNameToRequiredFramework.ContainsKey(rpi.Redist)) {
diff --git a/src/Main/Base/Project/Src/Project/CompilableProject.cs b/src/Main/Base/Project/Src/Project/CompilableProject.cs
index aef89e2909..24b814be25 100644
--- a/src/Main/Base/Project/Src/Project/CompilableProject.cs
+++ b/src/Main/Base/Project/Src/Project/CompilableProject.cs
@@ -206,8 +206,6 @@ namespace ICSharpCode.SharpDevelop.Project
protected override ParseProjectContent CreateProjectContent()
{
ParseProjectContent newProjectContent = new ParseProjectContent(this);
- var mscorlib = AssemblyParserService.GetRegistryForReference(new ReferenceProjectItem(this, "mscorlib")).Mscorlib;
- newProjectContent.AddReferencedContent(mscorlib);
return newProjectContent;
}
diff --git a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
index 20314f7de3..07917ac7c8 100644
--- a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
+++ b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
@@ -137,9 +137,21 @@ namespace ICSharpCode.SharpDevelop.Project
}
}
+ volatile string mscorlibPath;
+
+ ///
+ /// Gets the path to mscorlib.
+ /// This property is set only after ResolveAssemblyReferences() is called.
+ ///
+ public string MscorlibPath {
+ get { return mscorlibPath; }
+ }
+
public override void ResolveAssemblyReferences()
{
- MSBuildInternals.ResolveAssemblyReferences(this, null);
+ string mscorlib;
+ MSBuildInternals.ResolveAssemblyReferences(this, null, out mscorlib);
+ this.mscorlibPath = mscorlib;
}
#region CreateProjectItem
diff --git a/src/Main/Base/Project/Src/Project/MSBuildInternals.cs b/src/Main/Base/Project/Src/Project/MSBuildInternals.cs
index 244cf50c6d..5760270806 100644
--- a/src/Main/Base/Project/Src/Project/MSBuildInternals.cs
+++ b/src/Main/Base/Project/Src/Project/MSBuildInternals.cs
@@ -5,8 +5,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
-
using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop.Dom;
using Microsoft.Build.Construction;
using Microsoft.Build.Execution;
using Microsoft.Build.Framework;
@@ -162,7 +162,7 @@ namespace ICSharpCode.SharpDevelop.Project
/// The base project.
/// A different set of references to use instead of those in the project.
/// Used by the GacReferencePanel.
- internal static void ResolveAssemblyReferences(MSBuildBasedProject baseProject, ReferenceProjectItem[] referenceReplacements)
+ internal static void ResolveAssemblyReferences(MSBuildBasedProject baseProject, ReferenceProjectItem[] referenceReplacements, out string mscorlibPath)
{
ProjectInstance project = baseProject.CreateProjectInstance();
project.SetProperty("BuildingProject", "false");
@@ -215,18 +215,22 @@ namespace ICSharpCode.SharpDevelop.Project
referenceDict[item.Include] = item;
}
-
+ mscorlibPath = null;
foreach (ProjectItemInstance item in project.GetItems("_ResolveAssemblyReferenceResolvedFiles")) {
+ DomAssemblyName assemblyName = new DomAssemblyName(item.GetMetadataValue("FusionName"));
+ string fullPath = FileUtility.GetAbsolutePath(baseProject.Directory, item.GetMetadataValue("Identity"));
+
string originalInclude = item.GetMetadataValue("OriginalItemSpec");
ReferenceProjectItem reference;
if (referenceDict.TryGetValue(originalInclude, out reference)) {
reference.AssemblyName = new Dom.DomAssemblyName(item.GetMetadataValue("FusionName"));
- //string fullPath = item.GetEvaluatedMetadata("FullPath"); is incorrect for relative paths
- string fullPath = FileUtility.GetAbsolutePath(baseProject.Directory, item.GetMetadataValue("Identity"));
reference.FileName = fullPath;
reference.Redist = item.GetMetadataValue("Redist");
LoggingService.Debug("Got information about " + originalInclude + "; fullpath=" + fullPath);
reference.DefaultCopyLocalValue = bool.Parse(item.GetMetadataValue("CopyLocal"));
+ } else if (string.Equals(assemblyName.ShortName, "mscorlib", StringComparison.OrdinalIgnoreCase)) {
+ LoggingService.Debug("Got information for mscorlib: " + fullPath);
+ mscorlibPath = fullPath;
} else {
LoggingService.Warn("Unknown item " + originalInclude);
}
diff --git a/src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs b/src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs
index 1134303ae3..6816d85cdb 100644
--- a/src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs
+++ b/src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs
@@ -58,6 +58,17 @@ namespace ICSharpCode.SharpDevelop
// TODO: Translate me
// progressMonitor.TaskName = "Resolving references for " + project.Name + "...";
project.ResolveAssemblyReferences();
+ MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
+ if (msbuildProject != null) {
+ string mscorlib = msbuildProject.MscorlibPath;
+ if (string.IsNullOrEmpty(mscorlib)) {
+ AddReferencedContent(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
+ } else {
+ AddReferencedContent(AssemblyParserService.DefaultProjectContentRegistry.GetProjectContentForReference("mscorlib", mscorlib));
+ }
+ } else {
+ AddReferencedContent(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
+ }
foreach (ProjectItem item in items) {
if (!initializing) return; // abort initialization
progressMonitor.CancellationToken.ThrowIfCancellationRequested();
@@ -76,13 +87,6 @@ namespace ICSharpCode.SharpDevelop
internal void ReInitialize1(IProgressMonitor progressMonitor)
{
- var mscorlib = AssemblyParserService.GetRegistryForReference(new ReferenceProjectItem(project, "mscorlib")).Mscorlib;
- // don't fetch mscorlib within lock - finding the correct registry might access the project, causing
- // a deadlock between IProject.SyncRoot and the ReferencedContents lock
- lock (ReferencedContents) {
- ReferencedContents.Clear();
- AddReferencedContent(mscorlib);
- }
// prevent adding event handler twice
ProjectService.ProjectItemAdded -= OnProjectItemAdded;
ProjectService.ProjectItemRemoved -= OnProjectItemRemoved;
diff --git a/src/Main/Base/Test/CodeConverterTests.cs b/src/Main/Base/Test/CodeConverterTests.cs
index e1c58a21b7..99f926698e 100644
--- a/src/Main/Base/Test/CodeConverterTests.cs
+++ b/src/Main/Base/Test/CodeConverterTests.cs
@@ -37,9 +37,9 @@ namespace ICSharpCode.SharpDevelop.Tests
{
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(projectContentRegistry.Mscorlib);
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", typeof(System.Windows.Forms.Form).Module.FullyQualifiedName));
if (sourceLanguage == SupportedLanguage.VBNet) {
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("Microsoft.VisualBasic", "Microsoft.VisualBasic"));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("Microsoft.VisualBasic", typeof(Microsoft.VisualBasic.Constants).Module.FullyQualifiedName));
pc.DefaultImports = new DefaultUsing(pc);
pc.DefaultImports.Usings.Add("System");
pc.DefaultImports.Usings.Add("Microsoft.VisualBasic");
diff --git a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
index 9563deb35d..9147ba976f 100644
--- a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
+++ b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
@@ -33,6 +33,7 @@
4096
+
3.0
diff --git a/src/Main/Base/Test/MemberLookupHelperTests.cs b/src/Main/Base/Test/MemberLookupHelperTests.cs
index a7c8b52955..b0821d10ee 100644
--- a/src/Main/Base/Test/MemberLookupHelperTests.cs
+++ b/src/Main/Base/Test/MemberLookupHelperTests.cs
@@ -26,7 +26,7 @@ namespace ICSharpCode.SharpDevelop.Tests
{
ProjectContentRegistry r = new ProjectContentRegistry();
msc = r.Mscorlib;
- swf = r.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms");
+ swf = r.GetProjectContentForReference("System.Windows.Forms", typeof(System.Windows.Forms.Form).Module.FullyQualifiedName);
DefaultProjectContent dpc = new DefaultProjectContent();
dpc.ReferencedContents.Add(msc);
diff --git a/src/Main/Base/Test/NRefactoryResolverTests.cs b/src/Main/Base/Test/NRefactoryResolverTests.cs
index 3401c93c27..ed635376fc 100644
--- a/src/Main/Base/Test/NRefactoryResolverTests.cs
+++ b/src/Main/Base/Test/NRefactoryResolverTests.cs
@@ -29,8 +29,8 @@ namespace ICSharpCode.SharpDevelop.Tests
p.Parse();
DefaultProjectContent pc = new DefaultProjectContent();
pc.ReferencedContents.Add(projectContentRegistry.Mscorlib);
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Core", "System.Core"));
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Core", typeof(System.Linq.Enumerable).Module.FullyQualifiedName ));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", typeof(System.Windows.Forms.Form).Module.FullyQualifiedName ));
HostCallback.GetCurrentProjectContent = delegate {
return pc;
};
@@ -59,8 +59,8 @@ namespace ICSharpCode.SharpDevelop.Tests
return pc;
};
pc.ReferencedContents.Add(projectContentRegistry.Mscorlib);
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", "System.Windows.Forms"));
- pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("Microsoft.VisualBasic", "Microsoft.VisualBasic"));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("System.Windows.Forms", typeof(System.Windows.Forms.Form).Module.FullyQualifiedName));
+ pc.ReferencedContents.Add(projectContentRegistry.GetProjectContentForReference("Microsoft.VisualBasic", typeof(Microsoft.VisualBasic.Constants).Module.FullyQualifiedName));
pc.Language = LanguageProperties.VBNet;
lastPC = pc;
NRefactoryASTConvertVisitor visitor = new NRefactoryASTConvertVisitor(pc, ICSharpCode.NRefactory.SupportedLanguage.VBNet);
diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs
index 78942dace4..75636df147 100644
--- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs
+++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs
@@ -300,6 +300,11 @@ namespace ICSharpCode.SharpDevelop.Dom
protected virtual Assembly GetDefaultAssembly(string shortName)
{
+ return null;
+ /*
+ * Special cases disabled: using these causes us the load the GAC assemblies,
+ * but we need to load the reference assemblies instead to support multi-targeting.
+ *
// These assemblies are already loaded by SharpDevelop, so we
// don't need to load them in a separate AppDomain/with Cecil.
switch (shortName) {
@@ -332,7 +337,7 @@ namespace ICSharpCode.SharpDevelop.Dom
return Assembly.Load("Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
default:
return null;
- }
+ }*/
}
}
}
diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs
index 33c43b79b1..69cf070aa2 100644
--- a/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs
+++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/CodeSnippetConverterTests.cs
@@ -26,7 +26,7 @@ namespace ICSharpCode.SharpDevelop.Dom.Tests
{
referencedContents = new List {
SharedProjectContentRegistryForTests.Instance.Mscorlib,
- SharedProjectContentRegistryForTests.Instance.GetProjectContentForReference("System", "System")
+ SharedProjectContentRegistryForTests.Instance.GetProjectContentForReference("System", typeof(Uri).Module.FullyQualifiedName)
};
}
diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryAstConverterTests.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryAstConverterTests.cs
index 89f9c3c546..7ff7d07035 100644
--- a/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryAstConverterTests.cs
+++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryAstConverterTests.cs
@@ -308,7 +308,7 @@ Module StringExtensions
End Sub
End Module";
ICompilationUnit cu = Parse(code, SupportedLanguage.VBNet, SharedProjectContentRegistryForTests.Instance.Mscorlib,
- SharedProjectContentRegistryForTests.Instance.GetProjectContentForReference("System.Core", "System.Core"));
+ SharedProjectContentRegistryForTests.Instance.GetProjectContentForReference("System.Core", typeof(System.Linq.Enumerable).Module.FullyQualifiedName));
Assert.Greater(cu.Classes.Count, 0);
Assert.AreEqual("StringExtensions", cu.Classes[0].Name);
Assert.AreEqual(ClassType.Module, cu.Classes[0].ClassType);
diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs
index 10a66fd7da..08b723b286 100644
--- a/src/Setup/Files.wxs
+++ b/src/Setup/Files.wxs
@@ -730,6 +730,9 @@
+
+
+
@@ -804,6 +807,9 @@
+
+
+
@@ -848,6 +854,9 @@
+
+
+
@@ -889,6 +898,9 @@
+
+
+
diff --git a/src/Setup/Setup.wxs b/src/Setup/Setup.wxs
index a9ea949001..b2a6c3f9a3 100644
--- a/src/Setup/Setup.wxs
+++ b/src/Setup/Setup.wxs
@@ -318,6 +318,11 @@
+
+
+
+
+