[英]Running Grunt from Visual Studio post build event command line
[英]Visual Studio post build command running before SharePoint package is created
我正在更新一些VS SharePoint项目,以便在构建它们时同时创建dll和wsp的(程序包)。
我发现此页面描述了此过程,但问题是,我的项目文件如下所示:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);CreatePackage</BuildDependsOn>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>"$(SolutionDir)PostBuild.cmd" "$(SolutionDir)" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup>
PostBuild.cmd在打包发生之前运行,因此当开始清理时,这是输出:
------ Rebuild All started: Project: Sample, Configuration: Debug Any CPU ------
SampleProject -> C:\Inter\bin\Debug\Sample.dll
C:\Inter\bin\Debug\Sample.dll
1 File(s) copied
File not found - *.wsp
0 File(s) copied
Successfully created package at: C:\Inter\Sample\bin\Debug\Sample.wsp
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
有任何想法吗? 谢谢!!!
解决方案可以在这里找到。
Visual Studio和SharePoint:如何在生成过程中创建包为了生成项目并创建包,可以将其添加到项目文件(csproj,vbproj)中:
<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
CreatePackage;
</PostBuildEventDependsOn>
那就对了。 在建立装配后发生PostBuild事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.