Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF -- when does C# Compiler of VS2010 start to support to compile XAML markup?

Tags:

wpf

Based on the book "Pro C# 2010 and the .net 4.0 platform" page page 1148, it claims that C# compiler doesn't understand XAML markup. Instead, we have to use MSBUILD.

However, I found that I could be able to directly compile the WPF solution within VS2010 SP1 with the help from

WPF - How to run WPF solution in VS2010 SP1

So, the question is that "when does C# Compiler of VS2010 start to support to compile XAML markup?"

Thank you

like image 531
q0987 Avatar asked Dec 09 '25 20:12

q0987


2 Answers

XAML has nothing to do with C#; it wouldn't make sense for the C# compiler to support XAML.

Visual Studio has used MSBuild since 2005; .csproj files are actually MSBuild scripts.

like image 179
SLaks Avatar answered Dec 11 '25 19:12

SLaks


C# compiler doesn't compile XAML since it is a different language. However, when building a WPF application, the XAML-markup is compiled into code by Visual Studio. For more information, see: http://msdn.microsoft.com/en-us/library/aa970678.aspx

like image 31
Kyberias Avatar answered Dec 11 '25 21:12

Kyberias



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!