views:

79

answers:

1

I tried file system publish and ftp I'm using VS2010 and .net 4.0

should i somehow include *.spark ext files to the MSBuild?

+2  A: 

See this. You basically have to set .spark files' Build Action to Content.

Here's a macro to do so:

Sub SetSparkBuildAction(ByVal scope As EnvDTE.vsBuildScope, ByVal action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildBegin 
    For Each proj As Project In DTE.Solution.Projects 
        RecurseSetSparkBuildAction(proj) 
    Next 
End Sub 
Sub RecurseSetSparkBuildAction(ByVal item As Object) 
    If (item.Name.EndsWith(".spark", StringComparison.CurrentCultureIgnoreCase)) Then 
        item.Properties.Item("BuildAction").Value = 2 
    End If 
    For Each childItem As ProjectItem In item.ProjectItems 
        RecurseSetSparkBuildAction(childItem) 
    Next 
End Sub 

To use this macro, open up Macros IDE (Alt+F11), locate EnvironmentEvents in a leftmost treeview and paste this code outside of the "Automatically generated code, do not modify" region.

Anton Gogolev
thanks, could u tell me please, where should i put this macro? it looks like VB code :)
msony
@msony: Clarified a bit. See if that helps.
Anton Gogolev
it tried it, but can see that buildAction fired when i press on publish btn, should i do something else?
msony
works perfectly thanks!
teebot.be