Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

How to compile .xaml to get the *.g.cs before running csc RSS

0 replies

Last post May 02, 2009 08:25 PM by Jason.Jarrett

(0)
  • Jason.Jarrett

    Jason.Jarrett

    Member

    10 Points

    15 Posts

    How to compile .xaml to get the *.g.cs before running csc

    May 02, 2009 08:25 PM | LINK

    I have a project that requires me to compile without Visual Studio or MSBuild. I have to go straight through csc, however whenever I run it on the project that hasn't been built by V.S. first I get compiler errors saying it can't access items that would have been created pre-compile time by VS in the *.g.cs files... I've read that you should be able to use msbuild to run the Microsoft.Build.Tasks.Windows.MarkupCompilePass1, however I can't seem to get it to work in silverlight. Any thoughts, or preferably examples... on how can I get my xaml *.g.cs files before running csc?

    msbuild csc compile g.cs