Skip to content
New issue

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

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

Already on GitHub? Sign in 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

Conversation

DustinCampbell
Copy link
Contributor

Fixes dotnet/vscode-csharp#2173

We need to set the AlwaysCompileMarkupFilesInSeparateDomain property to false. Otherwise, the XAML markup compiler task will try to create an AppDomain to run the markup compiler in. In normal MSBuild scenarios, this is fine. However, in OmniSharp, our AppDomain.AssemblyResolve handler that's used to locate MSBuild will not be installed in the marker compiler task's AppDomain, causing it to fail.

We need to set the AlwaysCompileMarkupFilesInSeparateDomain property to false.
Otherwise, the XAML markup compiler task will try to create an AppDomain to run
the markup compiler in. In normal MSBuild scenarios, this is fine. However, in
OmniSharp, our AppDomain.AssemblyResolve handler that's used to locate MSBuild
will not be installed in the marker compiler task's AppDomain, causing it to fail.
@filipw
Copy link
Member

filipw commented Apr 11, 2018

thanks for the explanation, I learnt something today 😇
I actually saw this error before but had no clue what was happening.

@filipw filipw merged commit 78be8b0 into OmniSharp:master Apr 11, 2018
@DustinCampbell DustinCampbell deleted the fix-xaml-markup-compiler-task branch April 11, 2018 21:39
@DustinCampbell
Copy link
Contributor Author

I tracked this down when working on MSBuildWorkspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants