Skip to content

Commit

Permalink
Merge pull request #1157 from DustinCampbell/fix-xaml-markup-compiler…
Browse files Browse the repository at this point in the history
…-task

Set MSBuild property to allow the XAML markup compiler task to run
  • Loading branch information
filipw authored Apr 11, 2018
2 parents 021ee0f + 35f685c commit 78be8b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/OmniSharp.MSBuild/ProjectFile/PropertyNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
internal static class PropertyNames
{
public const string AllowUnsafeBlocks = nameof(AllowUnsafeBlocks);
public const string AlwaysCompileMarkupFilesInSeparateDomain = nameof(AlwaysCompileMarkupFilesInSeparateDomain);
public const string AssemblyName = nameof(AssemblyName);
public const string AssemblyOriginatorKeyFile = nameof(AssemblyOriginatorKeyFile);
public const string BuildProjectReferences = nameof(BuildProjectReferences);
Expand Down
7 changes: 7 additions & 0 deletions src/OmniSharp.MSBuild/ProjectLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ private static Dictionary<string, string> CreateGlobalProperties(
{ PropertyNames._ResolveReferenceDependencies, "true" },
{ PropertyNames.SolutionDir, solutionDirectory + Path.DirectorySeparatorChar },

// Setting this property will cause any XAML markup compiler tasks to run in the
// current AppDomain, rather than creating a new one. This is important because
// our AppDomain.AssemblyResolve handler for MSBuild will not be connected to
// the XAML markup compiler's AppDomain, causing the task not to be able to find
// MSBuild.
{ PropertyNames.AlwaysCompileMarkupFilesInSeparateDomain, "false" },

// This properties allow the design-time build to handle the Compile target without actually invoking the compiler.
// See https://github.com/dotnet/roslyn/pull/4604 for details.
{ PropertyNames.ProvideCommandLineArgs, "true" },
Expand Down

0 comments on commit 78be8b0

Please sign in to comment.