Answered by:
MSBuild WPF

Question
-
We are working on a complex composite application using WPF as presentation technology. When we build our code using Visual Studio everything works fine. The application runs without errors to.
I'm now trying to create a build file to automate the build using msbuild.
When I build the code using msbuild I'm getting following errors from targets MarkupCompilePass1 and MarkupCompilePass2: error MC3015: The attached property 'DataGridControl.Column
s' is not defined on 'DataGrid' or one of its base classes.
What is the difference between a build in visual studio and a build using msbuild which can cause these errors? Can I instruct msbuild to build the same way as visual studio?
Thanks,
Jelle
Thursday, January 15, 2009 10:24 AM
Answers
-
you can run MSBuild from Visual Studio Command Prompt.
Start->Programs->Microsoft Visual Studio(Version)->Visual Studio Tools->Visual Studio (Version) Command Prompt
MSBuild.exe will be in folder
WINDOWS\Microsoft.NET\Framework\(Framework Version like v3.5 etc...)
in Command Prompt just type
MSBuild /?
you will get how to use it.
I hope this will help you :)
Prasad - www.beautifulmind.blog.co.in- Proposed as answer by prasad22 Friday, January 16, 2009 3:56 PM
- Marked as answer by Marco Zhou Wednesday, January 21, 2009 11:16 AM
Friday, January 16, 2009 3:54 PM
All replies
-
Hi Visual Studio Build Inturns Calls the MSBuild, You Can instruct msbuild to build the same way as visual studio from command prompt.
Prasad - www.beautifulmind.blog.co.in- Proposed as answer by prasad22 Thursday, January 15, 2009 4:35 PM
Thursday, January 15, 2009 4:34 PM -
Can I see somewhere how msbuild is called (with which properties) from within Visual Studio?Friday, January 16, 2009 8:02 AM
-
you can run MSBuild from Visual Studio Command Prompt.
Start->Programs->Microsoft Visual Studio(Version)->Visual Studio Tools->Visual Studio (Version) Command Prompt
MSBuild.exe will be in folder
WINDOWS\Microsoft.NET\Framework\(Framework Version like v3.5 etc...)
in Command Prompt just type
MSBuild /?
you will get how to use it.
I hope this will help you :)
Prasad - www.beautifulmind.blog.co.in- Proposed as answer by prasad22 Friday, January 16, 2009 3:56 PM
- Marked as answer by Marco Zhou Wednesday, January 21, 2009 11:16 AM
Friday, January 16, 2009 3:54 PM -
Hi Prasad22,
I dont think this is what Jelle Huygen is asking about. I have the same problem as well. In my solution with these WPF component, Visual Studio compiled it successfully but when i automate the compilation with MSBuild 3.5, it failed with the same problem described above.
I do not understand the difference between the compilation process of Visual Studio's and MSBuild's but some how MSBuild failed intermittently.
E:\xxx\DisplaySetupGrid.xaml(333,22): error MC3015: The attached property 'PropertyGrid.BuiltInEditorStyles' is not defined on 'PropertyGridEx' or one of its base classes.
Here's the portion of codes that failed to build:<local:PropertyGridEx Grid.Row="0" x:Name="m_StrategyGrid" Validation.Error="BindingError" >
Do you have any experience on this?
<ms:PropertyGrid.BuiltInEditorStyles>
<ms:BuiltInEditorStyleCollection>
<ms:BuiltInEditorStyle EditorKey="{x:Static ms:PropertyGrid.ListSelectEditorKey}">
<Style TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<ComboBox ItemsSource="{TemplateBinding ItemsSource}" Text="{TemplateBinding Text}" SelectedValue="{Binding Value, Mode=TwoWay}" Margin="2,1,10,1" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ms:BuiltInEditorStyle>
</ms:BuiltInEditorStyleCollection>
</ms:PropertyGrid.BuiltInEditorStyles>
...
...
</local:PropertyGridEx>
Thanks.Tuesday, April 7, 2009 8:52 AM -
We've just run into the same problem ourselves... Code - similar to the above - WORKS when developers build within Visual Studio, but FAILS with the same MC3015 when built on our build machines via msbuild.
Why the difference???Tuesday, May 19, 2009 2:24 PM -
You are not alone...
...Source\Modules\Infrastructure\Views\MenuView.xaml(28,18): error MC3015: The attached property 'XamRibbon.ApplicationMenu' is not defined on 'U4ARibbon' or one of its base classes.
On the developer machines it compiles with the same conditions but on TFSBuild the build machine can't compile. Sadly enough.. our build solution has at least 20 projects to build, and that is even less. Hard to find the real error. I thought it has to do something with Office, but seeing your errors, maybe it's something else.- Proposed as answer by Raymond de Jong Tuesday, May 19, 2009 2:34 PM
Tuesday, May 19, 2009 2:34 PM -
Oops, misclicked on "Proposed As Anser" just after it refreshed..
Ofcourse it isn't an answer! (can't find how to remove that propose)Tuesday, May 19, 2009 2:36 PM -
One of the differences between building in VS and command line is that a WPF build in VS defaults to
<AlwaysCompileMarkupFilesInSeparateDomain>true</AlwaysCompileMarkupFilesInSeparateDomain>.
Outside of VS, the default is false.
Does that fix any of your issues, if you put that tag in your .vbproj/.csproj file?
THanks, Rob Relyea
WPF/XAML Teams
http://robrelyea.com/blog- Proposed as answer by sdahlbac Tuesday, January 19, 2010 9:21 AM
Tuesday, May 19, 2009 4:21 PM -
That did the trick for me... thanks!Wednesday, May 20, 2009 4:50 PM
-
Thanks a ton, that seems to fix the problem! Too bad it is not marked as answer already.Wednesday, November 14, 2012 9:12 PM