diff --git a/src/Main/ICSharpCode.SharpDevelop.Sda/Src/SharpDevelopHost.cs b/src/Main/ICSharpCode.SharpDevelop.Sda/Src/SharpDevelopHost.cs index 4fdd4e03ec..bb037c5f14 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Sda/Src/SharpDevelopHost.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Sda/Src/SharpDevelopHost.cs @@ -227,6 +227,45 @@ namespace ICSharpCode.SharpDevelop.Sda } #endregion + #region CreateInstanceInTargetDomain + /// + /// Gets the AppDomain used to host SharpDevelop. + /// + public AppDomain AppDomain { + get { + return appDomain; + } + } + + /// + /// Creates an instance of the specified type argument in the target AppDomain. + /// + /// Arguments to pass to the constructor of . + /// The constructed object. + [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")] + public T CreateInstanceInTargetDomain(params object[] arguments) where T : MarshalByRefObject + { + Type type = typeof(T); + return (T)appDomain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName, arguments); + } + + /// + /// Creates an instance of the specified type in the target AppDomain. + /// + /// Type to create an instance of. + /// Arguments to pass to the constructor of . + /// The constructed object. + [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters")] + public object CreateInstanceInTargetDomain(Type type, params object[] arguments) + { + if (type == null) + throw new ArgumentNullException("type"); + if (typeof(MarshalByRefObject).IsAssignableFrom(type) == false) + throw new ArgumentException("type does not inherit from MarshalByRefObject", "type"); + return appDomain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName, arguments); + } + #endregion + #region Callback Events System.ComponentModel.ISynchronizeInvoke invokeTarget; diff --git a/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.csproj b/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.csproj index 33ed3132bd..2db550a1bd 100644 --- a/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.csproj +++ b/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.csproj @@ -39,5 +39,10 @@ + + + Always + + \ No newline at end of file diff --git a/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.exe.manifest b/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.exe.manifest new file mode 100644 index 0000000000..6bbf3ea0b3 --- /dev/null +++ b/src/Tools/UpdateAssemblyInfo/UpdateAssemblyInfo.exe.manifest @@ -0,0 +1,15 @@ + + + + Updates the assembly version in GlobalAssemblyInfo.cs + + + + + + + + + + +