Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set MSBuild property to allow the XAML markup compiler task to run #1157

Merged
merged 2 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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