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

execute CoreBuild to generate xaml files #2982

Closed
wants to merge 1 commit into from

Conversation

mattwar
Copy link
Contributor

@mattwar mattwar commented May 21, 2015

Fixes #2779

This enables the MSBuild workspace to run the xaml tasks that generate files, so those files get added as compiler source inputs correctly.

The solution is to switch to using the "CoreBuild" msbuild target instead of "Compile" (which is included in CoreBuild.)

Note: there has been lots of conversation on how/why the VS project system is able to use only the Compile target and still build/produce the correct compiler inputs, and the result is no one either knows are assumes there is project-system flavoring extensions augmenting the project system. What is known, however, is that under normal msbuild-only conditions, the extra tasks needed to process xaml only occur under CoreBuild.

So I'm switching msbuild workspace to use CodeBuild. The down side is that some extra/unnecessary work may happen when opening some projects.

@Pilchie @jasonmalinowski please review

*Also, this solution doesn't solve the versioning problem that requires apps using msbuild workspace to use .net config file redirects for msbuild API dlls, the same way the msbuild.exe and devenv.exe do.

@@ -32,6 +32,54 @@ public string[] Targets
get { return _buildTargets.ToArray(); }
}

#if DEBUG
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this code? It doesn't seem to be called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for debugging the tasks that MSBuild will process.

@mattwar
Copy link
Contributor Author

mattwar commented May 22, 2015

Looks like the bug causing the properties not to get set properly was what was causing this to be different than VS. This was fixed in #2765, so no need to change to CoreBuild.

@mattwar mattwar closed this May 22, 2015
@Pilchie
Copy link
Member

Pilchie commented May 22, 2015

In other words, you should be able to work around this in RC by adding DesignTimeBuild and BuildingInsideVisualStudio properties into your MSBuildWorkspace.

@mattwar mattwar deleted the Bug2779RTM branch August 29, 2016 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants